In 1855, Jules Antoine Lissajous attached tiny mirrors to two tuning forks, aimed a beam of light at each, and let them vibrate at right angles. The reflected light traced closed curves on a screen: circles when the frequencies matched, figure-eights at a 1:2 ratio, increasingly elaborate knots at higher integers. He had turned sound into geometry. No electronics, no computation, just two vibrating metal prongs and the physics of superposition.
The math behind these figures is almost too simple. One sine wave controls x, another controls y. Two parameters set the frequency ratio; a third drifts the phase. That's it. The entire visual complexity of a Lissajous curve comes from the interaction between two trivially simple oscillations. Nathaniel Bowditch had plotted similar curves mathematically around 1815, but Lissajous made them physical, projectable, public. He demonstrated them for Napoleon III. John Tyndall saw them in London and called them "beautiful experiments."
A century later, the same patterns showed up on oscilloscope screens. Engineers fed two audio signals into X and Y inputs and read the resulting shape to determine frequency ratios. Submarine sonar operators watched Lissajous figures dance across green phosphor. The curves had jumped from acoustics lab to military instrument to, eventually, screen saver.
Our version keeps the parametric core intact. The draw loop computes 2000 points per frame along a full period of two sine functions, with freqA and freqB snapped to integers derived from pointer position:
const freqA = 1 + Math.round(mx * 7);
const freqB = 1 + Math.round(my * 7);
const phaseShift = t * 0.0003;
for (let i = 0; i <= steps; i++) {
const p = i / steps * Math.PI * 2;
const x = cx + amp * Math.sin(freqA * p + phaseShift);
const y = cy + amp * Math.sin(freqB * p);
}
The slowly drifting phaseShift means the curve never quite settles. At 3:5 it looks like embroidery unraveling. At 7:7 it collapses to a rotating ellipse. The trail mode applies a near-transparent fill each frame instead of clearing the canvas, so old strokes fade like phosphor afterglow on a CRT. That's the whole trick: two sine waves, a phase drift, and a refusal to erase.
There's something satisfying about a visualization where the mapping from input to output is completely legible. You move your cursor right, one frequency goes up. You move it down, the other changes. No hidden state, no stochastic process. Every knot in the curve traces back to a ratio you chose. Lissajous would have recognized it instantly, 170 years later, running on hardware he couldn't have imagined, doing exactly what his mirrors did.
← Back to index