This JavaScript Boids effect is a simulation of flocking/schooling behavior (e.g. birds, fish). A very helpful JavaScript code to practice yourself.
Boids in JS (2 dimensional). Boids are a simulation of flocking behavior.
2000+ free JavaScripts at www.JavaScriptBank.com