Project-p simulates particle interaction based on a simple rule.
As the program continues to run, a group of particles can join together to form a train, and the simulation allows for many such trains to form. The phenomenon of the trains forming is unpredictable, but it happens every time the program runs. For instance, if particle A moves away from particle B as particle B moves towards particle A, we get a self-propelling train.
The particles in project-p move towards or away from another particle by a set amount known as D along the line that connects the particles. As a result, a particle can't move towards or away from itself, and a particle watching another particle won't move either. Such a particle waits for the observed particle to come closer or move farther away before moving towards, away, or observing another particle.
If there's only one particle in the system, it can't move towards or away from itself. If it observes itself, it won't move unless it continues to watch itself- which would get monotonous. It follows then that a single particle in the system will stay in its position.
On the other hand, if there are two or more particles in the system, there are interesting outcomes as they interact with each other. When particle A remains stationary and particle B moves towards A, if B is separated by a multiple of D (M), it will collapse into A in M steps. Alternatively, if B is separated by a multiple of D (M) and some additional distance N, B will orbit A in M steps. The same outcome occurs if A moves towards B while B moves towards A, although it occurs much faster, in roughly M/2 steps.
The program's requirements include SDL (libsdl.org) and freeglut (freeglut.sourceforge.net). These two are necessary to ensure the program works correctly. Overall, project-p is an intriguing, informative, and exciting program that's worth exploring.
Version 2.0: N/A