Tuesday, September 9, 2008

swarming killa bees

the goal here was to simulate the reaction of a group of bees when a hornet is introduced, as in thermo-balling introduced in a previous post. the desired effect was for the bees to be attracted to the hornet (moving their position on the grid) and also to collapse their wings.

a few shots of tinkering with position functions. it seems that the bees (yellow dots) are swarming around the hornet (point symbol), but what was unexpected was that they actually follow the hornet when it leaves the area.


i don't really know why this happens, but it turns out the function i wrote didn't make sense. so i changed it.


now the reaction makes sense.


building a skeleton for the actual bee head and wings.


i tried creating the left wing and something went wrong. the result was unexpected.


getting there. there are a few outliers where a bee's wing is significantly collapsed but it's position isn't very close. the swarming effect isn't as accelerated as i wanted, but increasing the power of the position function didn't resolve it either. ultimately i'd like to set a radius (or even sphere) of influence for the hornet, such that any bee within that radius is strongly drawn to the hornet.


i couldn't figure out how to write a function for the wing rotation based on the distance between a particular bee and the hornet, so i based the wing geometry on a triangle. the length of the bottom leg of the triangle was based on this distance.

No comments: