Swarm simulation
The simulation follows three simple rules that apply for all swarm members:
Move forward
Avoid neighbors
Swim into the direction of the center of gravity of your k nearest neighbors (the number k can be changed).
Please enable Java for an interactive construction (with Cinderella).