Simulating flocking behavior based on Craig Reynolds algorithm.