Tuesday, February 24, 2009

Improvements in flocking algorithm

This post represents improvements after multiple iterations in my flocking algorithm. I fixed a bug where my "maximum" acceleration was actually coded as a minimum acceleration. I removed the drag component outright, and spent some time tweaking the various parameters of avoidance strength and maximum acceleration. I even put in a counter to track the closest that two particles ever come to each other.

This animation represents a flocking simulation done with 150 particles across 400 frames in povray. It has a pretty nice feel for gracefully avoided near-collisions.



No comments: