By Tim King · Updated
Harmonograph Generator
Damped Pendulum Drawings Online, Free PNG
OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.
How the Harmonograph Generator works
This harmonograph generator draws curves from two swinging pendulums. A harmonograph is a Victorian drawing machine: a pen hung from two swinging pendulums draws on paper while the swings die away, and the friction turns a Lissajous figure into a spiral that tightens toward the centre. This page simulates one. Set the two frequencies, how far out of tune they are, and how fast they decay, then save the drawing.
Harmonograph generator: getting a good result
The pen's position is the sum of two damped sine waves in each direction. Each wave has a frequency, a starting phase and an amplitude that shrinks over time by an exponential factor. The two pendulums are coupled so that each contributes to both x and y, which is what gives real harmonograph drawings their slightly off-axis, woven look rather than the clean mirror symmetry of a plain Lissajous figure.
Frequencies are whole-number ratios, as on the Lissajous page, and the ratio decides the basic figure: 1:2 gives a figure of eight, 2:3 a three-lobed knot, 3:4 a denser weave. On a physical machine the frequency is set by the pendulum's length; here it is a slider.
Detune adds a small offset to one pendulum in each pair. With detune at 0 the figure closes on itself and the pen retraces the same path as it shrinks, giving crisp nested lines. A little detune makes each pass land slightly beside the last, so the lines fan out into the shaded, rotating bands that make harmonograph drawings recognisable. Too much and the figure loses its shape.
Damping is how quickly the swing dies. Low damping keeps the pen near full amplitude for the whole run and fills the outer figure densely; high damping pulls it into the centre quickly and leaves most of the drawing as a tight spiral.
Run time is how long the pendulums are allowed to swing, in simulated minutes. Longer runs add more inner passes. A run of 10 with low damping draws hundreds of thousands of segments and takes a moment at 4K.
Seed and colour. The starting phases of the four waves are chosen from the seed, so Regenerate rotates and reshapes the figure without changing the frequencies. Rainbow shifts the hue over the run from outside to inside; Single uses one hue. Strokes are drawn semi-transparent so overlapping passes build up brightness.
FAQ
Why is the drawing lopsided?
Because the starting phases are random and the two pendulums each affect both axes. A real harmonograph is the same: you release the pendulums by hand and the figure comes out tilted. Regenerate for a different tilt.
How do I get the classic nested-ring look?
Set detune to 0 to 3, damping to 10 or more and a simple ratio like 1:2 or 2:3. Each pass then lands just inside the last.
How do I get the shaded "moire" bands?
Raise detune to 10 to 25 with low damping and a long run. The successive passes drift around the figure and their overlaps form the bands.
Is this the same as a Lissajous figure?
A Lissajous figure is the undamped, single-pendulum-per-axis case. Set damping to 1 and detune to 0 here and you get something close to one, drawn many times over.
See also: all Generative Art tools, Images, Audio, Video & Screen, PDF, SVG, Simulations & Screensavers, Chart Makers, 3D Model Viewers, Drawing Pads, Mockups & 3D Making, Diagram Makers, 3D Science, Tracker Music.
Related tools
Lissajous Curve Generator
Two sine waves at right angles; set the frequencies and phase, save the figure.
Spirograph Generator
Set the ring, gear and pen offset; the curve draws until it closes.
Rose Curve Generator
The r = cos(kθ) flower; set n and d, save the petals as PNG.
Flow Field Generator
Particles traced through a Perlin noise field; the classic generative-art look.
Wallpaper Generator
Random abstract backgrounds, six palettes, saved at desktop or phone size.