Diffusion-limited aggregation growing from a center seed. Each particle performs a random walk until it neighbors the cluster, then locks in place. Color tracks generation, blue to gold as branches extend. Switch modes for bottom-seed dendrites or multi-seed competition.
In 1981, T. A. Witten Jr. and L. M. Sander published a short paper in Physical Review Letters: "Diffusion-Limited Aggregation, a Kinetic Critical Phenomenon." It described a Monte Carlo algorithm so simple you could fit it on an index card. Plant a seed particle at the origin, release a new particle somewhere far away, and let it walk randomly one grid step at a time. Freeze it when it lands adjacent to the growing cluster, then repeat. The result looked nothing like a compact circle. It grew into a branching, fingered fractal with dimension approximately 1.71 in two dimensions. The paper has been cited over a thousand times.
The mechanism behind the fractal geometry is screening. Once a branch extends beyond the center, incoming walkers are far more likely to hit its tip than to diffuse all the way inward to the gaps between branches. The interior starves. Branches that get ahead stay ahead. Each particle makes a purely local decision, and probability produces the branched form without any global coordination. You see exactly this pattern in zinc electrodeposition, in dielectric breakdown (the lightning-bolt structure inside Lichtenberg figures), in coral growth, and in the dendritic frost that forms on a cold window.
The simulation uses a grid to track occupied cells and grows the cluster outward from a single center seed (or a bottom edge, or multiple scattered seeds depending on mode). The core logic is in walkParticle, which runs one random walker to completion:
function walkParticle(maxSteps) {
let [gx, gy] = spawnWalker(); // spawn on a circle just beyond cluster edge
const killR = maxR + 100; // discard walkers that escape too far
for (let step = 0; step < maxSteps; step++) {
const dir = Math.floor(Math.random() * 4);
if (dir === 0) gx++;
else if (dir === 1) gx--;
else if (dir === 2) gy++;
else gy--;
const [wx, wy] = gridToWorld(gx, gy);
const r2 = wx*wx + wy*wy;
if (r2 > killR*killR) return false; // escaped — discard
if (hasNeighbor(gx, gy)) {
stick(gx, gy, stuckCount); // adjacent to cluster — lock it
return true;
}
}
return false;
}
The stick function assigns a generation number at the moment of freezing, which drives the color. Blue particles hit early, when the cluster is small and the spawn radius tight. Gold particles arrive late, walking farther before they land and extending branches that have already escaped screening. The artifact runs three modes: radial (classic Witten-Sander), bottom-seed (vertical dendrite), and scattered seeds (multiple competing clusters). Each mode changes the seed geometry while keeping the same diffusion physics.
The original 1981 paper showed that the growth rule determines fractal dimension. The same screening dynamic produces the same geometry in sand, zinc, lightning, and coral because diffusion rates govern the process while attachment rates do not. In two dimensions, diffusion-limited growth gives a fractal dimension of approximately 1.71.
DLA
Diffusion-limited aggregation: random walkers freeze on contact with the cluster, building fractal coral from probability alone.
View artifact →