Neat Algorithms - Flocking
This is covered very well (a long with many other neat algorithms) in The Computational Beauty of Nature[1], one of those books I keep coming back to[1] http://mitpress.mit.edu/books/FLAOH/cbnhtml/