These include files provide a library of mesh-based polyhedra, all following the same name and usage conventions. The original object data was created by George W. Hart (http://www.georgehart.com/virtual-polyhedra/vp.html), and the POV-Ray conversion was by me, Bill Pragnell.
Each polyhedron is supplied in several forms:
1) a global array filled with vertex vectors,
2) a macro which creates a mesh2 polyhedron textured according to polygon,
3) a macro which creates a mesh2 polyhedron with no texture,
4) a macro which creates a union of spheres and cylinders at the vertices and edges of the polyhedron.
Taking the tetrahedron as an example:
Platonic_tetrahedron_verts[i] Platonic_tetrahedron_faces(tri_texture, on_plane) Platonic_tetrahedron_faces2(on_plane) Platonic_tetrahedron_edges(v_rad, e_rad, v_tex, e_tex, on_plane)
Where i is the vertex index, tri_texture is a texture identifier for texturing triangles, v_rad and e_rad are the radii to be used for the vertices and edges respectively, v_tex and e_tex are texture identifiers for texturing vertices and edges respectively, and on_plane is a boolean (yes/no) specifying whether to sit the polyhedron on a suitable face on the x-z plane. For the skeleton polyhedra, it is the spheres/cylinders which sit on the plane, not the face - this means that if you want both faces and edges, you must remember to translate the faces vertically by a distance equal to the edge/vertex radius.
The prefix denotes the polyhedron group - see the individual include files for a complete list of polyhedra defined in that group. Additionally, for the _faces macros, if the polyhedron is composed of more than one type of polygon, a separate texture identifier is required for each one. For example, a cuboctahedron is defined like this:
Archimedean_cuboctahedron_faces(tri_texture, square_texture, on_plane)
The meshes produced by these macros are all provided with inside_vectors, so should be suitable for use in CSG.
The polyhedra are not scaled relative to the original data; most of them are approximately 1 unit in radius. Scaling strategies are up to the user; the mesh bounds could be used to fit the shape into a given volume, or adjacent vertex separation could be used to scale the shape according to edge length. I may supply some macros to do this at some point in the future.
Whilst using these include files, you may find the group's entries on wikipedia to be helpful in identifying a shape prior to use - I found them invaluable during testing! The following are good references:
Bill Pragnell 2009