Fill each site of an L × L grid independently with probability p. Around pc ≈ 0.5927 a single cluster first stretches from the top edge to the bottom, and every quantity you can measure turns into a power law with universal exponents. Drag p to watch the transition, then let the simulation measure the exponents and test the relations between them.
Based on lecture notes by Sang Hoon Lee, following K. Christensen and N. R. Moloney, Complexity and Criticality (2005). References
Every site keeps the same random number, so raising p only ever adds sites and you see clusters merge.
A second simulation adds sites one at a time in random order (the Newman–Ziff method), so a single run gives every p at once. It repeats this for four lattice sizes and averages; add L = 256 for sharper exponents if your device can handle it. The spanning probability R and the largest-cluster share P play the role of order parameters; χ and ξ are the “susceptibility” and correlation length, and both peak at the threshold. Click any chart to move p.
Right at the threshold nothing sets a length scale except the lattice itself, so every quantity scales as a power of L. Slopes on these log–log plots give the exponent ratios directly. The cluster-size distribution ns comes from separate periodic 256 × 256 lattices filled at pc.
The exponents are not independent. Hyperscaling ties them to the dimension d = 2, and the cluster-number exponent τ links to the fractal dimension. Here each relation is checked with numbers measured independently above; small mismatches come from finite sizes and sampling noise, and they shrink as you add samples.
✓ (green): the two sides agree within 3% of the exact value. ✗ (red): they differ by more than 10%.
If finite-size scaling holds, QL(p) = L−a f((p − pc) L1/ν) for one function f. Rescale the axes and the curves should fall onto a single line only when pc, 1/ν and a are right. Try moving the sliders away from the correct values to see how sensitive it is.
The vertical axis plots La·Q, so for P the exponent a is β/ν and for χ it is −γ/ν.
The cluster numbers ns and the order parameter P∞ only count how big clusters are; they say nothing about shape. To see the geometry, mark out square windows of side ℓ around sites of the percolating cluster and count how many of its sites fall inside, M(p;ℓ). At pc this mass grows as ℓD with the fractal dimension D = 91/48 ≈ 1.90, smaller than d = 2. The density P(p;ℓ) = M/ℓd ∝ ℓD−d therefore keeps falling as the window grows, which is how P∞(pc) = 0 even though a spanning cluster exists. These panels use their own 512 × 512 lattice and follow the p slider at the top of the page.
Preparing the 512 × 512 lattice…
The same two relations, D = 1/(σν) from sξ ∝ ξD and the hyperscaling relation D − d = −β/ν from the mass of the percolating cluster, can be checked in other geometries. On the Bethe lattice the number of sites within distance ℓ grows exponentially rather than as ℓd, so it behaves like infinite dimension, and hyperscaling then points to d = 6, the upper critical dimension. In one dimension P∞ jumps from 0 to 1 at pc = 1, so the transition is not critical in the strict sense, but the relations still hold with β = 0.
A classic way to solve a problem is to find its characteristic scale and break it into smaller, uncorrelated pieces. Away from pc that scale is ξ. At pc there is none, since ξ → ∞, but the system is self-similar, and the renormalization group (Kenneth Wilson, Nobel Prize 1982) turns that into a method. Rescaling every length by b > 1 sends ξ ↦ ξ/b. The only states left unchanged are ξ = 0, the empty and full lattices at p = 0 and 1, and ξ = ∞ at pc. These are the fixed points of the rescaling: 0 and 1 attract, while pc repels.
The exact rescaling Tb(p) would give ν = log b / log Tb′(pc), but Tb is unknown. Since ν is set by large-scale behavior, fluctuations smaller than b can be smeared out. The real-space RG transformation Rb does this in three steps: (a) divide the lattice into blocks of side b, (b) replace each block by one site occupied with probability Rb(p) according to a rule, and (c) shrink all lengths by b. Its fixed point Rb(p*) = p* approximates pc, and ν ≈ log b / log Rb′(p*).
Coarse-graining throws information away. A 3 × 3 block has 29 = 512 configurations but becomes one site with 2, and in general N sites become N/bd, so the step cannot be undone. Strictly the transformations form a semigroup, not a group. The approximation also truncates parameter space. Two blocks can be linked in the original lattice yet end up only diagonally adjacent after coarse-graining. Keeping every connection would need next-nearest-neighbor bonds, then ever longer ones, an infinite set of parameters {p}, and the rules above keep only p. That is why p* ≠ pc and ν is only approximate on the square lattice. The chain needs no truncation and is exact, the triangular rule happens to hit pc = 1/2 exactly, and larger blocks (the last table) close the gap.
The fractal-geometry and renormalization sections follow lecture notes by Sang Hoon Lee, which are based on the key reference below.
Key reference. K. Christensen and N. R. Moloney, Complexity and Criticality, Imperial College Press, London (2005). Chapter 1 covers percolation, including cluster numbers, the order parameter, fractal geometry, finite-size scaling and real-space renormalization; Appendices C and D cover homogeneous functions and fractals.