Click anywhere in the canvas to set a goal, click again to unset.
HTML5 implementation of the boids model of coordinated animal motion.
Boids is a computer model of coordinated animal motion such as bird flocks and fish schools. The model consists of three simple rules that describe how an individual boid moves based on the positions and velocities of its nearby boids:
Note that this implementation is a little different from the original model, and doesn’t aim to recreate the exact same behavior. This aims to be an HTML5 visualization of the model that is configurable and performs well with as many boids as possible. The code is open-source and hopefully, easy to read and tweak.
The original model was developed by Craig Reynolds.
You can configure the simulation to some extend without touching the code or leaving your browser. Click on the option button to the right and you will be presented with certain configuration options that can significantly alter the boids’ behavior. Here’s a more detailed explanation of the sliders: