Magnetic Field Lines Simulator (2D)
Interactive 2D bar-magnet dipole simulator: drag the magnet, flip its poles, and watch field lines and iron filings trace the true dipole field with a drop-in compass probe.
This 2D simulator draws a bar magnet's dipole field from directly above: field lines leave the red N pole, sweep outward, and loop back into the blue S pole, exactly as the physics of a magnetic dipole predicts. Drag the magnet to relocate it, flip its polarity, and dial up the strength, line count, or iron-filing density to see the field recompute live — every filing tilts to match the local field direction, and dropping a compass probe anywhere on the canvas reads out the exact field magnitude at that point. Add a second magnet to explore attraction and repulsion between two dipoles.
Interactive 2D bar-magnet dipole simulator: drag the magnet, flip its poles, and watch field lines and iron filings trace the true dipole field, with a drop-in compass probe and an optional second magnet.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install