The shapes hiding between two sine waves
2026-05-20
Take two sine waves. Aim one along the x-axis - call it the horizontal wiggle. Aim the other along the y-axis - the vertical wiggle. Now imagine they both push a pen at the same time. The pen moves left and right with the first wave, up and down with the second, and traces out whatever curve their combination decides on.
The combination depends on two things. The ratio of the two frequencies - how many sideways wiggles happen for each up-and-down wiggle. And the phase - how far ahead one wave is of the other when the clock starts. Two numbers, infinite shapes.
x = sin( 1 · t + 0.00 ) · y = sin( 1 · t )
closes
Switch the ratio. Watch the phase. The pen never aims for any particular curve; it just follows the two sines. The curve appears anyway. At 1:1 the shape is an ellipse - a tilted line when the phase is zero, a circle when the phase is a quarter turn, a tilted line the other way at half a turn. The same two waves trace a line and a circle, depending only on when they started.
At 1:2 the pen makes a figure-eight on its side. At 2:3 a pretzel with three lobes one way and two the other. The pattern always says the ratio out loud, if you count how many times the curve touches each edge of the box.
Why these are the only shapes
The pen's x-coordinate is sin(a·t + φ). The y-coordinate is sin(b·t). After a time t = 2π / gcd(a, b), both sines come back to their starting values together - so the pen is exactly where it started, moving exactly the way it started. From that moment on it retraces its own path. The curve closes.
The number of lobes along each side of the box is just how many full sine cycles happened in that direction during one period. a lobes left-to-right, b lobes top-to-bottom. Counting the touches on each edge of the picture is the same as reading the frequency ratio.
The one that never closes
Pick the last button: π : 1. The horizontal wave wiggles π times for every one wiggle of the vertical wave. π is not the ratio of two whole numbers - it's irrational - and that breaks the argument above. There is no moment when both sines line back up to where they were. The pen never returns to its starting pose.
So instead of closing, the curve keeps drawing new strokes forever. Each new pass is a hair's-breadth from a previous one but never on it. In the long run the trace covers the entire square uniformly, never repeating, never missing. The viz above just shows the first few hundred passes; given infinite time it would fill in a featureless grey.
The contrast is the whole point. Rational ratio: closed curve, finite, beautiful, countable lobes. Irrational ratio: dense mist, no closure, no lobes to count. The line between "art" and "noise" is a single number - whether a/b can be written as a fraction.
Where you have seen them
Before computer screens, the way you proved that two electrical signals had the same frequency was to feed one into the horizontal sweep of an oscilloscope and the other into the vertical sweep. If the resulting Lissajous figure was a closed ellipse, the ratio was exactly 1:1. If it slowly rotated, the frequencies were close but not quite equal - and the rotation rate was the difference between them. Engineers tuned radio transmitters by watching pretzels stop spinning.
The same shapes show up wherever two perpendicular oscillations meet: the path of a swinging pendulum that's free to move in both directions; the trace on an oscilloscope; the orbit of a planet that experiences slightly different forces along its two axes. Two sine waves and a pen are enough to draw a universe of behaviours.
Pick 1:1, drag the phase slider slowly from 0 to π. Watch the tilted line open into a circle and close back into a tilted line - the simplest, oldest illusion in the entire viz. Then try π:1, leave it running for a minute, and notice the featureless fog start to settle over the box.