PPolySim OS

Magnetic Pendulum

Three magnets, one swinging bob, and pure chaos. Which magnet it settles on depends so delicately on where it starts that the map of outcomes is a fractal.

Magnetic PendulumLive

Controls

A pendulum bob is pulled toward three magnets. Which one it lands on depends so sensitively on the start that the basins of attraction form a fractal. Drag a magnet to move it, or click empty space to drop the bob there.

Presets

▶ Run in Python

Data Inspector

Magnets3
Damping0.5% / step
Magnet strength0.60
Basinsfractal

Governing equation

Reading this result: Which magnet the bob settles on depends with extreme sensitivity on where it starts: neighboring drop points can end at different magnets, carving fractal basins of attraction. At friction 0.995 it settles at a moderate pace. Magnet strength 0.6 balances against the central spring.

Runs locally in your browser — free forever. Scale to the cloud when reality gets heavy.

or unlock everything with Pro →
★ Sign in to save this setup
Save your tuned setup, or drop this simulation into your own site, docs, or course page.

How it works

The bob feels a restoring pull toward center, attraction to three magnets, and friction. Because tiny changes in the starting point can flip the final magnet, the basins of attraction interleave into an infinitely detailed fractal — a beautiful, tangible demonstration of sensitive dependence on initial conditions.

Ask the AI about this model

The math, the assumptions, real-world uses, or a code translation — explained for this exact simulation.

More Physics simulations

Frequently asked questions

Is this magnetic pendulum chaos tool really free?
Yes. Magnetic Pendulum runs entirely in your browser using your device's own compute, so local use is free forever. You only pay Compute Tokens if you scale a job to the cloud.
Do I need to install anything?
No. Everything runs client-side in a modern browser — no downloads, no license, no account required to start.
Can I save or share my simulation?
Create a free account to save projects, and use a shareable embed or minted DOI to publish a live, interactive version anywhere.
How accurate are the results?
The solver uses established numerical methods, but results are for research and educational purposes and should be validated against experiment or professional review before you rely on them.