potential    by Artan Simeqi <artan@syslab.ceu.hu>
		http://www.syslab.ceu.hu/~artan/

	This is a simple application of the SWARM platform.
The idea is to have some electric charges, and to draw some equipotential lines
of the electric field. Equipotential line is called a line in any point of 
which the potential has the same value.

There are many ways to draw an equipotential line. One of them is to start
in a point, calculate the potential in that point, and then draw a line to
the nearest point that has the same potential. This is a good method,
but has the problem that if you want to draw many equipotential lines
for diferent configurations of the charges, you will have to decide about
the starting points in any of these configurations.

The method described here is more general. What I do, is to find the 
potential in any point of a certain surface, then divide into groups
(for example if I want to use 8 colors I divide into 8 groups) that have 
the same interval length.

I have two types of objects, objects of type Charge and object of type Ppoint.
(and of course the ModelSwarm and the ObserverSwarm objects)

In a object of type Charge, I encapsulate the position of a charge, the
charge and his sign, and also some methods. The most important of the
methods is getContributionAtX:Y:, which calculates the potential that
give the charge if it were only it, in the point from where it was called.

In a object of type Ppoint, I encapsulate the position of the point,
the potential in that point, and also the color with which it should
be drawn in the screen.

For more informations about the structure of program see the code. There
are some comments, where I thought they were needed.

HOW TO USE THE PROGRAM

It should be very easy to use the program. Anyway I don't use the Go button. 
Start the program and than click Time Step. Go with the mouse to a 
charge, click with the right button. A probe for that charge will open.
Change the charge and the sign of the charge as you like. 
Than click again Time Step. The zones with different colors will show up.
The borders between these zones are equipotential lines.
The red dots are negative charges, the yellow dots are positive charges,
and the white dots are neutral.
The blue zones are the zones where the potential is higher. The red zones are
the zones where the potential is lower.

Files of the program

	Charge.h
	Charge.m
	Ppoint.h
	Ppoint.m
	ModelSwarm.h
	ModelSwarm.m
	ObserverSwarm.h
	ObserverSwarm.m
	Makefile
	README     (this file)

The program was created, using the simpleObserverBug2 as a model (created by
Chris Langton etc.). Even some comments are originally from that program.

http://www.syslab.ceu.hu/~artan/potential.html
