We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
create 3D path shell (Read 1063 times)
create 3D path shell
Oct 9th, 2005, 8:42pm
 
I have two points:
  • x1,y1,z1
  • x2,y2,z2

I want to store those points in a file. And I can. However I would also like to create a shell around this path. My assumption is that I can create a shell by casting a cylinder around the path. I can then increase or decrease the number of plates around the cylinder (a minimum creating a prism).

I need to find out the angles the line is pointed in to cast discs perpendicular to the line. Then I can just iterate around the disc to make a cylinder of paths.

My major issue here is that I'm not simply going for a graphics display. I want to save a romping amount of polygons that I can port into a 3D package.

Can anyone help?
Re: create 3D path shell
Reply #1 - Oct 10th, 2005, 11:51am
 
You're in luck. I did somethign similar a while ago:

http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Contribution_3DOpenGL;action=display;num=1114043021

There's code in Tube.pde which which creates pretty much what you want. The only thing missing is a parameter for how many segments you want the cylinder to have, I've got it locked to 8 in the code, but I think it should be fairly straightforwards to make the number of sides variable.
Re: create 3D path shell
Reply #2 - Oct 10th, 2005, 1:00pm
 
w00t!

Thanks.
Page Index Toggle Pages: 1