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.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › 3D thick line / 3D-Box with 3D-Coordinates
Page Index Toggle Pages: 1
3D thick line / 3D-Box with 3D-Coordinates (Read 2194 times)
3D thick line / 3D-Box with 3D-Coordinates
Nov 13th, 2009, 2:09pm
 
Hello guys,

I need your help again.

I am looking for a thicker 3D-line or a 3D-box.

   line (x1,y1,z1, x2,y2,z2 );

But with strokeWeight we have a problem in 3D. See manual.
The line is to thin (in Z-Direction).

Anyway - how can I produce a similar
   box (x1,y1,z1, x2,y2,z2 );
?

That would be great, but box takes only height etc. as Parameters.

And I can't find my way through all this rotateX, rotateY-stuff to manipulate the box.

Can somebody help me with a function

   box3D (x1,y1,z1, x2,y2,z2 );

which takes the line-Coordinates and draws a box instead,
x1,y1,z1 being the upper left corner in the back,
x2,y2,z2 being the lower right corner in the front.

Thank you so much!

Greetings,

Chris



Re: 3D thick line / 3D-Box with 3D-Coordinates
Reply #1 - Nov 13th, 2009, 8:54pm
 
You can use glLineWidth() in pure GL mode, which requires creating an openGL object...here's a quick example of that (not the lineweight, just the gl setup)

http://benhem.com/games/GLP5align

but there's no quick "box" function in GL, so you'd need to write a function to draw a series of rectangles.  You can do it!  Remember to use pushMatrix() and popMatrix() (or glPushMatrix etc. if in pure GL mode) -- and to use radians in Processing, degrees in pure GL mode.  (glRotatef.)  In either mode, you can simulate thick stroke-edges by making a subroutine to draw a square with rectangles along the edges, then a routine to slap 6 of those into a cube shape...
Re: 3D thick line / 3D-Box with 3D-Coordinates
Reply #2 - Nov 16th, 2009, 11:12am
 
Hello,

thank you very much for your quick reply.
Highly appreciated.
Unfortunately I don't have the time or the knowledge to go into the problem that deeply.

Thank you very much anyway!

Greetings,

Chris
Re: 3D thick line / 3D-Box with 3D-Coordinates
Reply #3 - Nov 24th, 2009, 11:48am
 
Hello everyone,

sorry, I tried a lot for this problem in the mean time...

But to no avail!

Cn anybody please pass me a function for a 3d Box taking as parameters left upper corner in the back and right lower corner in the front?

Thanks!

Chris
Re: 3D thick line / 3D-Box with 3D-Coordinates
Reply #4 - Dec 6th, 2009, 8:48am
 
Please don't answer anymore.
This is somewhat misleading.

Thanks!

Page Index Toggle Pages: 1