Magnetic Field

Interactive simulation — adjust parameters and watch the visualization update in real time.

How it works

Magnetic dipoles are modeled as point dipoles (field ∝ 1/r³). Long straight wires produce the familiar 1/r circular field in the plane (right-hand rule). Pink arrows show the local B direction; gold curves are streamlines traced from the north side of each magnet.

Key equations

Dipole (sketch): B ∝ 3(m·r̂)r̂ − m over |r|³
Long wire: |B| ∝ |I|/r, tangent to circles (right-hand rule)