https://github.com/felixgro/boids-simulation
Implementation of Craig Raynold’s boids algorithm with additional options to visualize all applied forces.
https://github.com/felixgro/boids-simulation
boids-algorithm simulation visualization
Last synced: about 1 month ago
JSON representation
Implementation of Craig Raynold’s boids algorithm with additional options to visualize all applied forces.
- Host: GitHub
- URL: https://github.com/felixgro/boids-simulation
- Owner: felixgro
- License: mit
- Created: 2021-03-18T23:09:19.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-12-01T23:34:08.000Z (about 4 years ago)
- Last Synced: 2023-03-10T17:56:05.208Z (almost 3 years ago)
- Topics: boids-algorithm, simulation, visualization
- Language: TypeScript
- Homepage: https://felixgro.github.io/boids-simulation/
- Size: 223 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# boids-simulation
Implementation of Craig Raynold’s boids algorithm written in Typescript.
[_See Demo_](https://felixgro.github.io/boids-simulation/)
## Boid.. what?
The Boid (bird-oid object) alogrithm simulates flocking behaviour of birds & was originally developed by Craig Raynolds in 1986.
In the original implementation each Boid makes decicions based on the following 3 rules:
- **Alignment:** Boids try to change their position in order to correspond with the average alignment of other Boids within it’s view.
- **Cohesion:** Each Boid attempts to move towards the average position of other Boids within it’s view.
- **Seperation:** Each Boid attempts to maintain a reasonable amount of distance between itself and any nearby Boids in order to prevent overcrowding.
## Setup
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
### Installation
Download the project using [git](https://git-scm.com/).
```bash
git clone https://github.com/felixgro/boids-simulation.git
cd boids-simulation
```
Install Dependencies and build using [yarn](https://yarnpkg.com/) or [npm](https://www.npmjs.com/).
```bash
npm i
# or
yarn
npm run build
# or
yarn build
```