Skip to content

StavFaran92/Boids

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Boids Simulation

This is a 2D Boids simulation I created using SFML and TGUI, it simulates a flocking mechanism that is based on 3 basic rules: Cohesion, Seperation and Alignment, using these 3 simple rules we can observe an emergence effect that resembles the mechanism we can see in nature in a flock of birds, the project is written in C++, I used SFML to handle the graphics and TGUI for the user interface to control the simulation. currently the flock calculations are done in brute force (for every boid we check every other boid o(n^2)) but this can be optimized using a quad-tree to get a o(nlogn) complexity.

Installation

Download the source files

git clone git@github.com:StavFaran92/Boids.git

Once downloaded go into the cloned directory, in order to build the example you will need cmake, simply type

mkdir build
cd build
cmake ..

if everything worked fine a Visual studio solution has been generated, open build/BoidsExample.sln and build the solution.

if you are facing any issues fill free to contact me.

Further reading

I used the following to get information about the above algorithms:

Link 1

Link 2

Link 3

Link 4

Link 5

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages