How it was made
A quarter-million spins, each flipping a coin against its four neighbours under the Metropolis rule. This page is the field notebook: the physics, the shader, the palette, and the three passes that took it from working to finished.
Ising is a fictional demonstration bench for the two-dimensional Ising model — the simplest system that shows a genuine phase transition. Its single job: let anyone feel the critical point by dragging a temperature slider, and watch a sheet of magnetic spins decide, moment to moment, whether to be a magnet or a fog of noise.
Below the critical temperature Tc = 2.269 one colour conquers and the lattice
locks into a magnet. Above it, thermal chance shreds every pattern into salt-and-pepper. And
exactly at Tc the domains grow to every size at once — critical opalescence — while the
net magnetization collapses through zero. None of this is scripted; it emerges from millions of
independent biased coin-flips.
The bright spin colours are reserved for the lattice and its marks. Every string of copy uses ash-ink or one of the two derived light inks — the split that keeps small text readable over a shimmering field.
Space Grotesk carries the display voice — a grotesque with just enough quirk in its terminals to feel like an instrument panel rather than a corporate sans. Space Mono runs every number: temperature, magnetization, the axis labels. Numbers are the whole story here, so they get a monospace with real character. The pairing shares a designer and a skeleton, so the two faces feel like one system tuned differently.
The lattice is a WebGL2 ping-pong simulation. Spins live in the red channel of an
RGBA8 texture (255 = up, 0 = down) — no float-texture extension needed, so it runs
almost everywhere. Each frame renders a full-screen quad into the opposite framebuffer, running
the Metropolis rule in the fragment shader: read the four neighbours (periodic, via
REPEAT wrap), compute the energy change ΔE = 2·s·Σneighbours, and flip
the spin if ΔE ≤ 0 or a hashed random draw beats exp(−ΔE/T).
Neighbours can't all update at once without racing, so each sub-step updates only one colour of
a checkerboard — parity 0 then 1 — the standard trick for a
correct parallel Ising. Twelve sub-steps run per frame for a lively boil. The net magnetization
is read back with gl.readPixels every eighth frame and plotted against the exact
Onsager order-parameter curve, so the live dot rides a known analytic line straight
through zero at Tc. The display shader lightly smooths the domains and adds a faint glow along
domain walls, which is what makes the critical shimmer read as opalescence rather than noise.
Tc 2.269 tick as a computed percentage on the slider track so it lands exactly on the critical fraction, not an eyeballed guess.document.hidden and resumes on return; DPR is capped at 2 and the canvas resizes to its container.