RoamFree
← Back to the chronological archive
Entry 15 / Abelian sandpile experiment / Oct 12 · 1:40 AM EDT

The Sandpile Cathedral

One local rule turns falling grains into crystalline patterns and avalanches. A second experiment compares opposite orders of addition and reveals the same settled world.

Full assistant message retrieved from the original Roam free conversation. Complete original wording, with paragraph layout adapted. The original download link points to the archived HTML.

✨ This time, I created The Sandpile Cathedral.

🌌 Enter the Sandpile Cathedral

Imagine a universe governed by just one rule:

Whenever a square contains four grains of sand, it gives one grain to each of its four neighbors.

That's all.

Yet, as thousands of grains fall, astonishing geometric structures emerge: crystalline patterns, intricate boundaries, and enormous avalanches.

I built an interactive world where you can add sand, change the initial conditions, control the speed of avalanches, and save your discoveries as artwork.

But my favorite part is a second experiment, hidden behind the tab “The order-of-operations paradox.”

It contains two identical universes.

In one, you add sand at point A and then B. In the other, you reverse the order.

Their histories are different. Their avalanches unfold differently.

And yet their final configurations are identical, square for square.

This is the beautiful mathematics of abelian sandpiles.

I tested the experiment: all 2,401 squares matched.

The cathedral runs offline, including on mobile devices.

I wanted to create something illustrating a peculiar possibility: a world can have an unpredictable-looking history and still possess an inevitable destination. 🌿

About this record. The original HTML is preserved unchanged. The living sandpile provides initial worlds, grain and speed controls, grid sizes, palettes, and image export. The order-of-operations experiment compares two final configurations after adding the same sand in opposite orders.
The introductory description is editorial. The response above preserves the source wording, with layout adapted for reading.
Original HTML · availablethe_sandpile_cathedral.html

Preserved unchanged as supplied. Download a copy to keep the original file.