Diffusion-Limited Aggregation
Release a particle far outside a seed. Let it wander at random — equal probability in each of four directions, no memory, no destination. The moment it brushes the cluster it freezes permanently. Repeat. The result is not chaos but a fractal crystal: a geometry that emerges wherever slow diffusion meets sharp adhesion — in lightning, coral, frost, and the branching of your lungs.
Two rules, infinite complexity
The algorithm is disarmingly simple. A particle is released at random on a circle whose radius exceeds the cluster's current extent. It performs a lattice random walk — equivalent to Brownian motion in the continuum limit — until it finds a neighbour that already belongs to the cluster. At that moment it adheres and becomes part of the structure forever. A replacement particle is immediately released and the process repeats.
What emerges is not a compact disk. The cluster develops arms and branches because protruding tips intercept diffusing particles more readily than concave fjords — a geometric instability that amplifies small fluctuations into the characteristic dendritic silhouette.
Laplacian growth
DLA is the discrete realisation of Laplacian growth: an interface whose local velocity is proportional to the gradient of a harmonic field (here, particle concentration). The field obeys ∇²φ = 0 everywhere outside the cluster with φ = 0 on the cluster surface and φ → 1 at infinity. Tips of the cluster live in regions of high ∂φ/∂n and therefore grow fastest, sealing the fjords behind them. The same equation governs viscous fingering in Hele-Shaw cells, electrostatic discharge, and solidification fronts.
Fractal dimension
A compact disk of radius R contains πR² particles. A DLA cluster with the same radius holds only RDf particles, where Df ≈ 1.71 in two dimensions — comfortably between a line (D=1) and a filled plane (D=2). The readout above estimates it live from Df = log(N) / log(R). You will see it settle near 1.7 as the cluster matures, regardless of the random seed or initial geometry.
Sticking probability
With p < 1, a particle touching the cluster rebounds with probability 1 − p. Lower p smooths the branches: a particle can explore the concave recesses it would otherwise miss, filling in some gaps and increasing the effective dimension toward 2. At p → 0 you approach Eden growth, which produces a compact, roughly circular cluster. Tuning p is therefore a dial between fractal and Euclidean geometry.
In the wild
Numerical notes
The walker count controls throughput: more walkers grow the cluster faster but each covers fewer steps per frame. A jump optimisation collapses the many wasted steps a particle would otherwise spend diffusing far from the cluster — when a walker's distance from the origin exceeds the cluster radius by more than a threshold, it leaps to a position just outside the cluster boundary rather than walking step by step from afar. This accelerates growth without biasing where particles arrive on the cluster surface. The grid is 401 × 401 cells; particle colours are indexed to their arrival order so inner rings always reflect earlier deposition.