Ponomaryov I. V., Volkova A. A., Kalinin I. M., Znanetska O. M.
Oles Honchar Dnipropetrovsk National University
COMPUTER MODEL OF BEHAVIOUR IN A FLOCK OF BIRDS
The theory of the method was developed by Craig Reynolds. He is a Research Game Developer at the Center for Game and Playable Media at the University of California,Santa Cruz. His interests center around using procedural models (computer programs) to simulate complex natural phenomenon. These models can aide scientific understanding of the natural system. They also allow us to recreate and control the phenomenon for use in animation, games and the arts.
Much of his work involves writing software to simulate various types of human and animal behaviour. These programs control the actions of autonomous characters in virtual worlds.
The essence of the work is creating a program in C#, which simulates the behaviour of a flock of birds when a hunter pursues it.
This model corresponds to the social behaviour of people, that’s why it is the matter of topical interest. Flocks of birds behaviour seems to be complicated, but actually it can described by three main rules formulated by Craig Reynolds:
1) do not collide with their neighbors in a flock (Separation);
2) move in the same direction as your nearest neighbours in the flock (Alignment);
3) change your position in space according to the position of the nearest neighbours in the flock (Cohesion).
C# is an object-oriented language with the help of which it’s easy to create some typical classes of birds, predators, movement, the region of space where they exist, the speed, the acceptable range of distances among them.
The program allows you to change the parameters of the individual classes and study their influence on the formation of the flock behaviour.
This model is designed for the case when the speed of a flock is less than the speed of predator birds. Minimum acceptable distance between the birds must be 30 pixels, because one bird occupies a region of space 16x16 pixels. If a bird gets too close to the other bird, it reduces its speed. If the distance between two birds is getting too long, there will be maximum speed. Thus, there is the implementation of the principle: «do not collide with your neighborus in the flock».
The standard class Matrix was used to implement the principle of moving in the same direction as the neighbours. Coordinates of the rotation matrix is calculated by the values of the neighbouring birds coordinates and the angle between their movement directions.
The list of references:
1. Алгоритм роя частиц [Electronic resource]. – Mode of access: http://www.habrahabr.ru/ post/105639/
2. Graig Reynolds [Electronic resource]. – Mode of access: http://www.red3d.com/ cwr/index.html
3. Boid’ы, птички и Unity3D [Electronic resource]. – Mode of access: http://www.pvsm.ru/unity3d/ 36029/print/