Rendering basic shapes

Does anyone know where I can find some alogrithms to generate vertex information (position, texcoord, normals etc…) for basic shapes (sphere, cone, cylinder etc.).
It would be great if the code is somewhere so I don’t have to figure it all out my self.
Thanks.

http://cm.bell-labs.com/netlib/polyhedra/index.html