Home▸Electromagnetism▸Magnetic Dipole Field-Line Tracer (2D)

🧲 Magnetic Dipole Field-Line Tracer (2D)

2D magnetic dipole field-line tracer: place up to four bar magnets, trace real B(r,θ) ∝ (2cosθ, sinθ)/r³ dipole field lines by numerical integration, and watch line density and topology respond to strength, alignment and position.

Electromagnetism2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-magnetic-field-lines ↗ Open standalone

This 2D companion drives the same physics as the 3D magnetic-field-lines original but isolates a different half of it: instead of watching charged particles deflect through a field (the mechanic used by this category's Lorentz-force companion), it focuses on the field-line topology itself. Up to four draggable bar magnets, each a real point dipole, superpose their B(r,θ) ∝ (2cosθ, sinθ)/r³ fields; every line on screen is traced step by step through that summed vector field by second-order numerical integration rather than drawn as decoration, and a live cursor probe reads out the exact field magnitude and direction anywhere on the canvas.

⚙ Under the hood

2D magnetic dipole field-line tracer with real B(r,θ) ∝ (2cosθ, sinθ)/r³ superposition, draggable bar magnets, alignment and strength controls, and line-density-as-field-strength rendering per the Gauss's-law convention.

magnetic dipolefield linessuperpositionbar magnetgauss's lawvector field tracing

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)