eureka
experiment 017 · electromagnetism · coulomb's law

Electric Field Lines

Click to place point charges, watch Coulomb's law draw itself in real time. Field lines originate on positive charges and terminate on negative ones — their density encodes field strength. Equipotential surfaces are perpendicular to every line they cross. Click an existing charge to remove it.

Coulomb's law and the field

A point charge q at position r₀ creates an electric field at every other point r:

$$ E(r) = \frac{1}{4\pi\epsilon_0} \frac{q(r-r_0)}{|r-r_0|^3} $$

For a collection of charges the total field is the vector sum — the principle of superposition, which holds exactly in classical electrostatics. The simulation integrates streamlines of E by adaptive Euler stepping, starting from points on a small circle around each charge.

Field lines and Gauss's law

Field lines are tangent to E everywhere. Gauss's law guarantees that the number of lines entering or leaving a closed surface is proportional to the enclosed charge. This means:

— Lines originate only on positive charges (sources)
— Lines terminate only on negative charges (sinks)
— Lines never cross (E is single-valued)
— Line density is proportional to |E|

An isolated positive charge has lines radiating to infinity; pair it with a negative charge (a dipole) and all lines connect — the total flux through any sphere enclosing the pair is zero.

Equipotentials

The electric potential V satisfies E = −∇V. Surfaces of constant V (equipotentials) are therefore everywhere perpendicular to the field lines — a consequence of the fundamental identity ∇V · E = −|E|². The dashed contours are computed on an 80×80 grid using marching squares. Near a single charge the equipotentials are spheres; near a dipole they become the classic peanut-shaped curves of oblate spheroidal coordinates.

What to try

Start with Dipole and toggle field vectors to see how E points along the gradient of V. Switch to Quadrupole — two positive and two negative charges alternating at the corners of a square — and observe the four saddle points where E = 0. Add extra charges to the presets to break symmetry and watch how the null points rearrange. The Mixed preset (charge ratio 2:−1:−1) shows how an asymmetric distribution still satisfies Gauss's law: all flux from the double charge terminates on the two negatives.

← back to workshop