← Ziding Zhang

Keeper's Light

A pen-and-ink lighthouse drawn stroke by stroke in plain JavaScript, no image model.

October 30, 2026 · Project


I saw a post on X: a drawing coming together one stroke at a time. Could we draw one ourselves? No image model. No bitmaps. Just code holding a pen.

So Claude and I built one. A lighthouse at dusk on a rocky islet. About six hundred strokes, laid down in order over thirty-five seconds.

stroke 0 of 0 · hand no. 0

Hit redraw and you get a new hand. Same scene, different wobble. For light done with a renderer instead of a pen, see Relighting a museum photograph.

How it works

The scene is a script of shapes: a tapered tower, a cottage, a jetty, a rowboat. Each shape is resampled every few pixels, nudged sideways by a seeded tremor, and tapered at both ends. Shading is parallel hatching clipped to a polygon. Playback lays down one short segment per frame, with a pen tip drawn on a second canvas.

Have an answer, a counterexample, or a story? See Talk to me for open questions and live trials.

Credits: Ziding Zhang, with Claude (Anthropic), which wrote the drawing code. Prompted by a stroke-by-stroke drawing posted on X by Garrett Petersen.