Flocking Simulation

Peripheral Vision:

Alignment:

Cohesion:

Separation:

Flockmate Radius:

This Simulation is based upon Craig Reynolds "Boid" algorithm which simulates the flocking behavoiur of birds. Individual boid objects follow four simple steering rules:

The weights of each steering force can be manipulated by sliders. Boids can also see other neighbouring boids which are within their 'Peripheral Vision' and align towards them, this is responsible for the 'V' shape observed in bird flocks. Click on the canvas to add Boid objects.

Further Reading:

You can find the code here.