4 ms·
This is very attractive. What's the "flock size" slider? Is it the number of neighbours it keeps track of or the neighbour distance?
by hythloday 14y ago
This is very attractive. What's the "flock size" slider? Is it the number of neighbours it keeps track of or the neighbour distance?
- chris_p 14y agoIt's the number of neighbors each boid considers to calculate its velocity. There's also an option that defines the maximum distance for collision detection, but it's not accessible through the UI.
- hythloday 14y agoThanks! The canonical data structure to avoid the O(n^2) lookup is a kdtree, which I think is reasonably easy to implement in coffeescript.