Play n Tools

Free tools & games for everyone

Free · No sign-up · No accounts

4D explorer

Turn a tesseract and other four-dimensional shapes in any of the six 4D planes, and slice the hypercube into tetrahedra and octahedra.

Edge colours show which direction an edge runs in 4D: x teal, y brown, z purple, w red.

How to use

  1. Turn a 4D shape: pick a shape and move the six sliders. In 3D you can turn around three axes; in 4D there are six planes of turning: XY, XZ, XW, YZ, YW and ZW.
  2. The planes with W swing the shape through the fourth dimension. With perspective on, the part nearer in w is drawn bigger, so a tesseract looks like a cube inside a cube that turns inside out.
  3. Press Spin to turn it on its own; press again to stop.
  4. Slice the hypercube: a 3D space moves through the unit hypercube at x + y + z + w = c, the way a flat plane can cut a cube. Move c from 0 to 4 and watch the cut grow from a point to a tetrahedron, a truncated tetrahedron, an octahedron and back.

Keyboard and touch

TabMove between tabs, sliders and buttons
Arrow keys on a sliderChange it one step at a time
TouchDrag the sliders

Tips

  • Start with only the XW slider: the tesseract's inner cube grows into the outer one while the outer cube shrinks inward.
  • Count along the table: in every row, corners minus edges plus faces minus cells is 0. That is Euler's rule one dimension up.
  • The 24-cell has no 3D cousin: it is the one regular shape that exists only in four dimensions.
  • Slices are a good way to think about 4D: a person in a flat world would see a cube passing through as a growing and shrinking square.

About this tool

Each shape is built from exact coordinates: the tesseract from all sign choices of (1, 1, 1, 1), the 16-cell from the eight points one step along each axis, the 24-cell from the arrangements of (1, 1, 0, 0) with signs, and the 5-cell from a regular simplex. Edges join the closest pairs of corners. A turn in one plane changes only two coordinates by the usual cosine and sine rule, and the six turns are combined into one 4 x 4 matrix. The shape is then projected to 3D by perspective along w and drawn with a second perspective. The slice tab intersects every edge and square face of the unit hypercube with the 3D space x + y + z + w = c, exactly. A separately written Python check recounts the corners and edges, checks that every turn keeps lengths, and recomputes the slices. Everything runs in your browser.

See you tomorrow!

A fresh daily puzzle every morning, and new tools added every month.

Browse every product