How it’s made · I

How a book is cut

A hand-coloured plate from 1835 goes in one end. A butterfly that lifts its wings when you scroll comes out the other. This is every step between, shown on one real specimen.

scroll
Plate of H. Lucas, Histoire naturelle des lépidoptères exotiques, Paris 1835. Scan from the Biodiversity Heritage Library.
I

The source

A scan of a whole page arrives, paper and all.

Each plate comes from a library scan: the Biodiversity Heritage Library for Lucas, the Internet Archive for Morris's British Butterflies and British Moths. The page is photographed as it is, with its ruled frame, the engraver's caption, a librarian's pencil number, and a century and a half of foxing.

Nothing is retouched. Everything that follows is arithmetic on these pixels.

Where the paper has gone transparent, the chequered ground shows through. Red flashes are specks the density gate removed.
II

Paper becomes transparency

The page's own colour is measured, and everything that is paper fades away.

paper = median of every pixel
  • Colour distance from paper, then darkness below paper: whichever is larger becomes the ink alpha.
  • A blur measures local ink density; anything below the gate is a speck and is dropped.
  • What remains is the print: pigment and engraved line, with soft edges kept.

The colour that is kept is stored as a ratio to the paper, so on the page it can be multiplied back onto any paper.

every connected blobframe line, erasedkept as a specimen
III

Finding the specimens

Blobs of ink are counted, and the ones that are not butterflies are thrown away.

The alpha is max-pooled four to one and every connected patch of ink is labelled. Then the rules: a long thin run spanning most of a row or column is the frame line and is erased. Blobs that are tiny beside the largest one are specks. Wide, flat blobs are handwriting or scanner bands. Anything in the bottom seventh of the page is caption. Anything touching the scan's edge is not on the plate.

Boxes that overlap are merged, so a detached tail rejoins its swallowtail. Holes inside each survivor are filled to make a silhouette, which is how pale wings survive without becoming lace.

When the rules get it wrong, a hand note in plate-overrides.json drops, merges or splits a component. When a cut is still bad, the specimen is hidden rather than re-cut.

Axis and body band in gilt, first wing row above it. Then the three exported layers, hinged where the wings meet the body.
IV

The rig

Each specimen is split into a body and two wings, so it can be hinged.

A sideways single is turned head-up first: the end with the antennae carries far less ink per row than the abdomen. The symmetry axis starts at the ink's centroid and is refined by sliding a mirror across until left best matches right. The body is a narrow band either side of that axis. Sparse rows above the first dense row are antennae and are given to the body.

The cut is then simple: what lies left of the band is the left wing, right of it the right wing, and the band itself with the antennae is the body.

Values for this specimen: axis at px, body half-width px, wings from row .

    
      
    V

    Export

    Six small images and a manifest, per specimen.

    Each layer is written twice as WebP: the paper-normalised colour, and its alpha. The manifest records where every part sits in plate pixels, the axis, the body half-width, and the paper colour, so the page can put the pieces back exactly where the engraver had them.

    Across the three books this comes to about thirteen thousand files and 120 MB, which is the shape of the site: a static folder on Cloudflare Pages, no server, no database.

    A fourth book would tip past the host's file limit, so it would need atlases or object storage.

    VI

    A name, and a card

    The 1835 caption is matched to a modern name, and the card is assembled from layers of trust.

    The handwritten plate captions key each specimen to its entry in Lucas's text. The 1835 binomial is sent to GBIF for an accepted name, with fuzzy fallbacks inside the genus and then the family. Wikipedia supplies a summary and a wingspan; Wikidata a common name when GBIF has none. Lucas's French description is translated.

    The content builder merges those sources in rising priority: parsed entry, automatic data, translation, and finally the hand-written notes, which win over everything.

    Cards stay honest. Where the identity is not settled, the card says so, and around thirty-six Lucas names are still open.

    move the pointer over the print to stir it
    VII

    On the page

    Body and wings become three planes, and a shader bends the wings about the body.

    On the site each specimen is three textured planes in Three.js. The wings hinge at the axis, and a vertex shader rotates each point by an angle that lags toward the tip, so the wing flexes rather than flaps like a door. The colour is multiplied onto the paper, which is why a printed wing still looks printed.

    Everything is slow on purpose. At rest a specimen only breathes. Scrolling gives it energy that decays. Clicking pins it flat and opens the card.

    This canvas approximates the shader with strips: the same hinge angle, the same amplitude, frequency and lag as the live site.