Flocking simulation of starling murmuration using web graphics library(webGL) and openGL shader language in javascript.
Flocking is a the motion of birds together and flocking behavior is a type of behavior exhibited when a group of birds, called a flock, are in flight.
Starlings are small to medium-sized passerine birds in the family Sturnidae. It is known as murmuration, when a huge flocks of starling in migration form shape-shifting flight patterns. A good example is shown below -
The static javascript library files from three.js and soome from webGL-js.
Shader programs are the ones that are compiled in graphical processing unit.
Used CSS stylesheets in the markup code.
Images that shall be used in the front-end code.
- install npm
- install http-server (or similar package)
- run the http-server from the folder where the script is located
- Go the local server claimed by http-server
For linux users the terminal commands are as follows-
sudo apt-get install -y nodejs sudo apt-get install npm sudo npm install http-server -g http-server -c-1 or
Just run the index.html file, embedding the javascript files in it.
- Mathematical model of flocking behavior
- Boids-algorithm - Pseudocode
- Research Paper - Craig Reynold's simulation
click here
A video of falcon attack on flock of starling.