Flocking experiment written in Javascript