←

Interactive visualization

The Fourth Dimension

RU

Lens
Rotation
Colour
Style

Drag to orbit · Shift or right button to push into 4D · wheel to zoom

One finger orbits · two fingers push into 4D and zoom

A guide to higher dimensions

What you are looking at

We live in three dimensions and cannot see a four-dimensional shape whole, just as A Square from Flatland cannot see a cube. What we can see is its shadow — a projection into our space — and its cross-sections. Everything on the screen is exactly that: the precise geometry of four-dimensional polytopes, recomputed into three dimensions sixty times a second.

The fourth coordinate does not vanish — colour carries it. In the “Depth w” palette, blue lies farther along the fourth dimension and orange lies nearer. In the “Hopf” palette, colour is the point of an ordinary sphere that the Hopf map sends a point of the 3-sphere to: everything on one “fibre” shares a colour.

The edges curved into arcs are not an artistic flourish. In the stereographic projection the eye sits right on the 3-sphere, and the edges of a polytope inscribed in it become arcs of circles, while angles are preserved. Cells passing close to the eye swell up and sweep off the screen — this is what “infinity” looks like in four-dimensional perspective.

Guide

Eleven chapters on higher-dimensional geometry — from “what is a dimension” to the Hopf fibration and the curse of dimensionality. Each has live widgets you can turn, slice and stretch.

  1. 01 What a dimension is How many numbers it takes to say where something is — and how, step by step, a point grows into a tesseract and then into a ten-dimensional cube. 15 min
  2. 02 Flatland: thinking by analogy A flat Square could not imagine a sphere, and we cannot imagine a tesseract. But his troubles are plain to see from outside, and each of them can be carried one floor up. 16 min
  3. 03 Shadows: projecting 4D into 3D Every picture of a tesseract is a shadow. Parallel light, a lamp and stereographic projection cast three different shadows of the same solid, and each of them hides something. 17 min
  4. 04 Rotation: planes, not axes Why a rotation in four dimensions has no axis, how many independent “knobs” it has, what double and isoclinic rotations are, and what really happens when a tesseract seems to turn inside out. 17 min
  5. 05 Cross-sections: a 4D body passing through our world What a three-dimensional observer would see if a tesseract, a hypersphere or a tiger passed through their space — and how to get a four-dimensional volume from the slices. 17 min
  6. 06 The six regular polytopes There are infinitely many regular polygons, five regular solids, six regular polytopes in four dimensions — and from five dimensions on, always three. Where these numbers come from and what the six look like. 18 min
  7. 07 The 3-sphere and the Hopf fibration The 3-sphere is the simplest closed three-dimensional space: finite, yet without an edge. How to picture it, what its volume is, and why it falls apart into circles, any two of which are linked. 18 min
  8. 08 The strange geometry of many dimensions In a thousand dimensions almost all of a ball’s volume sits in a thin peel, random directions are almost perpendicular, and all points are nearly equally far apart. This is where statistics and machine learning actually live. 17 min
  9. 09 Where dimensions live: from spacetime to neural networks A fourth coordinate is not just a geometer’s fancy: time in physics, a robot’s joints, colour, tables of data, the curled-up dimensions of string theory and the infinite-dimensional spaces of quantum mechanics. 17 min
  10. 10 A history of the fourth dimension: from Schläfli to Interstellar Two hundred and seventy years of the fourth dimension: an encyclopedist’s aside, Möbius’s mirror, a treatise that waited half a century for print, séance knots, cardboard models, the cubists, Dalí’s tesseract and the black hole of Interstellar. 18 min
  11. 11 How the showcase is drawn The showcase’s engine room, for programmers: a polytope from vertices and normals, one formula for every lens, tubes bent by the GPU, and ray marching four-dimensional bodies inside a three-dimensional slice. 20 min

How it is made

Everything runs in the browser: the vertices and faces of the polytopes are built from their duals, rotation and projection happen in GPU shaders, and the edge tubes bend along circular arcs right on the graphics card. The full story is in the blog post, the short one in the last chapter of the guide.