Where are algorithms for cube, uvsphere, cyl, etc?

Where can I find algorithms for cube, uvsphere, cylinder, etc.?

What about more complex types like dodecahedron?

Here :

Jms. these arnt realy math algo’s for the shapes, rather you have stored the vert locations…

You should read all the code , not only the first class .

That’s a good link. Thanks jms.

This is free source code, right? The algorithms should be in the code - probably documented? Has anybody checked into that before? Anything we don’t have code for in Python should be relatively easy to port over from the C/C++ code used to make Blender.

Updated :
The classes have been replaced by simple functions .