This project attempts to simulate flocking behavior, through the creation of simple entities called boids (birdoids). Boids, which exist on a two-dimensional plane, function through three simple rules -- alignment, cohesion, and separation.
These three simple rules cause complex behavior to emerge, which is what makes the boid simulation interesting. The algorithm was originally formulated by Craig Reynolds in the 1980s.
Install SFML (Simple and Fast Multi-Media Library) in order the run the program.
brew install sfml
sudo apt-get install libsfml-dev
Then cd
into the src
folder and run make
to produce an executable file called boids-sim
.
./boids-sim
to run the simulation. Exit with the esc.