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