An experiment in mathematical emergence
An interactive mathematical artwork · No. 11

The Sandpile Cathedral

A grain of sand has no imagination. But let enough grains fall, and geometry appears where no one drew it. Touch the world. Watch it rearrange itself.

A world made of four numbers
Each square holds 0, 1, 2, or 3 grains after settling.
Avalanche in motion
Touch the world to drop more sand ✦
—
grains remaining
—
total topplings
—
grains escaped
—
unstable squares

An improbable claim: add sand at A, then B; or add it at B, then A. Every intermediate avalanche looks different—but after everything settles, the two worlds will be identical, square for square.

Universe α

First A, then B
Waiting
Nothing has fallen yet.

Universe β

First B, then A
Waiting
Nothing has fallen yet.
Ready to test a theorem with thousands of grains.

Why this is not a coincidence

A toppling at site x changes the height configuration by the fixed vector −4δx + ∑y∼xδy, with grains outside the world discarded. These changes add commutatively. The less obvious part is that every legal sequence of topplings terminates in the same stable configuration: the abelian sandpile theorem (often proved using a least-action argument). Because adding grains at A and B also commutes, the two final configurations must match, regardless of which avalanches happened first.

This is a genuine theorem, not a trick of the animation. The experiment compares every square, not just their total mass. The finite open boundary acts as a sink, ensuring stabilization.

A simple local rule; a global invariant. The model was introduced by Bak, Tang and Wiesenfeld (1987) in work on self-organized criticality. Its abelian structure was developed by Dhar.