Electric Field Simulator

An electric field simulator you can play with: drop positive and negative point charges onto the canvas and watch the field lines and vectors redraw around them instantly. Build a dipole, a line of charges, or a whole cloud, and see how Coulomb's law and superposition shape the field everywhere at once. Field lines stream out of the positives and dive into the negatives — and it all runs on your device.

You are in the Physics lab.

Click empty space to drop a charge; drag charges to move them. Double-click a charge to remove it.
Charges0
Net charge0
Field lines never cross, and they always run + → −. Each line traces the direction a tiny positive test charge would be pushed, so it streams outward from every positive charge and curves in to end on a negative one. Because the field has a single, definite direction at every point, two lines can never meet or cross. Where the lines crowd together the field is strong; where they fan out it is weak.

How It Works

Coulomb's law for every charge, added up everywhere, then drawn as vectors and flowing lines.

1

Coulomb's law and superposition

Each point charge contributes a field that points along the line to it and falls off as one over distance squared — stronger charges and nearer points feel more. To get the field at any spot, the simulator simply adds up the contributions from every charge as vectors. That sum, the superposition of all the charges, is the field you see.

2

Sampling the field on a grid

In vector mode the canvas is covered with a regular grid of sample points, and the field is evaluated at each one. Every sample becomes an arrow pointing along the field there, with its length and colour set by the field's strength on a compressed scale so strong and weak regions stay readable side by side.

3

Tracing field lines

In field-line mode the simulator seeds a ring of starting points around each positive charge and walks each one forward in tiny steps, always moving along the local field direction. A line stops when it reaches a negative charge, leaves the canvas, or runs too long — producing the smooth curves that flow from positive to negative.

What is an electric field?
An electric field is the region of influence around an electric charge: at every point in space it gives the force that a small positive test charge would feel there, both its direction and its strength. Charges create the field, and other charges placed in it are pushed or pulled by it. In this simulator the field is drawn as arrows and flowing lines so you can see its shape everywhere at once.
What is Coulomb's law?
Coulomb's law describes the electric force between charges. The force between two point charges is proportional to the product of the charges and inversely proportional to the square of the distance between them: F ∝ q₁q₂/r². The field of a single point charge follows the same inverse-square form, E = kq/r², pointing away from a positive charge and toward a negative one.
What do electric field lines show?
A field line shows the direction of the electric field: the force that a small positive test charge would feel if released at that point, following the line as it curves. Where the lines bunch close together the field is strong; where they spread apart it is weak. So the lines reveal both the direction and, through their density, the strength of the field.
Which way do electric field lines point?
Electric field lines point away from positive charges and into negative charges. A positive charge is a source, with lines radiating outward; a negative charge is a sink, with lines converging inward. In a dipole the lines leave the positive charge and curve around to end on the negative one. Field lines never cross, because the field has a single well-defined direction at each point.

Teaching or blogging about physics? You can embed this on your own site free — one line of code, no sign-up.