knaticat / Flocking-Simulation

A simple p5 implementation of Craig Reynolds "Boid Algorithm"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flocking-Simulation

This Simulation is based upon Craig Reynolds "Boid" algorithm which simulates the flocking behavoiur of birds. Individual boid objects follow four simple steering rules:

  1. Alignment: head towards average direction of nearby boids.
  2. Cohesion: steer towards the average location of nearby boids.
  3. Separation: Avoid Colision with nearby boids.
  4. Flee: Run away from predators.

Feautures:

  1. Two different types of Boids.
  2. Predator avoidance.
  3. Peripheral Vision.
  4. Quadtree Optimized

Inspiration

The Coding Train flocking simulation challenge-Daniel Shiffman

Live Demo: Boid Algorithm

About

A simple p5 implementation of Craig Reynolds "Boid Algorithm"


Languages

Language:JavaScript 77.8%Language:HTML 17.8%Language:CSS 4.3%