3D Magnetic Field Visualizer

Explore 3D field lines around bar and horseshoe magnets. Drag magnets to move them; compass needles (green) align with the local B field.

Controls

12 lines
1.0×

Live Data

Configuration Bar magnet
|B| at probe —
Field lines 0

Legend

  • North Pole (N)
  • South Pole (S)
  • Magnetic Field B (N → S)
  • Compass Needles
N S B Compass
Drag magnet • Drag empty space to rotate • Scroll to zoom

Key Concepts

  • Like poles repel; unlike poles attract.
  • Field lines go from N to S outside the magnet and form closed loops.
  • A compass needle aligns with the local field direction.
  • Field strength is stronger where lines are closer together.

Dipole Model

$\vec{B} \propto \dfrac{\vec{m}}{r^3}$ (far field)

Each magnet is modelled as N and S monopoles. The net field is their superposition. Lines never cross; density indicates |B|.