The idea: pendulums holding a pen
A harmonograph is a drawing machine. One pendulum swings the pen (or the paper) left and right, another swings it forward and back. Each pendulum moves like a sine wave, and friction slowly takes its energy away, so each swing is a little smaller than the one before. The pen draws
x(t) = A₁ sin(f₁t + p₁) e^(−d₁t) + A₂ sin(f₂t + p₂) e^(−d₂t)
y(t) = A₃ sin(f₃t + p₃) e^(−d₃t) + A₄ sin(f₄t + p₄) e^(−d₄t)
A is how far a pendulum swings, f how fast (in radians per second), p where it starts, and d how quickly friction stops it. The page uses one d for all four pendulums, so the formula becomes x = (A₁ sin(f₁t + p₁) + A₂ sin(f₂t + p₂))·e^(−dt), and t runs from 0 to 100.
On the canvas the x wave is drawn under the figure with time running down (blue), the y wave beside it with time running right (green), and grey links show the pen taking its x from one and its y from the other, the same layout as Lissajous Figures. The ink changes colour with time, purple at t = 0 to orange at t = 100, so you can see which loops came first.
No damping, exact ratio: a Lissajous figure
Set d = 0 and give f₁ : f₃ a whole-number ratio a : b, like 2 : 1 or 3 : 2. Then both waves come back to where they started after the same time, and the pen goes round the same closed curve again and again: a Lissajous figure. Over t = 100 the 2 : 1 eight is drawn about 15 times on top of itself, so it looks like one thin line. (Demo: no damping, exact 2 : 1: a plain Lissajous figure.) The ratio still sets the shape: x makes a waves while y makes b, so the figure touches the side edges a times and the top b times.
Damping: the figure spirals inward
With d > 0 every term is multiplied by e^(−dt), the same factor for x and y. So the pen draws the same figure, only scaled down a little more on every lap: it spirals inward to the centre. The dashed box on the canvas is the envelope ±(A₁ + A₂)·e^(−dt) at the current t, and it shrinks with the pen. The half-life, the time for the swing to halve, is ln 2 / d.
| damping | d | half-life ln 2 / d | size left at t = 100 |
|---|---|---|---|
| none | 0 | never | 1 |
| light | 0.01 | 69.3 | e^(−1) = 0.37 |
| heavy | 0.03 | 23.1 | e^(−3) = 0.05 |
Light damping leaves wide, evenly spaced loops; heavy damping packs most of the drawing near the centre. (Demo: 1 : 1 with damping: the circle spirals inward, Demo: damping none → light → heavy.) The same shrinking envelope, for one wave on its own, is on Damped Oscillation.
Detuning: the figure turns
Now make the ratio almost but not quite whole: f₁ : f₃ = 2 : 1.005 instead of 2 : 1. Write y = sin(1.005t) as sin(t + 0.005t): it is the 2 : 1 wave with a phase that slowly grows. The shape of a Lissajous figure depends only on the phase difference between the waves, so each lap is the 2 : 1 figure for a slightly different phase: the figure seems to turn, or precess.
For a ratio a : b with ε added to f₃, the phase difference drifts at a·ε radians per second, and the figure goes through the same shapes again every 2π / (a·ε) seconds. This is a beat: two tones a little out of tune drift in and out of step at their frequency difference, and you hear it as a slow pulse.
| preset | a | ε | drift over t = 100 |
|---|---|---|---|
| 2 : 1 figure eight | 2 | 0.005 | 1.0 rad (57°) |
| 1 : 1 turning ellipse | 1 | 0.03 | 3.0 rad (172°) |
| 3 : 4 lattice, ε = 0.03 | 3 | 0.03 | 9.0 rad, more than one full turn |
(Demo: detune turns the ellipse: 1 : 1.03, no damping; Demo: detune exact → 0.005 → 0.01 → 0.03.) With no damping and a detune, the figure keeps its size and slowly fills the square as it turns. Add damping and the turning figure also spirals in: that is the look of most harmonograph drawings.
Three pictures compared
The presets
| preset | x | y | damping, detune |
|---|---|---|---|
| 1 : 1 spiral | sin(t + π/2) | sin(t) | light, exact |
| 2 : 1 figure eight | sin(2t) | sin(t) | light, +0.005 |
| 3 : 2 pretzel | sin(3t + π/2) | sin(2t) | light, +0.005 |
| 3 : 4 lattice | sin(3t + π/4) | sin(4t) | light, +0.005 |
| 1 : 1 turning ellipse | sin(t + π/4) | sin(t) | light, +0.03 |
| four pendulums: star | 0.6 sin(2t) + 0.4 sin(3t + π/2) | 0.6 sin(2t + π/2) + 0.4 sin(3t) | light, +0.01 |
| four pendulums: swirl | 0.6 sin(2t + π/2) + 0.4 sin(t) | 0.6 sin(2t) + 0.4 sin(t + π/2) | heavy, +0.01 |
The detune is always added to f₃, the first y pendulum. With two pendulums on each axis the pen adds two motions, a slow wide one and a faster small one, which gives the stars and swirls their points and loops. (Demo: four pendulums draw a star.)
Real harmonographs
Harmonographs grew out of Hugh Blackburn's Y-shaped pendulum (1844) and Jules Lissajous's mirrors on tuning forks (1857), and became a favourite in Victorian drawing rooms. A lateral harmonograph has two pendulums swinging at right angles: one moves the pen arm, the other the paper. A rotary harmonograph hangs the table on a gimbal so it can swing in any direction, and a push round in a circle gives the circular terms like those in the four-pendulum presets.
A pendulum's angular frequency is √(g/L), so it depends only on the length L (Simple Pendulum). To get 2 : 1 the slow pendulum must be 4 times as long, for 3 : 2 the lengths are 4 : 9. Nobody can set the lengths exactly, so real drawings are almost always a little detuned and turn, and friction in the bearings and the pen on the paper is the damping that pulls the drawing to the centre.
Many small pendulums, ideal and damped, still give these regular pictures. Join two pendulums end to end instead and the motion becomes chaotic: see The Double Pendulum. Other curves drawn by a moving pen: Spirograph (rolling circles, no damping).
How the page draws it
The curve is computed at 6000 points (60 per unit of t, about 94 per wave even at f = 4) and drawn in 60 colour bands. Play: draw moves the pen from t = 0 to 100 in 250 steps of 0.4; the speed choice makes that about 25, 13 or 4 seconds. Nothing is random, so step back and undo give the same picture.
What the page leaves out
Separate damping for each pendulum (d₁ … d₄), amplitudes and phases as controls, the real physics of a pendulum (big swings are slower, so the frequency changes as the swing dies), the coupling between pendulums on one frame, the gimbal geometry of a rotary harmonograph (the pen moves on a sphere, not a plane), the paper's own swing and the width of the ink line. The window is fixed at −1.1 … 1.1.