The Electrostatic Field

The plotting program for gravitational fields needs little modification to deal with the inverse-square electrostatic field. No modification is needed for equal like charges at the vertices of the equilateral triangle - for negative charges the fieldlines come from infinity and terminate on a charge; for positive charges they start on a charge and go to infinity. Most systems of physical interest (such as atoms and molecules) have zero net charge. For such systems the fieldlines do not extend to infinity - they begin on positive charge and end on negative charge. The sample program plots the field about an equilateral array with charge +2Q at one vertex and -Q at each of the others. The terminology has not been changed from the gravitational case, but fieldlines are started only at the positive charge, and are terminated when they reach a negative charge. One can get a feel for how far a fieldline extends in space from the length of time it spends off scale. Some of the equipotentials also spend considerable time off scale, but close accurately when they return.

Java Source   Liberty Basic Source   BBC Basic Source

The program that uses color to plot potential has no termination condition in it, so it is even easier to extend to a +2Q, -Q, -Q charge array.

Java Source   Liberty Basic Source   BBC Basic Source

Back to Index