I'm currently learning Direct3D in C++ and I was wondering if anyone could supply me with algorithms that create the vertices (positions and normals) for simple 3d objects like cubes, spheres, cylinders and such. It's very messy to create a cube by hand, and I don't get the normals right anyway.

I'd like C++ code best, but VB code or just an algorithm description is also ok.

Thanks in advance