Sphere

I would like to know how build 3D solids ( spheres, cones, etc ) using only triangles and and/or rectangles. Anyone can give me some good link or info?
I know I can use some gl functions to make them but I wanna learn how to make them myself.

gluQuadratic is probably the easiest way to draw a sphere, but if you want to do it yourself, Ammeraal has some source code to generate data sets for spheres, toruses etc, here

ftp://ftp.expa.fnt.hvu.nl/pub/ammeraal/English/older/

Its from his great little book Programming Principles in Computer Graphics, 2nd ed. I think the code from the newer Java edition is also there somewhere.

Thanks !

You may wanna check glut source code. It has a lot ofexamples on how to create sphere, toros etc. from triangles or quads.

you may wanna check glut source code, it has a lot of examples on drawing spheres and toruses etc. from triangles and quads.