Skip to content
/ Boids Public

An implementation of the Boids program using C++ and the SFML library.

License

Notifications You must be signed in to change notification settings

jyanar/Boids

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Boids

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.

  • Alignment causes boids to match velocity of nearby boids.
  • Cohesion causes boids to seek the center of mass of the nearest clump of boids.
  • Separation prevents boids from getting too close to each other.

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.

Running the simulation

Install SFML (Simple and Fast Multi-Media Library) in order the run the program.

  • Windows: See here for a version that runs through Visual Studio.
  • OS X: brew install sfml
  • Ubuntu / Debian-based distros: 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.

About

An implementation of the Boids program using C++ and the SFML library.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published