Canvas 2D · no libraries

The picture

The start page is a picture of Cologne that paints itself: stroke by stroke, in the weather of this moment, with the Rhine as high as it stands right now. No video, no photo, no library. A good 1,500 lines of JavaScript on a canvas.

Three tools

Everything in the picture is painted with three tools, from the sky to the signature. Here is a bare sheet, pick them up.

Drag across the sheet with the mouse or a finger.

A bundle of thin lines side by side. Some bristles miss the paper, so the stroke stays dry and streaky. The sky, the water and the meadow are made of it.

How a stroke knows what it paints

There is no template and there are no layers. For any point the picture can say what stands there: sky, hill, house, cathedral, water, meadow, leaves, trunk or steel. A stroke lands somewhere, asks, takes the colour and direction of its material and runs only as far as that reaches. The water looks up what stands above it and paints it as a reflection.

First the ground goes over the sheet in broad sweeps. After that, on a large screen, come a good thousand strokes a second, and the picture is never finished: clouds drift, so the sky is painted over again and again.

Cologne as it is right now

Every ten minutes the server asks Open-Meteo for the weather and Pegelonline for the Rhine at the Cologne gauge. The weather code, the temperature, the depth of snow, sunrise and sunset become the picture’s season, weather and time of day.

The gauge changes the bank: at low water gravel falls dry, in flood the meadow stands under water and the Rhine runs brown. From 8.30 m no ship sails, in the picture as in Cologne.

For a good half hour before sunrise and after sunset it is the blue hour: the sky still light and glowing at the horizon, the lights already on. At night the moon is in the sky, in today’s phase and roughly where it stands right now. And the picture knows Cologne’s calendar: strings of lights while the Christmas markets are open, confetti at carnival, fireworks on New Year’s Eve and at the Kölner Lichter.

0 strokes
Measured
The numbers are on their way …
Which makes
summer · sunny · day · Rhine as usual

What moves

Ships, the trains on the Hohenzollern bridge, the gondolas of the cable car, birds, rain and snow lie on a second canvas over the picture. It is wiped and drawn again with every frame, with the same three tools and always the same chance, so the strokes hold still.

Manners

One a day

From the same numbers a picture is made for the archive every day at one. Only the numbers are stored; it is painted on your side.

Das Bild | Leon Schiffer