Electromagnetism

Coulomb force fields, the Lorentz force on moving charges, magnetic dipoles, plasma, and Maxwell's equations — visualised interactively in the browser.

8+ simulations Three.js · Canvas 2D Coulomb · Lorentz · Maxwell

Electromagnetism Simulations

Click any card to open the simulation in your browser

⚛️
★★★ Advanced
Charged N-Body System
Coulomb interaction between N charged particles. Barnes-Hut tree reduces O(N²) to O(N log N). Watch formation of plasma clusters and charge separation.
Three.js Barnes-Hut Coulomb
🌧️
★☆☆ Easy
Electric Rain
Charged particles in a uniform electric field — the electronic equivalent of gravity. Visualise drift velocity, mobility and field lines as particles accelerate.
Electric Field Canvas 2D Drift
🎆
★★☆ Moderate
Plasma Discharge
Simulates particle acceleration in crossed electric fields with Coulomb-like inter-particle repulsion, producing branching discharge patterns.
Particles Repulsion Three.js
📡
★★☆ Moderate
EM Wave Propagation
Transverse electromagnetic wave: oscillating E and B field vectors propagating through space. Polarisation, phase velocity and Poynting vector visualised.
Three.js EM Wave Polarisation
🌡️
New ★★☆ Moderate
Magnetic Field Lines
Visualise dipole and multipole magnetic field topology with interactive field-line tracing. Toggle field strength and pole spacing to explore flux density patterns.
Three.js Dipole Field Lines
New ★★☆ Moderate
Photoelectric Effect
Simulate Einstein's Nobel Prize discovery: shine light on a metal surface and watch electrons eject. Frequency (not intensity) determines electron kinetic energy — E = hf − φ.
Canvas 2D Quantum Einstein
🌊
★★☆ Moderate
Double-Slit Experiment
The most beautiful experiment in physics: photons and electrons produce interference patterns even one-at-a-time. Toggle which-path detection to collapse the fringes.
Wave Optics Interference Quantum
🎵
★☆☆ Beginner
Chladni Figures
Sand on a vibrating plate organises into standing-wave nodal patterns. Modal shapes governed by the 2D wave equation — drag the frequency slider to morph between modes instantly.
Standing Waves Resonance Canvas 2D
🧲
★★☆ Moderate New
Faraday's Law of Induction
Drag a bar magnet through a coil of wire. Watch the induced EMF ε = −N dΦ/dt respond in real time — the faster you move, the stronger the current. Lenz's law direction is shown.
Electromagnetic Induction Lenz's Law Canvas 2D
★★☆ Moderate New
Lightning Bolt Generator
Grow fractal discharge paths using the Dielectric Breakdown Model (DBM). Adjust branching probability, wind drift and jaggedness in real time.
Electric Discharge DBM Fractal
🔌
★★☆ Moderate New
RLC Circuit Resonance
Explore free and driven oscillations in a series RLC circuit. Visualise Q(t), I(t) and the impedance curve Z(ω) with resonance at ω₀ = 1/√(LC).
Resonance RLC Q-factor
🌊
★★★ Advanced New
EM Wave Simulator (FDTD)
Maxwell's equations solved on a 2D Yee grid. Watch wave propagation, interference and diffraction. Paint reflectors and choose slit presets.
Maxwell Equations FDTD Diffraction
★★☆ Moderate New
Lorentz Force & Charged Particle
RK4-integrated trajectory of a charged particle in combined E and B fields. Explore cyclotron motion, E×B drift, cycloid paths and free-field acceleration. Live Larmor radius and drift velocity.
Lorentz Force RK4 Canvas 2D
🌀
★★☆ Moderate New
Eddy Currents
A magnet falls through a conductive tube — eddy currents brake its descent. Choose copper, aluminium, steel or plastic and explore terminal velocity via Lenz's law: v_t = mg / (k·σ·B²).
Lenz's Law Induction Canvas 2D
🔄
★★☆ Moderate New
Transformer
Animated primary and secondary coils with magnetic flux through the iron core. Adjust the turns ratio N₂/N₁ to step voltage up or down. Live V₁/V₂ oscilloscope panels show the transformation.
Faraday's Law Mutual Induction Canvas 2D
💫
★★☆ Moderate New
Plasma — Ionized Gas
Simulate ionized gas plasma: charged particles interact via Coulomb forces and Lorentz magnetic force. Watch the electromagnetic pinch effect compress the plasma column. Choose Free, Z-Pinch or Torus confinement modes.
Coulomb Lorentz Force Canvas 2D
★☆☆ Basic New
Static Electricity
Explore static electricity: rub materials together via the triboelectric effect, watch charge accumulate on objects, visualise electric field lines, and trigger spark discharge when the breakdown voltage is exceeded.
Electrostatics Triboelectric Canvas 2D
📻
★★☆ Moderate New
Radio Wave Propagation
Explore how radio waves travel: ionospheric refraction bends HF sky waves back to Earth, while VHF passes straight through. Adjust frequency band (LF/MF/HF/VHF), antenna elevation and ionosphere height to see ground wave, sky wave and LOS modes.
Ionosphere HF/VHF Canvas 2D
💡
★★★ Advanced New
Feynman Diagrams — QED
Animated Feynman diagrams for quantum electrodynamics: Møller scattering, Bhabha, Compton, pair production, electron-positron annihilation and self-energy loop correction. Electrons, positrons and virtual photons visualised at every vertex.
QED Particle Physics Canvas 2D
🔵
Ready★★☆ Moderate New
Hall Effect
Animated charge carriers deflect under the Lorentz force in a conductor. Explore V_H = IB/(nqd), switch between n-type and p-type semiconductors, adjust current and field strength.
Lorentz Force Semiconductor Canvas 2D

