Magnetic Field

This interactive simulator explores Magnetic Field in Electricity & Magnetism. Bar magnets and current-carrying wires with field line visualization. Use the controls to change the scenario; watch the visualization and any graphs or readouts to connect the model with lectures, labs, and homework.

Who it's for: Best once you already know the basic definitions and want to build intuition. Typical context: Electricity & Magnetism.

Key terms

  • magnetic
  • field
  • magnetic field
  • electricity
  • magnetism

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)