The Magnetic Pendulum
A pendulum swinging over three magnets. Colour each release point by the magnet it finally rests on and the map is a fractal, the same kind of picture Newton’s Method makes and for the same reason.
Hold the bob somewhere over the three magnets and let go. It swings, it is pulled at by all three, it loses energy, and eventually it stops on one of them. Which one is a perfectly definite fact about where you let go, and over most of the plate it is also a completely useless one: move your hand a millimetre and the answer changes. Every colour in the picture below is one pendulum, released and followed until it stopped. The bob supplies none of this. Gravity brings it back toward the middle, the magnets pull it sideways, and friction is what finally ends the argument. Take away the friction and nothing ever settles: there are no basins at all, only a bob that swings forever.
Where You Let Go, and Where It Stops
The Equations, and the One That Is Wrong
Treating the bob as a point moving in a plane a fixed height d above the magnets, the standard equations for this system are:
y″ = −kgy − kfy′ − ∑i km(y − Yi) / ri³
ri = √((x−Xi)² + (y−Yi)² + d²)
Three terms: a spring pulling back to the centre, a drag, and an attraction to each magnet. The third one is the problem. Dividing by r³ and multiplying by a displacement leaves a force going as 1/r², and an inverse-square attraction is what a magnetic monopole would produce. Monopoles are not known to exist. A real magnet is a dipole: its field falls off as 1/r³, and the force between two dipoles as 1/r⁴. A bob whose magnetism is induced rather than permanent falls off faster still.
So the pull here is softer than any real magnet’s, and it is used because it is the standard idealisation for this system rather than because it is right. What survives the substitution is the shape of the answer: three competing resting places, dissipation, and a boundary between the basins that is not a curve. The exact filigree would move under a 1/r⁴ law.
What Was Checked
Two tests, neither of which the code can pass by accident.
Energy. Set the friction to zero and this system is conservative, so the total energy must not drift. Over 200 time units the worst drift is about one part in a thousand at the step size the panel uses, and one part in forty thousand at half that step. That tests the integrator, not the physics. It is worth noting the improvement is steeper than the fourth-order accuracy RK4 is nominally good for, which is what happens when you measure the worst excursion along a chaotic trajectory rather than a clean truncation error.
Symmetry. Three identical magnets at 120° means rotating a release point by 120° must move its answer to the next magnet round, for every point. Across 1270 random releases: 1270 matched, none mismatched. A geometry error or a sign error in the force would show up here immediately.
And the map was checked for convergence rather than assumed: halving the time step changes the answer at none of 25,600 grid cells.
How Fractal Is the Boundary
The right measurement is the uncertainty exponent of Grebogi, McDonald, Ott and Yorke: take a release point, move it by ε each way, and ask whether the answer changed. The fraction of points that are uncertain scales as εγ, and the box-counting dimension of the boundary is 2 − γ. Measured here over 1400 release points per step:
| ε | uncertain fraction |
|---|---|
| 0.05 | 0.431 |
| 0.02 | 0.236 |
| 0.01 | 0.152 |
| 0.005 | 0.086 |
| 0.002 | 0.051 |
| 0.001 | 0.026 |
The slope gives γ = 0.71 and a boundary dimension of 1.29. Between 1 and 2, which is what fractal means here, and the practical content of the number is brutal: to make the outcome ten times more certain you must know the release point about twenty-six times more precisely, because 101/γ = 26.
One thing measured and not claimed. It is often said that boundaries like this one have the Wada property, meaning every boundary point touches all three basins. Testing it here, between 31% and 40% of boundary points had all three basins in a small ring around them, and that fraction did not climb as the ring shrank. That is evidence a large share of the boundary is three-way. It is not evidence of Wada, and this page does not claim it.
Why This Is an Attractlet
The kernel’s Attractlet Model class (ATTRACTLET, § 7.4)
explicitly covers “ODE and PDE formalisms.” Four ordinary differential equations are what
this is. The classification does not need an argument from the picture.
But the picture makes the point anyway, and it makes it twice. Nothing here belongs to the bob. The pull to the centre is gravity’s and the string’s. The pull sideways is the magnets’. And the part that actually decides anything is the friction, which is the one thing a bob can only lose by. Drag the friction slider to zero and watch the map go dark: with nothing to take energy away, nothing ever comes to rest, and the three basins that looked so permanent do not exist. The resting places were never the pendulum’s achievement. They were the dissipation’s.
The Shape of the Basin
Press Release twins. Two bobs are let go one ten-thousandth apart, which on this plate is about the width of a hair. Most of the time they travel together and land together. Often enough, they do not, and the separation between them grows until it is as wide as the whole plate.
This is the same object as Newton’s Method, which is why it wears the same colours. Three attracting fixed points, a rule that decides which one you reach, and a boundary of zero area and fractional dimension where the decision is not stable. One is arithmetic and one is a lump of metal on a string, and they make the same picture because the structure is in the competition, not in the substrate. Neither is an attractor in the framework’s sense. § 7.4: “No attractlet may be promoted to attractor status by complexity, longevity, apparent stability, mathematical elegance, or external coupling strength.”
What This Model Is Not
The force law is wrong on purpose, as above. Inverse-square, not 1/r⁴.
It is a planar approximation. A real pendulum on a string moves on a sphere, and the restoring force is only linear in the displacement for small swings. The linear spring used here is that small-angle approximation, driven well past where it is honest at the edges of the plate.
The bob never touches anything. The height d keeps the magnetic force finite at the magnet, which is what stops the integration blowing up. A real bob would hit the magnet, and what happens then is not in these equations.
“At rest” is a threshold, not a fact. A release counts as settled when the bob is inside a small radius of a magnet and slower than a small speed. Strictly the bob only approaches rest asymptotically. Loosening the threshold would shift the fine detail of the boundary, though not its dimension.
The clock has a limit. Releases that have not settled after 120 time units are given up on and left uncoloured. At the default friction that is none of them; at low friction it is most of them, and the readout says how many.
Grebogi, C., McDonald, S. W., Ott, E. & Yorke, J. A. (1983). Final state
sensitivity: an obstruction to predictability. Physics Letters A, 99(9), 415–418.
Source of the uncertainty exponent and of the relation D₀ = N − γ.
Ott, E. (1993). Chaos in Dynamical Systems. Cambridge University Press.
Berg, I. The Magnetic Pendulum: hands-on chaos theory.
beltoforion.de. Source of the standard
formulation, and of the statement that the inverse-square law is a monopole idealisation.
Magnetic dipole-dipole interaction, for the 1/r³ field and 1/r⁴ force.