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.
Positive charges0
Negative charges0
Net charge0
Total charges0
View modeField lines
ConfigurationDipole
Positive: source. Lines point out.
Negative: sink. Lines point in.
Crowded lines = strong field; spread out = weak.

How to read the picture: line direction shows which way a positive test charge is pushed (always + → −), and line density shows the field's strength — the denser the lines, the stronger the field.

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.

Reading the simulation

What the arrows, the line spacing and the readout are telling you.

1

Direction: which way the field points

Every arrow — and every field line — points the way a tiny positive test charge would be pushed if you let it go there. That means the field streams out of positive charges (orange, a source) and into negative ones (blue, a sink). Switch to Vectors and each grid arrow shows the local direction; switch to Field lines and those same directions join up into smooth curves that always run + → −.

2

Density: where the field is strong

The spacing of the lines encodes the strength. Close to a charge, or between two opposite charges, the lines crowd together and the field is strong; far away they fan out and it weakens. In vector mode the same story is told by arrow length and colour — longer, warmer arrows mark the strong regions. Drag the Field detail slider to draw more or fewer samples without changing the physics.

3

Superposition: many charges at once

Add more charges and the field at every point is the vector sum of what each charge contributes on its own — that is superposition. Lines still begin on positives and end on negatives, but now they bend around neighbours: try the Dipole, Two positives and Parallel plates presets and watch the readout update the positive, negative and net-charge counts as the shape of the field changes.

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.

Classroom activity

A ready-to-assign lab using the simulation above. Free to use — nothing to install or sign up for, and no student data leaves the browser.

High school, College10–20 minInteractive simulation

Learning objectives

  • Interpret electric field lines and their direction.
  • Apply superposition of fields from multiple charges.
  • Relate field strength to distance and charge.

Variables to change

  • Charge sign
  • Charge magnitude
  • Charge positions

Procedure

  1. Place a single positive charge and observe the field-line pattern.
  2. Add a negative charge of equal magnitude nearby (a dipole) and observe the lines.
  3. Add a second like charge and observe how the fields combine.

Observations

Sketch the field-line patterns for a single charge, a dipole, and two like charges.

Questions

  1. Which way do field lines point relative to a positive charge? A negative charge?
  2. What does the density of field lines indicate?
  3. How does electric field strength depend on distance from a point charge?
  4. What is the field like between two equal and opposite charges (a dipole)?
  5. How do you find the total field from several charges?

Explanation

Electric field lines point away from positive and toward negative charge, with density showing strength. A point charge’s field weakens as 1/r². For multiple charges the total field is the vector sum (superposition) of each charge’s field.

Answer key (for instructors)
  • 1. Away from positive charges and toward negative charges.
  • 2. Field strength — lines are closer together where the field is stronger.
  • 3. It falls off as 1/r² (E = k·q/r²).
  • 4. Field lines run from the positive to the negative charge, densest between them.
  • 5. By vector superposition — add the individual field vectors at each point.

Educators: link or embed this simulation freely in your LMS or course guide.

Add This Electric Field Simulator to Your Website

Put the Electric Field Simulator on your own page — free, no sign-up, no watermark. It runs entirely in your visitors' browsers. Copy the snippet and paste it into your page's HTML.

The credit line under the widget links back to LK Forge — please keep it so others can find it too.