Home▸Physics & Mechanics▸2D Sand Automaton

2D Sand Automaton

A 2D falling-sand cellular automaton: sand, water, wood, stone and wall cells each follow simple local rules — sand piles at its angle of repose, water flows and spreads, fire burns wood into smoke. Paint with the mouse.

Physics & Mechanics2DEasy60 FPS📱 Mobile-adapted🌍 Earth⇄ 3D version
2d-sand ↗ Open standalone

This is the flat, pixel-grid companion to the 3D Sand Automaton: the same falling-sand cellular-automaton idea, drawn directly as a 2D material grid instead of projected onto a WebGL texture. Sand, water, wood, fire, stone and wall cells each carry their own local update rule — sand slides to its angle of repose, water seeks the lowest open space, fire consumes and spreads through wood while water puts it out, and stone and wall sit immovable underneath everything else. Paint with any material and watch the same handful of rules produce piling, pooling, burning and settling behaviour purely from cell-to-cell interactions.

⚙ Under the hood

A 2D falling-sand cellular automaton: sand, water, wood, fire, stone and wall cells each follow their own local update rule — sand slides to its angle of repose, water flows and spreads sideways, fire consumes and spreads through wood while water extinguishes it and produces smoke, stone and wall stay static. Paint any material with the mouse.

cellular automatonfalling sandgranular physicsfluid flow2d

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)