A month's report, its charts drawn in curves

The monthly report of a print shop says where the hours went, how far into the year the work has come, and how orders moved week by week. Those figures usually arrive as pictures pasted onto the page: fine on a screen, blurred the moment somebody prints it or looks closer.

Here the document draws them itself. A page describes straight segments and curves, so every shape has to be named in those terms: a centre and a radius, two angles, three points to pass through. Working that out by hand is a morning of trigonometry for each chart, and it is exactly the morning nobody has, which is why the pictures get pasted in instead.

What this example shows

  • A pie whose every slice is one arc shut by two straight sides.
  • A ring gauge, a card with eased corners, a line whose turns are rounded.
  • Traced by the reading software, sharp at every size, for the weight of a sentence.

The source code, complete

Nothing is left out and nothing is simplified: this is the program exactly as it runs, for the developer who uses this library. The third is the description itself: a plain list of what the page has to say, which is what the service is sent.

Read the Rust source Read the Python source Read the JSON source

The document itself

Open the document in English Open the document in French

Examples near this one

Cutting out what you draw

The same area of stripes shown through two windows: a plain disc, and a ring whose middle is left bare.

Transparency and blend modes

Half-transparent fills that overlap and mix, one orange square laid over a blue bar in four different ways of mixing colours, and a line of overlapping letters painted two ways.

Gradients in a line, in a circle, and read from a function

Five panels: a header that fades out, the same fade on the diagonal, a glow carried past its own circle so the corners fill, a blend that goes by way of a third colour, and a checkerboard whose colour is worked out from where each point stands, redder to the right and greener towards the top.

Four kinds of mesh, every corner its own colour

Six triangles round a centre they share, their edges stroked over the paint; a lattice of points in the four printing inks; a patch whose four sides are curves; and the same patch pulled about by four points inside it.

Every example, by subject