platonic.h all the geometry
platonic.c OpenGL draw calls
- point, line, face geometry, dihedral angle, midradius, inradius, side length, volume
- polyhedra are aligned according to their duals (each face lies along its dual's point)
- the array indices are aligned, a face index is its dual's point index
- (this means an object's point data is its dual's face normal data)
- the triangle solids- at least one vertex lies along +X axis, and if possible another along +Y
- hexahedron and dodecahedron are face-aligned along +X (since they are aligned to their duals)
- each polyhedra is centered at origin
- each polyhedra's circumradius is 1.0 (center to point)
- clockwise winding
- only uses gl_triangles (OpenGL ES compatible)
example: scale by consecutive midradii
- example app is cross-platform Mac, Linux, Windows
- type
makethenmake run
input
1-5select between: tetra, octa, hexa, icosa, dodecaSPACE BARtoggle faces/lines/pointsDsuperimpose polyhedra's dual
MIT

