Be able to input (x,y) and Coulombs of point on plane and generate electric field plot. Also be able to add as many points as possible.
Thanks This is what I want, but not random points:
SeedRandom[1234567];
q = RandomReal[{-1, 1}, 6];
r0 = RandomReal[{-3, 3}, {6, 2}]
q = q - Total[q]/6;
phi = Sum[
q[[i]]/Sqrt[({x, y} - r0[[i]]).({x, y} - r0[[i]])], {i, 1, 6}];
f = -Grad[phi, {x, y}]
Show[StreamPlot[Evaluate[f], {x, -4, 4}, {y, -4, 4},
StreamColorFunction -> "Rainbow",
StreamColorFunctionScaling -> False],
Graphics[Table[
If[q[[i]] < 0, {Blue, PointSize[.1*Abs[q[[i]]]],
Point[r0[[i]]]}, {Red, PointSize[.1*Abs[q[[i]]]],
Point[r0[[i]]]}], {i, 1, 6}]]]
Also, please remember to accept the answer, if any, that solves your problem, [by clicking the checkmark sign](http://tinyurl.com/4srwe26
– Dunlop Feb 04 '20 at 05:35qdictates how much charge each point has andr0creates their physical location. I would recommend you ask for clarification on the question in particular. Now, if you wanted to ask how to make a dynamic manipulate type of thing from this, I think that would make for a good question. Think something like clicking to add points then moving them around as you please? – CA Trevillian Feb 04 '20 at 07:02