The bob moves in a plane (small-angle pendulum) under: restoring force F = −k r, three magnet attractions Fi = s / di2.2 towards magnet i (distance clamped below 0.28), and linear drag −c v. Equation: r″ = −k r + Σi s di−2.2 d̂i − c r′. Magnets sit on a circle of radius 1.9 at 120°.
Energy E = ½v² + ½k r² − Σ s d−1.2/1.2 falls at the rate dE/dt = −c v²; the page integrates this dissipation and checks E(t) + W = E(0). The basin map integrates a trajectory from every cell (RK4, h = 0.04 s) until it rests.
Simplifications: the exponent 2.2 is a stylised magnet law (a real dipole falls off faster), no pendulum-length nonlinearity, the cut-off below 0.28 is a numerical softening, the pivot height is not modelled. This is a chaos demonstration, not a magnet model.