This simulation needs WebAssembly, and it could not start in this browser.
The image is a frame from a real run. Check that JavaScript is on, or try another browser.
Michael Faraday pictured the space around a charge as filled with lines of force long before anyone could write down the field. In his Experimental Researches in Electricity, published from 1831 to 1855, the lines carried the physics: they start on positive charges, end on negative ones, and crowd together where the force is strong. James Clerk Maxwell began turning the picture into mathematics in 1855 with his paper On Faradayโs Lines of Force, and field lines and equipotentials have been the standard way to see an electric field ever since.
What you see
A few fixed point charges sit on the canvas, red for positive and blue for negative. Five layers can be switched on and off. The Potential color map tints every point by the potential: red where it is positive, blue where it is negative, brighter for larger on a logarithmic scale. Equipotential lines are contours of constant potential at , amber for positive and cyan for negative values; each level doubles the previous one, so the contours crowd together near the charges. Field lines start 8 pixels from each charge in 16 evenly spaced directions and follow the field direction in steps of 3 pixels until they reach the edge of the canvas or come within 8 pixels of another charge. Lines from positive charges are red and run outward, lines traced from negative charges are blue and run inward. The Flow animation moves arrowheads along the field lines in the direction of the field, away from positive and toward negative charges. The Field arrows sit on a 24 by 24 grid and point along the field. Their length grows as relative to the median field strength on the grid, within fixed bounds, so the arrows near the charges are longer without hiding the weak field far away; cells within 20 pixels of a charge stay empty.
The charges never move, so Play, Pause and Step change nothing in the picture. The flow animation runs on the clock of the browser: it keeps moving while the simulation is paused, and the Speed slider does not affect it.
Governing equation
The potential of point charges at positions is the superposition
in units where the Coulomb constant is 1, with every charge of magnitude 500 and distances in pixels. This is the field of charges in three dimensions, shown in the plane that contains them. A field line is a curve whose tangent is everywhere parallel to , , and it crosses every equipotential at a right angle. By Gaussโs law in these units, so the number of lines leaving a charge in three dimensions is proportional to its charge. In a flat drawing with a fixed number of lines per charge, the density of lines falls off as near a charge while the field falls off as , so line density shows only roughly where the field is strong.
Presets
Electric dipole: a positive and a negative charge 300 pixels apart. Of the 16 lines leaving the positive charge, the 9 aimed roughly toward its partner arc over and end on the negative charge; the other 7 swing out and leave the canvas, as they would reach the other charge only far outside it. The potential is zero on the perpendicular bisector, where the color map goes dark, and every drawn equipotential surrounds one of the two charges.
Like charges: two positive charges 300 pixels apart. All lines bend away from the other charge and run to the edges, except the two that start along the line joining the charges: they stop where the fields cancel, midway between the charges. This neutral point is a saddle of the potential, with . Equipotentials above that value close around each charge separately, the ones below it enclose both.
Quadrupole: four charges of alternating sign on the corners of a square with 250 pixel sides. Most lines, 24 of the 32 that leave the two positive charges, end on one of the two negative neighbors. The potential is zero on the two lines through the center parallel to the sides, which split the color map into four quadrants, and the field vanishes at the center, where the two lines aimed along the diagonals stop.
Parameters
All five switches act at once.
Potential color map: shows the potential as a red and blue background.
Equipotential lines: draws the contours of constant potential.
Field lines: draws the field lines.
Flow animation: moves arrowheads along the field lines.
Field arrows: draws the arrow grid, off by default.
Flow speed: how fast the arrowheads move, from 0.1 to 5; at 1 they cover 40 pixels per second.