Flocking Simulation written in JavaScript