PDA

View Full Version : Sphere with triangular display



dream2000
03-07-2002, 09:14 PM
Hi,

I'm new to OpenGL. I feel very frustrated when I was told to draw a 3D sphere and cylinder which should be converted to a set of triangles for display in anywhere of 3D space.

Can anyone help me?
Thks a lot.

yakuza
03-08-2002, 06:14 AM
I'd suggest you visit some of the introductory tutorial websites, such as:
http://nehe.gamedev.net http://www.gametutorials.com

nexusone
03-08-2002, 08:54 AM
One thing you need to understand is that most 3D object's you see in games are made of up triangles, if you look at 3D hardware spec's you will see number of trangles it can process per frame.

The reason the trangles are used is that you can make more shapes then you could if you just say a squire.
Also for texture mapping and math reason's, the triangle is a good base object.

If you just want to draw them with out figuring out the trangle mesh, then use the follow functions: gluSphere, gluCylinder, gluDisk, glutSolidSphere, glutSolidCube, glutSolidCone.
And you can move them anywhere in your scene.


Originally posted by dream2000:
Hi,

I'm new to OpenGL. I feel very frustrated when I was told to draw a 3D sphere and cylinder which should be converted to a set of triangles for display in anywhere of 3D space.

Can anyone help me?
Thks a lot.