Drag the magnet to move it · Click empty space to drop a 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.