There are 400 birds in the flock. The simulation uses the 'Boid' approach to determine the flight of each bird. In effect each bird takes action to avoid collision with its nearest neighbours and any other objects (trees, screen edges, etc.) whilst maintaining the average velocity and direction of travel of its nearest neighbours. When the flock approaches a tree, any bird can decide to roost in the tree or alternatively join the flock if there is insufficient room on a branch. Open the control panel to adjust the simulation parameters.