Visualizations
465 / 500

465 · Type and image

Broad-Nib Calligraphy

A dip pen writes italic and uncial letters; thick and thin come from the nib angle.

There is no font: each letter of an italic and an uncial hand is a few stroke skeletons joined by centripetal Catmull-Rom splines, and a broad nib (a short segment held at a fixed angle) sweeps along them, filling the quadrilateral between each pair of positions. Strokes across the nib edge come out at full width and strokes along it become hairlines, so the whole page restyles when the angle turns. The ink sits on generated laid paper through a multiply blend, pools where the pen starts and stops and dries with a darker rim, wicks into the paper fibers in fine hairs, and keeps a glossy sheen while wet that fades as it dries. The pen slows into curves, lifts between strokes and goes back to the inkwell when it runs dry.

Try it. Drag on the paper to write with the nib yourself (hold Shift or right-drag for vermilion). Drag the dial in the corner or press the arrow keys to turn the nib and watch every letter reflow. Press N for a new page and R to reset the angle.

  • Swept-segment strokes
  • Centripetal Catmull-Rom splines
  • Multiply-blended ink layers
  • Wet and dry ink layers

View the source · one module, plus a small shared runtime for sizing, the animation loop and input

Build your own

Paste this into Claude Code, Codex or any coding agent to get a simple version running, then take it wherever you like.

Build a broad-nib calligraphy simulator with JavaScript and the HTML canvas element. Put everything in a single index.html file with no libraries or build step, so I can open it directly in a browser.

Start simple:
- Paint a cream paper background.
- Model the pen as a broad nib: a short line segment of fixed width, held at a fixed angle (start with 40 degrees).
- When I drag the mouse, sweep that segment along the path: for each step, fill the quadrilateral between the nib's previous and current positions. Wind every quad the same way and fill with the nonzero rule so they merge cleanly. Thick and thin strokes should appear on their own: full width when moving across the nib, a hairline when moving along it.
- Define a few italic letters (for example "a", "n", "o" and "l") as stroke skeletons, a list of points per stroke joined by a Catmull-Rom spline, and have an autopilot pen write a word with them, moving along each stroke at an even speed and lifting between strokes.
- Add a nib angle control and redraw everything already written whenever it changes, so the whole word restyles at once.

Once that works, make it beautiful:
- Give the paper texture: soft mottling from a small noise function, faint horizontal laid lines and a scatter of fibers, and draw the ink with a multiply blend so the paper shows through.
- Make the ink feel wet: draw fresh strokes with a darker glossy layer that fades away over a few seconds as the ink dries, and add a small darker pool where each stroke starts and ends.
- Draw a simple dip pen at the writing point, rotated to match the nib, with a soft shadow that grows when it lifts.

Explain the key ideas in short code comments. When you're done, tell me how to open it and suggest three directions I could take it next, such as a full alphabet in a second hand like uncial, ink that runs dry so the pen visits an inkwell, or hairs of ink wicking along paper fibers.
PreviousAfterimageStare at a surreal landscape, then see full color in a picture that is pure gray. NextAction PotentialHodgkin-Huxley spikes race down an axon while every ion channel opens and shuts.

Related visualizations

  • Parametric TypeType and image A Metafont-style alphabet drawn by a parametric pen, morphing through ten styles.
  • Sumi-e BrushGenerative art A bristle-by-bristle ink brush paints bamboo on rice paper that wicks and bleeds.
  • HarmonographGenerative art A Victorian pendulum machine inks decaying roses and stars onto cream paper.
  • Paper MarblingGenerative art Ink drops, combs and styluses on a size bath, then a print pulled onto paper.
  • Pen PlotterGenerative art A SCARA plotter arm inks hatched, hidden-line drawings along a 2-opt optimized route.
  • Neon SignType and image Type a word and watch it get bent into glowing glass tubes on a brick wall.
  • Ink Landscape ScrollGenerative art An endless ink handscroll of misty peaks, pines, pavilions and boats, unrolling.
  • One Line PortraitType and image Thousands of stipple dots become one unbroken pen line, untangled by 2-opt.
  • Glyph RasterizerType and image Letters become pixels: exact-area scanline coverage, subpixel RGB and hinting.

Use ← and → to move between demos. While the canvas has focus, keys go to the demo instead.

← More from Emergent Mind Labs