About This Tool
Falling Sand is an interactive particle simulation where you spawn grains of sand by clicking or dragging on the canvas. Each grain falls under simulated gravity — moving straight down if the cell below is empty, or sliding diagonally left or right to produce the natural piling behaviour of real sand. The colour of each grain slowly cycles through the full HSL colour wheel as you draw, so your dunes shift through vivid hues. Use the Brush size to control how many grains you drop at once, and Clear to start fresh.
How to Use
Click anywhere on the canvas to drop sand at that position.
Hold and drag to pour a continuous stream of sand — great for building dunes and walls.
Use the Brush buttons (Small / Medium / Large) to control the size and density of each drop.
Press Pause / Play to freeze the physics while you plan your next structure.
Press Clear to wipe the canvas and start a fresh design with a new colour.
Frequently Asked Questions
How does the sand movement work?
Each grain checks the cell directly below it every frame. If empty, it falls straight down. If blocked, it tries to slide diagonally left or right (randomly choosing which direction to try first). If both diagonals are also blocked the grain stays put.
What controls the colour of the sand?
A base hue advances around the HSL colour wheel with every grain you place. Each new grain gets a hue close to the current base value with a small random offset, so colours shift gradually as you draw.
What does the Brush size change?
Small drops a tight cluster of a few grains per frame. Medium uses a wider radius with more grains. Large produces a broad spray of many grains at once — useful for quickly filling large areas.
Can I build structures?
Yes! Try drawing walls from the sides and pouring sand on top to watch it fill the gap, or build ramps and let sand flow down them. Pausing mid-pour lets you reposition before resuming.