Afterglowscreensavers

Pendulum Waves Screensaver

The Pendulum Waves screensaver is a free, in-browser animation of a row of pendulums whose lengths differ slightly, so each swings at a slightly different period. They start in sync, drift into travelling waves and apparent chaos, then realign into a single swing as their cycles line back up. It runs instantly with no download. Press ESC to exit.

Live preview

Press ESC to leave fullscreen. Settings are saved in your browser only.

How the Pendulum Waves screensaver works

A row of pendulums hangs from a support bar near the top of the screen. The number of bobs is set by the Pendulums count (6 to 30), spaced evenly across the width. Each bob's position is computed as a swinging angle — the saver evaluates θ = amplitude × cos(ωt) every frame and places the bob using the sine and cosine of that angle from its anchor point.

The key is that each pendulum gets a slightly different angular frequency. The code assigns frequency ω = 2π(24 + i) / cycle, where i is the pendulum's index. Because each successive pendulum completes one extra oscillation over the full cycle, the row sweeps through travelling waves, then disorder, then realignment — the same effect as a real pendulum-wave demonstration.

The cycle length — how long until every pendulum re-syncs — is driven by the Speed control. Higher speed shortens the cycle so the patterns repeat faster. The Amplitude control scales how far each bob swings from center, making the waves wider or tighter.

Each bob is drawn as a small sphere with a radial gradient for a lit, 3D look, and its color is taken from a hue that rotates across the row, so the wave reads as a sweep of color. A thin string connects every bob to the support bar, and the whole scene is repainted each frame against the chosen Background.

A worked example

With the defaults — Pendulums: 16, Speed: 4 and Amplitude: 6 — the saver hangs 16 bobs from the bar and gives each a frequency of 2π(24 + i) / cycle, where the cycle is about 60 seconds at this speed. All 16 start swinging together, then fan out into a smooth travelling wave as their periods diverge, pass through a stretch of apparent chaos, and finally snap back into a single unified swing when their cycles realign — then it repeats.

Settings & tips

Frequently asked questions

Is the Pendulum Waves screensaver free?
Yes. It is free and runs in your browser with no download or sign-up. Open the page and the pendulums begin swinging on their own.
What are pendulum waves?
Pendulum waves are a physics demonstration where a row of pendulums with slightly different lengths swing at different periods. They drift in and out of phase, weaving travelling waves before realigning into a single swing.
How do I exit the Pendulum Waves screensaver?
Press the ESC key to exit at any time. Moving the mouse or pressing any key also returns you to the controls.
Why do the pendulums fall out of sync and then realign?
Each pendulum completes a slightly different number of swings over the cycle, so they gradually drift apart into waves and chaos. When their cycles line back up they briefly swing as one, and the pattern repeats.
Can I change how many pendulums there are?
Yes. The Pendulums control sets the count from 6 to 30, and Speed and Amplitude adjust how fast the cycle repeats and how far each bob swings.

← All Generative screensavers