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
3D Lines (Read 1701 times)
3D Lines
Jul 7th, 2005, 5:02pm
 
I want to draw some 3D lines. However I have some problems.

1> I want to have strokeweight, so P3D is not my choice?
2> I want the applet to run on browser, so OPENGL is not my choice?
3> Can I add light and shadow effects on 3D lines?
4> Or is there another way to draw lines besides the line() function?

Thanks.
Re: 3D Lines
Reply #1 - Jul 7th, 2005, 8:18pm
 
Hi

I'm no expert, but it would be better for you to develop a 3dline class that draws a rectangle for the determined line stroke, length and position; I would also recommend the line be two triangles drawn together as a rectangle, since in some occasions the triangles work much better...

for web, it needs to be p3d (at least for now)
Re: 3D Lines
Reply #2 - Jul 8th, 2005, 3:06am
 
How about drawing a prism instead of a box to represent lines of different thickness?
Re: 3D Lines
Reply #3 - Jul 8th, 2005, 4:23am
 
Thanks for ur reply!

i'm thinking of drawing boxes

setting the length and rotation so it looks like a line...

hope this can works...
Re: 3D Lines
Reply #4 - Jul 8th, 2005, 5:05pm
 
so finally i use a little trick.

simply draw a few close lines, then it resembles a strokesweight.

I decide to give up on making shadows or lights as it will be very complicated.

here's my work

http://www.betaruce.com/java/knot/applet/
Re: 3D Lines
Reply #5 - Jul 9th, 2005, 5:56am
 
Very nice visulation of 3D lines, looks good. The keyboard rotation could be smoother I think, its a bit jerky at the moment.
Page Index Toggle Pages: 1