A photograph becomes a scalar field. Contours are cut through it at many levels, each line coloured by the source underneath it and quantised to a handful of pens. On a black ground the pen labels a region rather than reproducing it, which is why a dark muddy red and a bright red land on the same pen.
Smoothing fixes the character of the line — low keeps texture as small closed loops, high gives long flowing bands. Ink coverage fixes how much of the sheet ends up covered. The number of levels is solved from the pair, because line density is not something you can control by picking a level count:
Adjacent contours sit Δ/|∇F| apart. On a high-frequency source the field crosses a level every pixel or two no matter how few levels you ask for, and the plot floods solid.
The coarea formula makes it exact. The total length of all level sets spaced Δ = 1/N apart is N·∫|∇F|dA, so in output units
coverage = N · mean|∇F| · stroke / scale
which inverts to give N. A bigger sheet holds more lines, so N scales with output size, not with the resolution of the field.
The engine on this page is a port of a Python implementation, and it is checked against it: on a test frame every one of 30,801 contour vertices matches its Python twin to within 0.0014 pixels, and pen assignment agrees exactly. Nothing is uploaded — your photo is decoded, contoured and drawn entirely in this tab.
The animation is not a video. It is the same geometry the exporter uses, stroked onto a canvas in order, paced by cumulative ink so it advances at a steady visual rate. Plotter order is the travel-optimised sequence a real pen plotter would use — greedy nearest-neighbour over path endpoints, which cuts pen-up travel by 20–30×.
Sources marked synthetic are generated procedurally, so the site ships no licensed photography.