SARATH THARAYILST
WRITEUPSCONCEPTSPROJECTSLABABOUT
SARATH THARAYIL
മ
IGARATIPO: AMAZON TRIBUTARIES
/ SYSTEM

Building thoughtful software, writing notes, and shipping experiments across data, AI, and the web.

No cookies, no tracking. Preferences are stored locally in your browser. Anonymous view counts are kept server-side.

Hey, there's a story for the river above/© 2026 Sarath Tharayil/IST --:--:--
← LAB

Falling Sand

Jun 6, 2026

A pixel grid where each cell follows one simple rule. Sand falls and piles. Water flows around obstacles and fills hollows. Fire spreads to wood and rises as smoke. Stone never moves. Five materials, a handful of rules, endless scenarios.

DRAW
|
BRUSH3

Click and drag to draw. Build a stone bowl, fill it with water, then drop sand in.

/ NOTES
HOW IT WORKS

The grid is updated bottom-to-top each frame so falling particles never skip cells. Each material checks its neighbours and swaps if the rules allow. Randomised left/right checks break symmetry and produce natural-looking avalanches and flows.

MATERIALS
SandFalls straight down. Slides diagonally if blocked. Piles at the angle of repose.
WaterFalls and flows sideways to find the lowest point.
StoneImmovable. Use it to build walls and containers.
WoodStatic and flammable. Burns when adjacent to fire.
FireSpreads to adjacent wood, rises, and becomes smoke.
SmokeDrifts upward and slowly dissipates.
WHAT TO TRY

Draw a stone bowl, fill it with water, then add sand to watch it sink. Build a wood tower, touch it with fire, and watch the smoke fill the top. Use a large brush for fast scene building.