3D implementation of Boids
Extended for 3D from the 2D recipe "Boids Version 1.1" with guidance from Conrad Parker's pseudocode.
Boids Version 1.1: http://code.activestate.com/recipes/502240-boids-version-11 Conrad Parker's pseudocode: http://www.vergenet.net/~conrad/boids/pseudocode.html
Other references: http://fivedots.coe.psu.ac.th/~ad/jg/ch13/chap13.pdf