Lathe

walnut · 1,200 rpm · 0 cm³ off · press the gouge into the wood

Lathe

What it is

A wood lathe spins a piece of wood about one axis while a hand-held tool is pressed against it, so everything it makes is a surface of revolution: a baluster, a candlestick, a chess pawn, a rolling pin. This page is a small woodturning simulator in the browser — a lit three-dimensional scene rendered with WebGL through react-three-fiber and three.js — in which a walnut blank turns between the headstock and the tailstock and a gouge follows your pointer. Press it into the spinning wood and the profile drops to where you hold the tip; shavings fly off the edge and settle on the bed. The first frame is a job half done: the left two thirds of the blank already turned into fillets, coves and two beads, the right third still a square blank whose corners blur into a translucent ghost the way a spinning square does.

The workpiece is one array of 320 radii along the axis, kept in a plain TypeScript module with 25 unit tests. A cut is a pointwise minimum against the tool's footprint — a circular arc for the gouge, a flat edge with 45-degree shoulders for the skew, a 3.2 mm slot for the parting tool — limited to a feed per second that rises with the spindle speed and never taken below a core 5 mm in radius, so a parting cut leaves the piece almost off but never off. The wood removed is tallied in cubic centimetres in the readout, and a test pins that the sum of every cut's volume is exactly the drop in the piece's own volume. The mesh is a fixed surface of revolution with 96 vertices around each profile sample, rewritten in place for only the band a cut touched; three faint shells and a square layer built from the same profile draw the smear of the uncut corners.

The wood grain is a solid procedural texture evaluated inside the wood's own frame, not a picture wrapped on the surface. Annual rings are the distance from a pith axis offset from the spindle by just over a third of the blank's half-width and tilted three degrees, wobbled by three octaves of noise, with a dense latewood band at the end of each year and a fine fleck of noise, finest along the axis; the earlywood and latewood colours and the ring pitch come from the species — walnut rings 3.4 mm apart, cherry 2.8, maple 2.2. Because every fragment looks its ring up from its position in the blank, a cut reveals the figure that was already inside: ellipses on the beads, arches on the coves, and a ring exposed now lines up with one exposed a minute ago. At speed the figure is averaged into bands, with six samples across the arc the wood turned this frame as motion blur while any figure is left to smear; it is gone by about 1,100 rpm, so stopping the spindle is how you look at what you cut. Oil darkens the colour by a fifth and halves the roughness for a satin sheen.

Shavings are an instanced mesh of 240 curled ribbons, each wound just over two turns, spawned at up to six a frame at about 2 cm³ each, thrown off the edge toward you and left resting where they land on the bed; 120 of them are already on the bed at first paint. The spindle runs from 300 to 2,400 rpm and starts at 1,200. In a portrait stage — a phone held upright — the whole lathe is rolled ninety degrees so the spindle runs down the long axis of the screen. With reduce-motion on the spindle is held still, no shavings fly, the tool still cuts, and the scene re-renders only when something changes. There is no audio.

How to use it

  • Press the tool into the spinning wood and drag along it: the profile drops to the tip.
  • Gouge, Skew or Parting tool: a cove, a flat, or a slot that stops 5 mm from the axis.
  • Pick Walnut, Cherry or Maple; Oil deepens the colour and raises a satin sheen.
  • Load Blank, Baluster, Candlestick, Pawn or Rolling pin; New blank sweeps the bed.
  • Drag Speed from 300 to 2,400 rpm; stop the spindle to see the figure standing still.
webglthree.jsr3f3dshadersproceduralwoodworkinginteractive

More experiments

See every experiment