Draw with sand, water and walls and watch them obey a few local rules. A grain of sand falls straight down if it can, and otherwise slides down to either side; it sinks through water. A drop of water falls, slides diagonally, and spreads sideways until it levels out. Walls never move. Click or drag to draw with the chosen brush, tick Pour sand or Pour water for a steady stream from the top, and press Play.
Every cell looks only at the cells just below and beside it, and each grain or drop moves at most once a step, so this really is a cellular automaton, only with a more physical flavor than Life. Sand pours into a pile with a natural slope of about 45 degrees because it can slide down one cell sideways but no further. Water here is simply sand that also moves sideways, so it fills pools evenly but never builds pressure. Build a basin out of walls and fill it, or drop sand into a pool.
This page was created with Claude Code.