Pencil

Demos

Every figure in the corpus, drawn live from its source. The corpus is also the project’s test suite, with each figure’s compiled form checked in, and many of its figures were ported from graphs, shaders and blog figures made by other means.

Figures start drawing as they come near the screen. Controls are built from what each figure declares: a play button if anything follows time, a slider for each param, and arrows for beats. Some figures also have handles to drag.

  1. A circle that breathes, its radius swinging a quarter either side of 1.
    001

    A breathing circle

    The smallest figure that exercises the whole path: an implicit curve whose radius follows time, colored on each side of its signed distance. Its second sheet bands both sides by that distance, and not a line of the figure changes.

    circle.pen · circle.style · bands.style

  2. A ring filled warm inside and cool outside, or a sine wave whose stroke widens along its length.
    002

    Strokes

    Two figures for comparing traced strokes with SVG: a fixed circle filled on both sides, and an open wave whose width is an expression of arc length, which an SVG stroke can’t do.

    ring.pen · filled.style · wave.pen · taper.style

  3. A string unwinding from a circle. Its end traces an involute, and the triangle it makes with the center always has the area of the sector swept so far.
    003

    Unwinding a string from a circle

    The end of the string traces an involute, and the triangle it makes with the center always has the area of the sector swept so far. The night sheet restyles the same document.

    unroll.pen · blog.style · night.style

  4. A ruler-and-compass construction of the two boundary Doyle flowers around the circle at 1, one step at a time.
    004

    The two boundary flowers, by ruler and compass

    The two boundary cases of the Doyle spiral, built step by step around one circle at 1. Step through the beats, or drag P.

    bounds.pen · blog.style

  5. A circle and a point P. With P outside the circle, the two tangents from P are drawn. With P inside, the chord through P at right angles to OP is drawn.
    005

    A point and a circle

    With P outside the circle, the two tangents from P. With P inside, the chord through P at right angles to OP. Drag P.

    tangents.pen · theme.style · plain.style · dark.style

  6. z = a + bi is built from a and bi. A copy of z is scaled by a, and another by b and turned 90 degrees by i. Tip to tail they make z squared, at twice the angle and the length squared.
    006

    Squaring z = a + bi

    F.O.I.L. with arrows: a copy of z scaled by a, another scaled by b and turned by i, and tip to tail they make z², at twice the angle and the length squared.

    square.pen · theme.style · plain.style · dark.style

  7. Four linked panels of a lattice triangle: the lattice itself, after the map to log space, after exp as a spiral of circles, and a close-up of the spiral near 1.
    007

    One lattice, through the maps that make a Doyle spiral

    Four linked panels of one lattice triangle: the lattice, its image in log space, after exp as a spiral of circles, and a close-up near 1.

    lattice.pen · theme.style · plain.style · narrow.style · dark.style

  8. Two hearts in bipolar coordinates around the foci at plus and minus 1, over the grid of coordinate circles, with the two circles through a moving point on each.
    008

    Bipolar hearts

    Two hearts in bipolar coordinates around the foci at ±1, over the grid of coordinate circles, with the two circles through a moving point on each. Its second sheet makes every line a light that glows by its distance, and they add where they cross.

    hearts.pen · theme.style · plain.style · dark.style · glow.style

  9. A circle through n and 1 over n with a grid over the square around it, raised to a power that moves from 1 to 2, so the circle morphs into a limaçon.
    009

    The squaring map

    A circle orthogonal to the unit circle, and a grid of lines over the square around it, raised to a power from 1 to 2. The circle becomes a limaçon, and the grid’s lines still cross at right angles, since the map is conformal.

    squaring.pen · theme.style · plain.style · dark.style

  10. Circles at the powers of w, each touching its neighbors, and their image under a Möbius map, where they still touch.
    010

    Coxeter’s loxodromic sequence, through a Möbius map

    Circles at the powers of w, each touching its neighbors, and their image under a Möbius map, where they still touch. When the pole lands on a circle, that circle is a line for a moment.

    mobius.pen · theme.style · plain.style · dark.style

  11. A triangle and the circle through its corners, warm on one side and cool on the other. When the triangle turns over, the circle straightens into a line and comes back the other way round.
    011

    A circumcircle, straightening into a line

    Warm is its negative side. When the three corners line up, the triangle turns over: the circle straightens into a line and comes back the other way round, and that side doesn’t change.

    circumcircle.pen · plain.style

  12. Twenty-four circles through one point, with their centers on a circle, each lit warm on its disk and cool outside it, adding up. The curve they all touch is a limaçon.
    012

    A limaçon, from both sides of its circles

    Every circle passes through one point, with its center on a circle, and each is warm inside and cool outside. They add up, and tanh keeps them in range.

    limacon.pen · plain.style

  13. The one-turn strip of the triangular grid, with rows colored by arm, rolling up into a tube whose seam joins each row to another row of the same arm.
    013

    Rolling the strip into a tube

    The one-turn strip of the grid, with rows colored by arm, rolling up into a tube. Each row runs off the top and comes back in at the bottom as the next row of its arm, so an arm is one line wound around. Its points are in space, and the sheet fades the far side from self.z.

    tube.pen · theme.style · plain.style · dark.style

  14. A log spiral of touching circles. A copy of one circle grows and turns about the spiral’s center until it lands exactly on the next circle.
    014

    A circle of the spiral, scaled and turned

    Multiplying by z grows a circle of a log spiral by |z| and turns it by arg z about the center, which lands it on the next circle. A copy of circle 0 is multiplied by zˢ as s runs from 0 to 1, and each circle’s tick shows the turn.

    scaled-copy.pen · theme.style · plain.style · dark.style

  15. Two number lines: dots at 1, e and e² on the line, and at 0, 1 and 2 after taking the log. A draggable x and its nearest dot on each, with the stretches where they disagree shaded.
    015

    Nearest isn’t nearest after log

    Dots at 1, e and e² on the line are evenly spaced after log, at 0, 1 and 2. Each line marks the dot nearest x by its own distance, and they disagree between e^(n+½) and (eⁿ + eⁿ⁺¹)/2, which is shaded on both. Drag x.

    log-nearest.pen · theme.style · plain.style · dark.style

  16. A strip of circles in log space, one full turn tall, bending into the Doyle spiral as the slider moves from flat to wrapped, with the circle at 1 fixed.
    016

    Unwrapping the spiral

    One slider from the flat strip to the Doyle spiral, through fₜ(u) = (e^(tu) − 1)/t + 1, which keeps 1 fixed. The strip holds one circle of each period, chosen by a whole-number range; the copies a turn above and below fade as it wraps, and the rows along 1 and ω curl into arms.

    unwrap.pen · theme.style · plain.style · dark.style

  17. A Doyle spiral with each circle colored by its arm and each arm’s curve drawn through its circles, beside the same grid flat, where each arm is a straight row.
    017

    Coloring the spiral by arm

    Each circle is colored by which row of the grid it’s on, along ω, 1 or 1 + ω, wrapped around by the number of arms, which is how many rows the period crosses. Each arm’s exact curve runs through its circles, and on the grid each arm is a straight row. Where the rows run along the period they close into rings. The second look adds the period A, which crosses one row of each arm.

    arm-colors.pen · theme.style · plain.style · narrow.style · dark.style · period.style

  18. Left, the circles’ centers in log space colored by arm, with the camera’s view shaded left of a wavy edge that slides as it moves. Right, what the camera sees, over a faint copy of where it started.
    018

    The camera in log space

    A camera at c sees the spiral times e^(−c), so in log space its square screen is a region with a wavy edge that slides by c. Steps of 1 + ω line the circles up with where they started at every whole step, and the arm colors too after p = 2; a pure zoom as far never lines up.

    camera-log.pen · theme.style · plain.style · narrow.style · dark.style

  19. The limaçon built from its central circle, one captioned beat at a time, ending with the circles through 1 lighting up.
    Lab

    Explainer: the limaçon from its central circle

    The first explainer, a draft: beats with captions that build the limaçon from one circle. It’s split into a file for each part of its story, which the element fetches as its use lines ask.

    limacon.pen · theme.style · dark.style · limacon.style · caption.style