damiavicens/magnetic-pendulum-films
The magnetic pendulum in 2D — basin-of-attraction films Four 1080p60 films, ~30 s each, of the basin-of-attraction map of the magnetic pendulum: release the bob from rest at every point of the plane, integrate until it settles, and colour that point by the magnet that captured it. This is a real, named, well-studied object, not a repurposed Newton fractal. Its signature is the Wada property: every point on the boundary between two basins is also on the boundary of the third, at… See the full description on the dataset page: https://huggingface.co/datasets/damiavicens/magnetic-pendulum-films.
The magnetic pendulum in 2D — basin-of-attraction films
Four 1080p60 films, ~30 s each, of the basin-of-attraction map of the magnetic pendulum: release the bob from rest at every point of the plane, integrate until it settles, and colour that point by the magnet that captured it.
This is a real, named, well-studied object, not a repurposed Newton fractal. Its signature is the Wada property: every point on the boundary between two basins is also on the boundary of the third, at any magnification.
The model
r'' = -kg r - kf v + sumi ki (pi - r) / (|pi - r|^2 + h_i^2)^((q+1)/2)
with h the bob's height above the magnet plane, which softens the singularity. Defaults k_g = 1, k_f = 0.20, h = 0.25, q = 2 (the canonical inverse-square toy model), three magnets at unit radius.
The films
Method notes
Batched RK4, one CUDA thread per trajectory, with a per-thread early-exit mask (measured 86.9% early exit; mean 10,469 of a possible 80,000 steps). Capture requires the bob to stay inside 0.25 d_min of a magnet and below |v| = 0.02 continuously for 1.5 s — a single-instant test misfires on fast fly-bys and gives a visibly wrong map.
The card is an RTX PRO 6000 Blackwell, whose measured FP64:FP32 ratio is 1:38.2, so the morphs run in f32. That choice was measured, not assumed: the f32-vs-f64 basin label disagreement is 0.004%, far below the 1% threshold.
Colour is a banded Oklch construction — one lightness band per basin at a single hue, gamut-mapped by reducing chroma at fixed L and h — baked to a LUT. Doing the gamut mapping per pixel cost 5.78 s/frame; the LUT does it in 0.235 s.
