The Equipotential Grapher

Equipotential Graph (EG) is a program to colour-code the space around a number of simulated point charges, assigning colours according to electric potential. Thus equipotentials will appear as colour boundaries. For those amongst us who don't like/understand physics, you will see that colour cycling, extreme parameters, and a smooth palette can be used to achieve hippytastic effects.

Downloads:

EG should be run from DOS or a DOS session within Windows. Parameters are passed as command line switches.

Parameters

All parameters are optional; parameters should be preceded by a dash (-).

Parameters are (at present):

ParameterDescriptionDefault value
f<filename> Specifiy script file (see below)none
w<n> Specify screen width 640
h<n> Specify screen height 480
n<n> Specify number of charges (max 100) 3
c<n> Specify range of colour band (ie. size of potential range for each colour) 0.01
r Rotate palette once the image is drawn off
p Use a smooth palette off
v Display version information off
? Display help (eg. params, etc.) off

for example,

	eg -w800 -h600 -n2
		

The w and h parameters must specify a valid resolution, or be omitted.

Valid resolutions include:

Many other resolutions are also possible.

n.b. The parameters are all CASE SENSITIVE.

Commands

While the program is running:

r - rotate palette/stop rotation
p - change to pretty palette
b - change to boring palette (b/w)
s - save image to a bitmap (egdump00.bmp)
c - calculate potential at mouse pointer
escape - quit the program

Scripts

Script files consist of the following:

PARAM statements specify parameters, as for the command line options, eg. PARAM -w800
BODY statements specify co-ordinates, and the charge of the particle, eg.

	BODY
	X=789
	Y=456
	C=-0.123
		
Everything is case-sensitive (sorry!).

White space (eg. blank lines) can be included to pad out a script, and comments *should* be ignored by the program...

Script files should have the extension '.ini'

Notes

Obviously, the larger the resolution, the more slowly the screen will be drawn. The time taken to draw the screen is proportional to (number of pixels on screen) * (number of bodies). Simple as that.

You may notice that equipotentials are not clearly visible close to a charge. This is due to the physical restrictions of the monitor (the fact that the display is not continuous, but contains a finite number of pixels). The chaotic effects become more pronounced when one changes the -c parameter to extreme values.  

Known bugs

When using the default palette, colour cycling causes the last three quarters of the palette to become corrupted.

There is currently no easy way to interrupt the program whilst it is drawing the graph.

Any questions, suggestions or criticism? Send them to william@soton.ac.uk

Back to Will's page