# how to make a graph of equipotential curves from two point charges

I'm attempting to make a graph of the equipotential curves of two point charges while showing the electric field lines. I can do the electric field lines but the equipotentials are giving me trouble.

My sample for one point charge was:

equipots1 = ContourPlot[
V1plot, {x, xmin, xmax}, {y, ymin, ymax},
ContourShading -> None, Contours -> 10, AspectRatio -> ar,
ImageSize -> Small, ContourStyle -> {{Purple, Opacity[0.6]}}
]

• What's the formula for the potential for one point source? Two? (Remember about superposition.) Once you have that, with an appropriate substitution for $r$, you can just plug it into ContourPlot. Commented Feb 6, 2017 at 3:49

Consider two charges, Q1 and Q2, centered at positions, pos1 and pos2, respectively.

k = 9*10^9;


Then, you can write a function which takes Q1, Q2, pos1, pos2, and an equivalent r as arguments.

plotEquipotential[Q1_, Q2_, pos1_, pos2_, r_] :=
ContourPlot[
k Q1/Norm[{x, y} - pos1] + k Q2/Norm[{x, y} - pos2] == k/r,
{x, -10, 10}, {y, -10, 10}
]


Example plot:

plotEquipotential[1, 2, {0,0}, {0,3}, 1]


To create a gif:

Export["equipotentialPlot.gif",
plotEquipotential[1, 2, {0, 0}, {0, 3}, #] & /@ Range[0.1, 2, 0.1],
"DisplayDurations" -> 0.2]


• Instead of crafting your own norm function, Norm does it all for you. Commented Feb 6, 2017 at 4:59
• Didn't know that. Thank you. Commented Feb 6, 2017 at 5:04