Lesson goal: Lissajous Curves & Frequency Harmonics

Previous: Times tables and cardioid mandalas | Home | Next: Draw an OpenStreetMap

What happens when you combine two independent, perpendicular vibrations?

Consider a point whose horizontal and vertical positions each oscillate with simple harmonic motion: $$x(t) = A \sin(a \cdot t + \delta)$$ $$y(t) = B \sin(b \cdot t)$$ where $a$ and $b$ are the frequencies of oscillation, and $\delta$ is the phase shift between them.

These mesmerizing paths are called Lissajous Curves (or Bowditch curves). In 1857, French physicist Jules Antoine Lissajous bounced beams of light between tiny mirrors attached to vibrating tuning forks, projecting these figures onto walls to study sound harmonics!

Lissajous curves are fundamental in physics, electronics, and acoustics:
  • Frequency Ratio ($a : b$): The shape reveals the exact ratio of the two frequencies. Counting the number of horizontal peaks gives frequency $b$, and counting vertical peaks gives frequency $a$!
  • Phase Difference ($\delta$): As the phase shift $\delta$ sweeps from $0$ to $2\pi$, the 2D curve appears to rotate smoothly in space like a 3D translucent cylinder or wireframe knot!
  • Oscilloscopes: Electrical engineers display one signal on the X-channel and another on the Y-channel to instantly test whether two AC waveforms are in sync.


In this lesson, we use gif_axes(color), gif_line(x1, y1, x2, y2, color), and gif_fillcircle(x, y, r, color) to animate a 3:2 frequency harmonic as its phase angle rotates through a full $360^\circ$ cycle!
gif_axes(color)
Move the mouse over a dotted box for more information.

Now you try. Try setting a = 5 and b = 4, or try a = 1 and b = 2 to make a figure-eight!

Type your code here:


See your results here: