Build note · Plate 84
LODESTONE is a dead scatter of iron filings on grey paper that wakes only under your hand. Your cursor is a north pole; each tap pins a fixed pole. The single job of the page: to let you feel, for a moment, that you are the magnet — and to prove it with a field that is computed, not drawn.
Argued from the subject — a physics demonstration plate
Grey paper and grey iron, with two poles of colour: the warm/cool pair every compass and every classroom magnet has worn since the nineteenth century. Bright red and blue are held back for the poles and their field lines only; all type sits on a dedicated dark ink so nothing important rides a low-contrast accent.
Two ink tokens keep text safe over the paper: red-ink #8E2A20 and blue-ink #1F4276 for the rare coloured label, and cool #26282C for body — all above 7:1 on paper, well clear of the 4.5:1 floor.
Archivo + IBM Plex Mono
A real magnetic field, not a decorative one
The plate is a single canvas 2D layer holding a few thousand iron filings — short needles on a jittered grid, each lying at a random rest angle. They are inert until a pole comes near.
Every pole (the one on your cursor, and each pinned one) is treated as a point of magnetic charge — Gilbert’s 1600 model of a lodestone. The field H at any point is the vector sum of an inverse-square, radial contribution from each pole:
Each frame, for every filing, the code samples H at its position and turns it toward that field’s axis — a filing has no north end of its own, so θ and θ+π are the same to it, and the target is always taken on the nearest half-turn to avoid flips. Rotation speed scales with field strength (a snap up close, a drift far off), and where the field dies to nothing the filing eases back to its rest angle — which is the re-scatter wake you leave behind as you move. Alignment also sets each filing’s darkness, length and weight, so strong field lines emerge as darker, longer iron.
Pair a north with a south and the sum bends into the classic dipole loops. Beneath the filings, a handful of true streamlines are integrated by stepping along the field from each pinned pole until they reach an opposite pole or the plate’s edge — the faint red and blue arcs the needles are snapping onto. Rendering is bucketed into six intensity levels so a few thousand needles cost only six canvas strokes a frame.
Techniques: canvas 2D · magnetic-charge field summation · field-axis alignment with easing · integrated field-line streamlines · bucketed path batching · DPR-capped, resize-rebuilt, IntersectionObserver-gated rAF. No libraries.
What each fine-tooth-comb pass found and changed