Boids by Craig Reynolds, is computer model that simulates the flocking behaviour of birds. The “birds” or the boids in the model have 3 simple steering rules:
- separation: steer to avoid crowding local flockmates
- alignment: steer towards the average heading of local flockmates
- cohesion: steer to move toward the average position of local flockmates
Each boid only reacts to the neighborhood around itself. The neighborhood is characterized by a distance (measured from the center of the boid) and an angle, measured from the boid’s direction of flight. (Craig Reynolds, Boids)
How to use the simulation
Note: This applet uses javax.vecmath package that comes with the Java 3D API. Please download and install Java 3D to view this applet. Click here for installation requirements and instructions. Please restart your browser after installing Java 3D.
On the control panel on the right, there are a number of settings:
- Boids: the number of boids in the simulation
- Speed ( > 0): Pixels tranvelled per timestep
- Distance ( > 0): Boid’s neighborhood measured from the center of the boid.
- Angle (0 – 180): Boid’s neighborhood measured from the boid’s direction of flight
- Weight separation (0-1): determines how much a boid steers to avoid other local boids
- Weight cohesion (0-1): determines how much a boid steers toward the average heading of the local boids
- Weight alignment (0-1): determines how much a boid steers toward the average position of the local boids