Three oscillators, one curve
A 2D Lissajous figure is what you get on an oscilloscope when you drive the horizontal plates with one sine wave and the vertical plates with another: x = A·sin(at + δx), y = B·sin(bt + δy). A 3D Lissajous curve simply adds a third, independent oscillator along the depth axis, so a point traces a path on the surface of a box of size 2A×2B×2C:
x(t) = A · sin(a·t + δx) y(t) = B · sin(b·t + δy) z(t) = C · sin(c·t + δz)
Each axis is an independent simple harmonic oscillator with its own frequency (a, b, c) and phase offset (δx, δy, δz). The shape you see depends only on the ratios a:b:c and the phase differences — scale A, B and C just resize the bounding box.
Why closed curves need rational ratios
If a, b and c are all integer multiples of a common base frequency — commensurate — the whole system is periodic and the curve closes on itself after a finite time, the least common multiple of the three individual periods. A 3:2:1 ratio, for instance, closes after the slowest oscillator completes exactly one cycle while the fastest completes three.
If any pair of frequencies has an irrational ratio, the curve never exactly repeats. It behaves like an irrational rotation on a torus: over infinite time it winds around densely enough to pass arbitrarily close to every point on the bounding surface, without ever retracing a previous path. This is the same ergodic behaviour that shows up in quasi-periodic orbits and in the KAM theory of nearly-integrable Hamiltonian systems — a 3D Lissajous curve is, geometrically, a trajectory on a 3-torus in action-angle coordinates.
Phase shifts and Lissajous knots
In 2D, changing the phase offset morphs a figure-eight into an ellipse into a circle without touching the frequencies. In 3D the phase offsets do something richer: for suitable rational ratios and generic phases, the closed curve becomes a genuine Lissajous knot — a mathematical knot (a trefoil, a figure-eight knot, and so on) parametrised entirely by three sine waves. Not every ratio produces a knot; some give an unknotted loop, others a link of several separate closed curves. Knot theorists such as Bogle, Hearst and Jones catalogued which small integer ratios and phase combinations yield which knot types, and Lissajous knots remain a standard way to generate explicit, smooth parametrisations of otherwise complicated knots.
Rendering: projection and depth
A 3D curve only becomes visible once it is projected onto the 2D screen. This simulation rotates the point cloud with a standard 3×3 rotation matrix and then applies a simple orthographic or weak-perspective projection, dropping the depth coordinate after using it to darken or lighten each point:
// rotate around Y then X, then project const xr = x * cos(ry) + z * sin(ry); const zr = -x * sin(ry) + z * cos(ry); const yr = y * cos(rx) - zr * sin(rx); const screenX = cx + xr * scale; const screenY = cy + yr * scale; const brightness = map(zr, -C, C, 0.3, 1.0); // depth shading
Dragging the scene rotates rx and ry live, which is often the only way to tell a genuine knot apart from a curve that merely looks tangled from one fixed angle — a strand that appears to cross itself in projection may pass cleanly in front of or behind another strand in the true 3D path.
From oscilloscopes to scanning mirrors
The 2D version of this pattern is a century-old measurement trick: feed two signals into an oscilloscope's X and Y inputs and the screen draws a stationary shape the instant the frequencies lock into a simple ratio — a single loop for 1:1, a figure-eight for 2:1 — letting you read off frequency and phase differences by eye, with no counting circuitry at all. The same mathematics resurfaces in two-axis MEMS scanning mirrors used in laser projectors, confocal microscopes and some LIDAR units: driving the mirror's two axes at two fixed, well-chosen frequencies produces a Lissajous scan path that sweeps the whole field of view without needing a slow, mechanically demanding raster, at the cost of an uneven, denser-in-the-corners sampling pattern that the reconstruction software has to account for.
Frequently asked questions
Why does my Lissajous curve never close up?
The frequency ratio a:b:c is irrational, or close enough to it that the curve needs an enormous number of periods to return to its starting point. A curve only closes exactly when a, b and c are commensurate — all ratios of small integers. Nudge a frequency by even a tiny irrational amount and the curve instead winds forever, slowly filling the surface of its bounding torus.
What is a Lissajous knot?
A closed 3D Lissajous curve that, when you ignore where strands cross in the 2D projection, forms a genuine mathematical knot — the same trefoils and figure-eights studied in knot theory. Not every rational ratio gives a knot; many give unknotted loops or links of several components, and mathematicians have catalogued which small integer ratios and phase offsets produce which knot types.
Why do oscilloscopes still use Lissajous patterns?
Feeding one signal to the horizontal input and another to the vertical input draws a 2D Lissajous figure whose shape encodes the frequency ratio and phase difference directly and continuously — a stationary figure-eight means exactly a 2:1 ratio, no counting required. It is a purely analogue way to compare two frequencies precisely, which is why the technique predates digital frequency counters and is still taught today.
Try it live
Everything above runs in your browser — open 3D Lissajous Curves and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.
▶ Open 3D Lissajous Curves simulation