Monday, 20 October 2014

A Murmuration of Arrows

Viscek Model

Flocks of birds are an interesting example of complex dynamics arising from individual agents interacting without a central controller. Computer models of flocks begin with boids and get more and more complicated. Here I made a program to run a simple model called the Viscek Model. The rules are that every bird (drawn as an arrow) tries to fly in the average direction that all his neighbours are flying. There is a certain radius that each bird can see and a certain amount of randomness in the steering.

I also added a different kind of bird species that the birds do their best to avoid, drawn as dots, call them planes. If a bird is approaching a plane it tries to steer away from it, while also staying in the flock. The closer a bird is to a plane the more the plane affects the direction of the bird. Click the screen to make a plane appear. Notice that the flocks get denser with the planes flying around, similarly to predators chasing real herds, or dogs rounding up goats.

No comments:

Post a Comment