PDA

View Full Version : 3D Disk mathematic



Erakis
11-18-2001, 09:10 PM
Hello.
Anyone could help me, I look for a way to create a 3D disk, like a CD-ROM but thicker..
with normals/texture coords. Without use Glut or GLU, juste mathematics....

Thanks http://www.opengl.org/discussion_boards/ubb/wink.gif

Martin.
eraquila@bigfoot.com

mikael_aronsson
11-18-2001, 11:02 PM
Hi !

Couldn't be simpler, you know how to create a circle with math right ?, a disk is just two circles..., you use GL_TRIANGLE_FAN for each circle, translate one of them a bit for the thickness of the disk, then you create GL_TRIANGLES or GL_QUADS between the two circles to create the sides of the disk.

If you want to know how GLU does it, you can download the source code for Mesa (or the GLU source code from sgi), and have a look at it yourself.

Mikael

Erakis
11-19-2001, 07:31 AM
Thanks for this quickly response micheal http://www.opengl.org/discussion_boards/ubb/smile.gif