A pendulum bob is pulled by gravity toward its pivot and by three colored magnets on the base plane below. Tiny changes in start conditions lead to wildly different, chaotic trails.
A magnetic pendulum consists of a bob suspended above a plane of fixed magnets; gravity pulls it toward center while each magnet pulls it sideways, producing a nonlinear dynamical system. Because the equations of motion are sensitive to initial position and velocity, two nearly identical starting points can diverge exponentially and end up captured by different magnets — a hallmark of deterministic chaos. The colored regions a bob could settle over form intricate, fractal-like "basins of attraction" with boundaries that are infinitely detailed. Real desktop versions of this toy (often with 3 magnets) have been popular science demonstrations since the 1960s for showing that simple rules can produce unpredictable long-term behavior. Energy loss through damping (friction and induced eddy currents) eventually pulls the bob to rest on top of whichever magnet "wins" the chaotic race.
- Divergence rate of nearby trajectories is measured by the Lyapunov exponent; positive values indicate chaos.
- Basin boundaries between magnets are fractal — zooming in reveals ever finer structure.
- Typical toy pendulums oscillate at roughly 0.5–1.5 Hz with a bob-to-magnet gap of a few centimeters.
- Damping in this sim (default 0.22) represents air drag and induced eddy-current braking near the magnets.
- Three symmetric magnets (used here) are a classic minimal setup that still yields chaotic, unpredictable trails.
- Because the system is deterministic, identical starting conditions always reproduce the same trail exactly.
- Final resting color = which magnet ultimately captured the bob, visualized by the trail's fading hue.