Maxwell's Equations (differential form)

The complete description of classical electromagnetism in four equations

∇ · E = ρ / ε₀
Gauss's Law (Electric)
Electric field lines originate from positive charges and terminate on negative charges. Net flux through a closed surface equals enclosed charge / ε₀.
∇ · B = 0
Gauss's Law (Magnetic)
Magnetic field lines have no sources or sinks — magnetic monopoles do not exist. Every field line is a closed loop.
∇ × E = −∂B/∂t
Faraday's Law
A changing magnetic field induces a curling electric field. The basis of electric generators and inductors.
∇ × B = μ₀(J + ε₀ ∂E/∂t)
Ampère–Maxwell Law
Current and a changing electric field both produce curling magnetic fields. The displacement current term (ε₀ ∂E/∂t) unifies light as an EM wave.

Learning Resources

Articles and tutorials about the algorithms in this category

About Electromagnetism Simulations

Electric fields, magnetic force, circuits, and Maxwell equations — live

Electromagnetism simulations visualise the fields and forces that govern electricity, magnetism, and light. Electric field-line plotters compute Coulomb-force vector fields from user-placed point charges and draw smooth field lines and equipotential surfaces. Magnetic field visualisers show solenoid and toroid flux patterns computed from Biot–Savart integration.

Circuit simulations model resistors, capacitors, and inductors with nodal analysis, animating charge flow and component voltages in real time. Electromagnetic wave animations show coupled oscillating E and B fields propagating at the speed of light. These interactive models cover the core content of a university electromagnetism course — Gauss's law, Faraday's law, Ampère's law — making abstract vector fields concrete and explorable.

Electromagnetism is arguably the most consequential branch of physics for modern technology: every electric motor, generator, radio transmitter, and semiconductor device operates through electromagnetic principles. Maxwell's four equations, unified in 1865, predicted the existence of electromagnetic waves and set the stage for special relativity. These interactive simulations make the invisible fields of charges and currents directly visible, building the intuition that underpins electrical engineering and photonics.

Key Concepts

Topics and algorithms you'll explore in this category

Coulomb's LawF = kq₁q₂/r² — electrostatic force between charges
Biot-Savart LawMagnetic field from current-carrying wires
Maxwell's EquationsUnified description of electric and magnetic fields
Photoelectric EffectEinstein's photon model of light-matter interaction
Field Line TracingRunge-Kutta integration along field gradients
Equipotential SurfacesContours of constant electric potential

⚡ Test Your Electromagnetism Knowledge

5 questions — Coulomb, Faraday, Maxwell, and more

Frequently Asked Questions

Common questions about this simulation category

How are electric field lines drawn?
Field lines are traced by numerically integrating the local electric field vector using a 4th-order Runge-Kutta method. Starting points are placed symmetrically around each charge. Line density is proportional to field strength, and equipotential contours are calculated on a 2D grid using Coulomb's law summed over all charges.
How does the photoelectric simulation work?
Photons arrive at a metal surface with energy E = hf. If E exceeds the metal's work function φ, an electron is ejected with kinetic energy KE = hf − φ. Below the threshold frequency, no electrons are emitted regardless of intensity — Einstein's key insight that earned him the 1921 Nobel Prize.
What is the magnetic field simulation?
The magnetic field simulation visualises field lines around current-carrying wires using the Biot-Savart law: dB = (μ₀/4π)(I dl × r̂)/r². You can add, move, and toggle wires to see how superposition of fields produces complex patterns.

Explore Other Categories