Cellular Automata Physics and Granular Dynamics
The Falling Sand simulation is built upon a 2D cellular automaton model where every grid cell computes density, friction, and discrete particle states independently in real time.
Unlike rigid solids or continuous fluids, granular media behave uniquely: they sustain stress like solids when stationary, yet flow like fluids when agitated. The algorithm evaluates local neighbor cells each tick to simulate the natural angle of repose, directing grains down and diagonally when obstructed.
By introducing multiple interacting substances such as sand, water, and barriers, the engine resolves bouyancy, gravity vectors, and phase interactions directly in browser memory.
How to Interact and Experiment
- Click and drag across the canvas to emit streams of particles into the grid.
- Select different elements to test how fluid and granular particles interact under gravity.
- Adjust the brush radius to construct intricate funnels, dams, and multi-element cascades.
Real-World and Computational Applications
Granular flow simulations are widely used in geotechnical disaster modeling (avalanches and landslides), pharmaceutical powder mixing, and procedural physics engines in modern video games.