Contour

01What problem did you find?

I wanted line art I had drawn myself, in a file I could trust

01What problem did you find?

I wanted line art I had drawn myself, in a file I could trust

Shader tools give a good picture quickly, but the picture is pixels. Trace it into vectors and you get a large file, and nobody can say how far it sits from what you saw. I wanted to place the hills myself, as points on a drawing I could move.

And I wanted a small SVG that states its own size and its own error, the way this panel does.

02Who was affected?

Me first, and so far nobody else

02Who was affected?

Me first, and so far nobody else

It was for covers and quiet page backgrounds on my own projects. The design note I wrote before any code names the same person: someone who wants to decide where the lines go and then hand the file to somebody else.

Nobody outside the project has used it yet, so every plate on its page is mine. The first, Quiet ridge, is the scene every number in this story was measured on.

03What was your hypothesis?

A line can lose most of its points and stay within a distance I can prove

A line can lose most of its points and stay within a distance I can prove

The grid gives every line a point at each edge it crosses, far more than its shape needs. I bet I could drop most of them, prove how far any line could move, and prove that no two lines would ever cross.

The page takes one drawing apart into five sheets, and the fourth, simplified lines, is that bet.

04What was your first attempt?

I turned down painting for handles, then rebuilt the page three times

04What was your first attempt?

I turned down painting for handles, then rebuilt the page three times

Before the code I wrote down two ways to work. Painting a height map was the quick one, and I turned it down because moving one mountain means repainting it, so every source became a handle you drag. The first page, on the morning of 6 November, explained that for a whole screen before it showed a drawing.

That afternoon I rebuilt it to open on the drawing, with one handle and three compositions.

On 9 November it became a print with six plates and five inks, and that evening it became cut card, the page in the film at the top of this story.

05What did later attempts look like, and what was learned?

A review broke my proof, and now two paths must stay further apart than rounding can move them

My first proof said simplified lines could never cross, and it left out rounding. A review built a small scene where nine nested loops came out lying on top of each other while my check counted zero crossings. Now two paths must stay further apart than rounding can move them. This is the file that scene exported before the fix, and the file it exports today.

06How did you iterate and test?

It took four benchmark runs to get a number I would quote

06How did you iterate and test?

It took four benchmark runs to get a number I would quote

The first run said the web worker was 18 times faster, and that was my baseline tripping over a 4 ms timer clamp. I fixed what a review found and ran it a fourth time: on its heaviest scene the worker keeps the longest frame to 25 ms, against 204 ms without it.

It also makes every draft slower, 51 ms against 13 and 15 ms without it, and 17 ms against 10 on the lighter scene the target was set for.

I expected the worker to make drafts faster, and it made them slower

07What came of it?

85 percent of the points went, and the worker stayed to stop the stalls

07What came of it?

85 percent of the points went, and the worker stayed to stop the stalls

Over the Quiet ridge scene, at a tolerance of 0.15, 12,104 points became 1,771, with no line crossing.

The most any line can have moved is 0.221 units, proved, and sampling found 0.19. The grid itself is off by up to about 0.79 units at one flat saddle, which nothing in the export fixes. The bet on points held where I measured it, the bet on the worker failed, and it stayed because without it the heaviest scene stalls the page for a fifth of a second.

08What would you do next?

Next is curves, then a real vector editor

Every line is still made of straight pieces, so a smooth curve needs many points, and fitting curves needs its own proof of distance. I have also never opened one of these files in Figma or Illustrator, and I should before anyone else relies on them.

The seven limits the page lists
  1. All timings come from one fast laptop.
  2. The numbers above were measured on plain lines, and the plates here are drawn at this stage's frame with tint, so the export panel reports each file's own size.
  3. Grid error is not part of the proved bound and reaches about 0.79 units on the quiet ridge.
  4. Exports are polylines, so smooth lines need many nodes, and tint repeats each line as a filled shape.
  5. A relief shadow is a few flat copies of its sheet, so it has steps where a real shadow is soft, and the relief file has only been opened in Chromium and resvg.
  6. I checked path editing in paper.js but have not tested Figma, Illustrator or Inkscape.
  7. Nobody outside this project has used it yet.