The repository contains the code for simulating the flocking movement of boids. The project is done in Processing and implements the flocking behaviour of boids in 3D. This project is a part of COP290 course at IIT Delhi.
Boids is an artificial life program, developed by Craig Reynolds in 1986, which simulates the flocking behaviour of birds. The name “boid” corresponds to a shortened version of “bird-oid object”, which refers to a bird-like object.
The boids move individually, but ahdering to some set of rules. The three most basic rules (that are also implemented in the current project) describing the individual behaviour are:
Besides, the following rules are also implemented for a more real simulation:
Key ‘,’ -> Change Boundary to Cube.
Key ‘.’ -> Change Boundary to Sphere.
Key ‘-‘ -> Decrease Scale (Size).
Key ‘=’ -> Increase Scale (Size).
Key ‘E’ -> Enable/Disable Energy Effect.
Key ‘P’ -> Pause Simulation.
Key ‘S’ -> Run the Simulation Frame by Frame.
Key ‘C’ -> Continue Simulation.
Key ‘B’ followed by click -> Add Boids.
Key ‘A’ followed by click -> Add Obstacles.
Key ‘1’ -> Enable/Disable Alignment Rule.
Key ‘2’ -> Enable/Disable Separation Rule.
Key ‘3’ -> Enable/Disable Cohesion Rule.
Key ‘4’ -> Enable/Disable Obstacle Avoidance Rule.
Processing is a flexible software sketchbook that is used for rendering animations easily and interactively. The present project is also made on Processing.
The code can be used either by downloading Processing for your respective OS, or alternatively, an standalone Java application can be used as well.
The documentation, mathematical model and specification for the current project can be found in the /doc/ folder in the root repository folder.