A magnetic pendulum swings above three fixed magnets and gets pulled toward whichever one it passes closest to. This top-down 2D port integrates the exact same planar model as the 3D version: a damped spring restoring force toward the pivot's rest point plus inverse-square attraction from each magnet, sub-stepped (6x per frame) with Euler integration for stability. Tiny differences in the starting position lead to wildly different final magnets — the fractal basin-of-attraction signature of chaos.