Electric Field from Drawn Charges ← Back to Lecture 1

This simulator visualizes the superposition of electric fields created by infinite line charges (perpendicular to the screen) that you draw on a grid. For line charges with strengths $q_i$ at positions $\mathbf{r}_i$, the field at $\mathbf{x}$ in this 2D cross-section is $$ \mathbf{E}(\mathbf{x}) = \frac{1}{2\pi\varepsilon}\sum_i q_i\,\frac{\mathbf{x}-\mathbf{r}_i}{\lVert \mathbf{x}-\mathbf{r}_i\rVert^2}. $$ The force on a test charge $q_\mathrm{test}$ at $\mathbf{x}$ is $\mathbf{F} = q_\mathrm{test}\,\mathbf{E}(\mathbf{x})$. A vertical stack of drawn cells approximates an infinite charged wall. The top and bottom edges are wrapped (periodic boundary), so the field computation wraps vertically across the top and bottom.

Draw positive (red) or negative (blue) charges on the grid. Drag the yellow test charge. Arrows show $\mathbf{E}$; the orange arrow shows the force on the test charge.

Charges: 0  •  εr: 1  •  d_scale: 10  •  E(x): 0, 0  •  F on qtest: 0
= 1 = 1
E_x slice at cursor y
Voltage V(x) along slice (left edge grounded)

Notes