Magnetic Pendulum — Fractal Basin Boundaries

Click to release pendulum. Colors show which magnet captures it. Fractal structure at boundaries.

Three magnets at 120° apart, pendulum released from rest.


Equations of motion (overdamped):

ẍ = -γẋ - x + Σ Fᵢ

ÿ = -γẏ - y + Σ Gᵢ


Magnetic force ∝ 1/(r²+h²)^(3/2), repels when near.


Magnets:

Magnet 1 (Red)

Magnet 2 (Green)

Magnet 3 (Blue)


The boundary between basins is a fractal — zoom in and you find all three colors at every scale.


Click the basin to see trajectory.