Flocking in 2D
21 Dec 2011
The implementation of the flocking behaviour is taken from this website.
There are only four rules...
1. Objects try to fly towards the centre of mass of neighbouring boids
2. Objects try to keep a small distance away from other objects
3. Objects try to match velocity with near Objects.
4. Objects try to stay within the bounds of the canvas.
Javascript Demos ▼
Here's a bunch of javascript... things I wrote over the years whenever time permitted.
Abhivadaye Generator
Game of Life
Anagram Finder
Deflection Demo
Break Out
Cycloids
Double Pendulum
Flocking
Fog fly through
Fractals
EV Savings
Target Finder
Bouncing Spheres
Horizontal Stars
Image Scanning
Pandemic Simulator
JSON Beautify
Julia Sets
Kaleidoscope
Kock Fractals
Lorenz Attractor
Mandlebrot Set
Meta Balls
Number Convert
Number Game
Forces on Objects
Particles & Nodes
Simple Pendulum
Perlin Noise
Poisson Disk
QuadTree Search
8 Queens Problem
Natural Flocking
Ripples
Set Demonstration
Sine Waves
Classic Snake
Starfield
Sierpinski Triangles
Super Shapes 2D
Tic Tac Toe
Voronoi Diagram
Who Moved My...