About MagnetSim
A small set of rules. An open-ended experiment.
MagnetSim is a browser-based exploration of interacting magnetic needles. Each needle occupies a fixed position and responds to its immediate neighbors. Together, these local interactions can produce aligned regions, persistent motion, and changing patterns.
What the project is for
The project invites you to experiment: change an angle, add a disturbance, drive an edge, or pause to inspect the result. It can support curiosity about collective behavior and discrete simulations, but it is not a substitute for a validated material model or a laboratory experiment.
From Python to the browser
The original application used Python, NumPy, and Pygame. This version preserves its discrete needle model while using browser graphics and JavaScript or WebAssembly for the simulation. No account or simulation server is needed. The Manual explains the model and its parameters.
Limits worth understanding
Only immediate neighbors interact. There is no full electromagnetic field calculation, physical calibration, or energy-conserving integrator. Results depend on the configuration, initialization, and numerical implementation. Similar-looking patterns are not proof that the model reproduces a particular real material.
Your device and your settings
The simulation runs on your device. Configuration and presets are saved in this browser's site data; you can also export and import configuration files. Clearing that site data removes local saves. Leaving the simulator and returning creates a new running field from the saved settings. This site adds no analytics or advertising scripts.
Read the Manual or open the field and begin exploring.
Start this!