Platonic Solids

geometrywebglmathematics

The Five Platonic Solids

Exactly five convex polyhedra exist where every face is the same regular polygon and the same number of faces meet at every vertex. This has been known since antiquity — Euclid proves it in Book XIII of the Elements.

What’s less widely appreciated is how little information you need to generate all five. The entire vertex set derives from one constant (φ=1+52\varphi = \frac{1+\sqrt{5}}{2}), two generating patterns (sign permutation and cyclic permutation), and two operations (parity filtering and duality).

Loading...

Dodecahedron
12 faces · 30 edges · 20 vertices
420

drag to rotate · scroll to zoom

Generation

Family 1 — Rational coordinates. The cube is all sign combinations of (1,1,1)(1, 1, 1): eight vertices from three sign bits. The tetrahedron is the even-parity subset — four vertices where the product of signs is positive. The octahedron is the dual of the cube: place a vertex at each face center and project to the unit sphere.

Family 2 — Golden ratio coordinates. The icosahedron is all cyclic permutations of (0,±1,±φ)(0, \pm 1, \pm\varphi): twelve vertices from one seed and symmetry. The dodecahedron is the dual of the icosahedron: twenty face centers projected to the sphere.

Face connectivity requires no lookup tables. The convex hull of vertices on a sphere produces the triangulated surface; merging coplanar triangles recovers the true faces (squares for the cube, pentagons for the dodecahedron). Edge sets are the face boundaries.

Implementation

The geometry generator is ~180 lines of TypeScript with zero dependencies. The renderer uses raw WebGL2 with two shader programs: flat-lit triangles for faces, unlit lines and points for wireframe and vertices. The ratio of geometry code to rendering code is evidence of where the complexity actually lives.

Why Exactly Five?

At each vertex of a Platonic solid, kk regular nn-gons meet. The interior angle of a regular nn-gon is (n2)πn\frac{(n-2)\pi}{n}, and the total angle at a vertex must be less than 2π2\pi (otherwise the surface can’t close). This gives:

k(n2)πn<2π    k(n2)<2n    1k+1n>12k \cdot \frac{(n-2)\pi}{n} < 2\pi \implies k(n-2) < 2n \implies \frac{1}{k} + \frac{1}{n} > \frac{1}{2}

with n3n \geq 3 and k3k \geq 3. Enumerate: (n,k){(3,3),(3,4),(3,5),(4,3),(5,3)}(n,k) \in \{(3,3), (3,4), (3,5), (4,3), (5,3)\}. Five solutions, five solids, and the constraint itself is the proof that no sixth can exist.