This is a simulation of bird flocking.
Birds follow three rules when flocking:
The birds are colored by the direction they're facing, to distinguish groups.
Play around with the parameters and control the white bird with your mouse. Happy flocking!
Based on this paper: Flocks, Herds, and Schools: A Distributed Behavioral Model