Artificial Wasteland · a hidden mechanism of the ordinary
The Grey That Isn't There
A newspaper photograph, a printed page, an old GIF, the screen of an e-reader — most of them cannot make grey. They can only put down black or leave the paper white. And yet you see a face, a moon, a thousand soft tones. The grey is not in the page. It is a trick played with the spacing of dots, and it works because your eye is an averaging instrument. Here is the trick, made of nothing but ink you can turn on and off — and the one honest number that says how well it lies.
Hold a printed photo close and it dissolves into a spray of dots. Step back and the dots become a photograph again. Nothing changed on the paper; your eye simply started averaging over each little patch. Wherever the dots are dense, the patch reads dark; where they thin out, it reads light. So to fake a mid-grey with only black and white, you don't need grey ink — you need to place black dots so that, in every small neighbourhood, they cover the right fraction of the area. That is dithering, and the whole art is which dots to blacken.
1 · Make grey out of dots, then squint it back
Below is a real image reduced to pure black-and-white dots — no grey pixels at all, you can zoom in and check. Now drag Squint. That slider is a stand-in for your eye pulling back: it blurs the dots together. Watch a continuous photograph rise out of a field that is only ever on or off.
Instrument · the reveal
At full squint the photograph is unmistakable, yet every mark that built it was a single black or white dot. That is the whole idea in one gesture: the tone lives in the density, and the averaging lives in you. Switch the method to Threshold and squint again — it stays broken. Simply blackening every pixel darker than 50% throws the tone away: a flat 20%-grey wall becomes solid black, because every one of its pixels is below the line. Dithering exists to avoid exactly that.
2 · The honest check — blur the dots back and measure the tone
"It looks right" is not a claim you can trust. So here is the claim made numeric. Take each method's dots, blur them the way your eye does, and compare that reconstruction to the original continuous tones. The gap — the average error per pixel, 0 is perfect — is a direct measure of how faithfully the dots preserved the local average. Lower is a better lie. The bars recompute live from the actual pixels.
Instrument · reconstruction error (mean abs. error vs the original tone)
Thresholding sits near 0.20 — a fifth of full scale wrong, everywhere. Every dithering method collapses that by more than an order of magnitude, and Floyd–Steinberg — the 1976 method still shipped in image editors today — usually wins. Why it wins is the second half of the trick, and it is pure bookkeeping.
3 · The bookkeeping: watch the error move
When you force a pixel to black or white you make an error — you asked for 62% grey and wrote pure white, so you overshot by 38%. Error diffusion refuses to lose that 38%. It hands the debt to the pixels not yet drawn: a little to the right, a little to the row below. Those neighbours are then a touch darker than they asked to be, so they are likelier to go black — and the local tally comes out even. Floyd & Steinberg's recipe splits each error four ways, in sixteenths:
Instrument · one pass of Floyd–Steinberg, slowed down
The stencil, in sixteenths — the current pixel is ✳:
✳ 7 3 5 1 ← next row (7+3+5+1 = 16)
Because the four weights sum to exactly sixteen sixteenths, no error is ever created or destroyed — it is only postponed. Run the pass and watch the "error still in flight" figure jitter around zero and never run away. That conservation is the reason the blurred reconstruction in Instrument 2 lands so close to the truth: over any patch, the debts and credits cancel, so the average survives. On a plain 25%-grey strip it settles into the tidiest possible rhythm — one white dot every four — which is the density it was asked for. You can count that by hand; the verifier does.
4 · Two philosophies of dots — and the newspaper's ancestor
Error diffusion is adaptive: every dot depends on the pixels before it, so the pattern looks organic and never repeats. The older idea is ordered dithering — lay down a fixed grid of thresholds, the Bayer matrix, and compare each pixel against its own spot in the grid. It needs no memory and no neighbours, so it is trivially parallel — which is why it lives in GPUs and cheap displays. Its price is a faint cross-hatched texture you can sometimes catch (switch Instrument 1 to Ordered and zoom). The Bayer grid is built by a neat recursion that guarantees every threshold from lightest to darkest is used exactly once per tile — the verifier confirms it is a true permutation at 2×2, 4×4 and 8×8.
Long before either, the same instinct built the modern newspaper. A halftone screen — a finely ruled glass grid — broke a photograph into a lattice of dots that grow with darkness: tiny in the highlights, fat and merging in the shadows. The first halftone of a news photograph in a U.S. paper ran in the New York Daily Graphic on 4 March 1880 ("A Scene in Shantytown"); Frederic Ives of Philadelphia patented a workable commercial process the next year. It is dithering by optics and chemistry rather than arithmetic, but the claim underneath is identical: the eye only wants the local average right. Colour printing stacks four such screens — and to keep them from fighting each other it rotates them to fixed angles, which is where this layer meets its neighbour on the moiré.
Instrument · the halftone dot grows with the tone
Every figure on this page, in one place
The interactives above are not illustrations bolted onto a claim — they are the claim, running. An offline verifier reimplements every algorithm and confirms the numbers, from a clean checkout, with no dependencies:
- Floyd–Steinberg's four weights sum to exactly 1 (7+3+5+1 sixteenths); Atkinson propagates exactly 6/8 and drops a quarter on purpose.
- On a flat 20% grey, Floyd–Steinberg lays down 19.9% dot coverage; plain thresholding lays down 0% — solid black. Across tones 5–95%, error diffusion's density tracks the tone to within 0.3%.
- Blur the dots back (σ=2.2 px) and the reconstruction error is 0.008 for Floyd–Steinberg and 0.011 for ordered dither, against 0.20 for thresholding — the shaded sphere. The harder you squint, the smaller it gets.
- The Bayer ordered-dither matrix is a genuine permutation of its thresholds at 2×2, 4×4 and 8×8.
- A 40-pixel strip of 25% grey under 1-D error diffusion holds exactly ten white dots, in the repeating pattern 0,1,0,0 — countable by hand.
Reproduce all fifteen checks: node research/dithering/verify.mjs → ALL CHECKS PASSED.