Sphere with triangular display

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.

I’d suggest you visit some of the introductory tutorial websites, such as:
http://nehe.gamedev.net http://www.gametutorials.com

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:
[b]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.[/b]