Magnetic Field Visualization
Visualize magnetic fields created by current-carrying wires, loops, and magnetic dipoles.
Intermediate
Magnetic field theory
A magnetic field is created by moving electric charges (currents) or magnetic materials. Unlike electric fields, magnetic field lines form closed loops and have no isolated poles.
Biot-Savart law (current element)
dB = (μ₀/4π) × (I dl × r̂) / r²
- dB
- magnetic field element (T)
- μ₀
- permeability of free space ≈ 4π × 10⁻⁷ T⋅m/A
- I
- current (A)
- dl
- length element of wire (m)
- r
- distance from the element (m)
Straight wire
B = (μ₀ I) / (2π r)
Circular field lines around the wire (right-hand rule).
Magnetic field properties:
- Magnetic field lines form closed loops (no magnetic monopoles)
- Field direction follows the right-hand rule for currents
- North and South poles always come in pairs
- Field lines are denser where the field is stronger
Interactive simulation
Controls
Add Magnetic Source
Display Options
How to Use:
- Current Wire: Shows circular field lines (⊙ = out, ⊗ = in)
- Current Loop: Creates dipole field like a bar magnet
- Bar Magnet: N (red) and S (blue) poles with dipole field
- Click sources to select, then flip direction or rotate
- Field lines show magnetic field direction (closed loops)
- Right-hand rule: Thumb = current, fingers = field direction
Current Sources (2)
Wire #1⊙ Out
Position: (200, 250)
Wire #2⊗ In
Position: (400, 250)
Key concepts
Right-hand rule
Point your right thumb in the direction of current flow. Your fingers curl in the direction of the magnetic field lines around the wire.
Current loop
A circular loop of current creates a magnetic dipole similar to a bar magnet. Field lines emerge from one face (North) and enter the other (South).
Magnetic dipole
A bar magnet or current loop creates a dipole field pattern. Field lines emerge from the North pole and return to the South pole, forming closed loops.
Field configurations
- Straight wire: concentric circular field lines
- Current loop: dipole pattern similar to a bar magnet
- Solenoid: uniform field inside, dipole field outside
- Bar magnet: classic dipole with N and S poles
Real-world applications
Electromagnets
Current-carrying coils create controllable magnetic fields for motors, generators, and MRI machines.
Electric motors
Magnetic fields from coils interact with permanent magnets to create rotational motion.
Magnetic levitation
Repulsive magnetic forces enable high-speed maglev trains and frictionless bearings.
Data storage
Magnetic domains in hard drives store digital information using tiny magnetic fields.
Discussion
Questions, ideas or a different approach? Join the conversation.