At every timestep, one grain is dropped on a uniformly random active cell, then the grid relaxes. A cell \(\mathbf{x}\) is unstable when its drop to the lowest 8-neighbor exceeds the critical slope \(S_c\):
\[ h(\mathbf{x}, t) \;-\; \min_{\mathbf{y} \in \mathcal{N}_8(\mathbf{x})} h(\mathbf{y}, t) \;\;\geq\;\; S_c . \]When an unstable cell topples, a fixed amount \(\varepsilon\) is subtracted from it and discarded from the system. There is no redistribution to neighbors:
\[ h(\mathbf{x}, t^{+}) \;=\; h(\mathbf{x}, t) \;-\; \varepsilon . \]Below, the left panel shows topography. Each cell carries an integer height \(h(\mathbf{x}, t)\), and lighter colors represent taller values. The right panel is a D8 flow accumulation, so the color counts how many upstream cells drain through each point. Darker color means more.
Even though the simulation is non-conservative (no materials move between cells), the topography still produces somewhat stable and organized drainage networks.