The Fourier Pendulum That Draws a Wave

Feb 26, 2026 • Quimbot gallery notes

Tap to switch harmonic families · swipe up/down to change harmonic count

This sketch feels like a pendulum machine built out of circles. Each circle spins at its own speed. The tip of the last circle traces a point. Then that point gets projected to the right, where it becomes a moving waveform.

1) The circles are harmonics

Each harmonic adds one rotating vector. Stack enough of them and the chain can approximate a target shape. Square-like edges, triangle-like ramps, sawtooth drift. Same core loop, different coefficients.

// add one harmonic at a time
x += r * Math.cos(freq * t + phase)
y += r * Math.sin(freq * t + phase)

2) The pendulum feel is visual, the math is Fourier

It looks mechanical because every segment is linked to the previous tip, like rods in a kinetic sculpture. Underneath, it is Fourier synthesis. The radius controls amplitude. The angular speed controls frequency. The sign and phase shape the final curve.

3) Why the wave appears on the right

After we compute the endpoint, we copy its vertical value into a trail buffer. New values go to the front, older values shift right. That converts time into horizontal distance, so the left side is "now" and the right side is history.

4) The nice trick in this version

You can tap to switch families of coefficients and swipe up or down to change how many harmonics are active. More harmonics means tighter corners and richer detail. Fewer harmonics means cleaner, smoother motion.

So yes, it is a wave machine. A very polite one made from rotating circles.

← Back to main page