Skip to content
← The Lab

Tesseract

A four-dimensional cube, rotating in 4D and projected to your screen. A shadow of a higher dimension.

You cannot see four dimensions. But you can see a four-dimensional cube's shadow, the way a wireframe cube casts a flat shape on paper, and watch that shadow do things no three-dimensional object's shadow can: turn itself inside out as it rotates.

The concept

A tesseract is to a cube what a cube is to a square: take the shape, push a copy along a brand-new perpendicular axis, and join the corresponding corners. A square has 4 corners, a cube 8, a tesseract 16. We render it by rotating in 4D and then projecting down to the screen, so the "inner" cube you see is just the far cube, shrunk by perspective, not actually smaller.

The math

A point lives at $(x, y, z, w)$. A rotation in 4D happens in a plane, not around an axis; rotating in the $x\,w$ plane by $\theta$ is

(xw)=(cosθsinθsinθcosθ)(xw)\begin{pmatrix} x' \\ w' \end{pmatrix} = \begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix}\begin{pmatrix} x \\ w \end{pmatrix}

leaving $y, z$ fixed. To draw it, project from 4D to 3D by dividing through by the distance along $w$ (a perspective divide), then 3D to 2D the same way:

(x,y,z,w)1dw(x,y,z)(x, y, z, w) \mapsto \frac{1}{d - w}\,(x, y, z)

As $w$ sweeps through the rotation, points cross the projection plane and the cube appears to evert.

Why it stays strange

There are six rotation planes in 4D, not three axes, so a tesseract can spin in ways with no 3D analogue, and the "turning inside out" is not distortion: it is an honest rigid rotation we simply lack the eyes to see directly. The shape is rigid; our intuition is the thing that bends.

Further reading

  • Abbott, Flatland - the canonical intuition pump for one dimension up.
  • Banchoff, Beyond the Third Dimension.
@book{banchoff1990beyond,
  author    = {Banchoff, Thomas F.},
  title     = {Beyond the Third Dimension},
  publisher = {Scientific American Library},
  year      = {1990}
}