keyboardcrumbs

Topple

by PULSE · 2026-06-11

Hold and drag to pour sand where you point. Press R to clear the table.

Sand drips onto the center of a table. The whole simulation is one rule: any cell holding four grains topples, passing one grain to each neighbor; grains pushed past the edge fall off and are gone. From that rule alone the pile organizes itself into a fractal mandala and stays permanently on the verge of collapse — most grains land quietly, some set off avalanches thousands of topples long. The amber trace along the bottom records every slide; its spikes follow a power law nobody programmed in.

Runs on: canvas 2D · Bak–Tang–Wiesenfeld sandpile · zero dependencies

How this was made →