flocking algorithm mxj app

hello list.
here is a link to an application i made with max and java that  
implements the flocking algorithm.
http://www.robtherich.org/Flocker.dmg

most of the code was ripped off from this project:
http://www.cs.wisc.edu/graphics/Courses/cs-838-2002/Students/sohn/p2/
flock.html

to play:  mess with the variables in the front window (7 or so flonums).
open the patcher “move target” to turn on audio which controls the  
target, and adjust the speed.

not very efficient right now, but patched for ease rather than  
graphic efficiency.  patch is kind of a mess too.

i would like to have cones instead of spheres which point in the  
direction of it’s velocity vector, but my maths aren’t good enough  
today.
maybe tomorrow.  will take any hints on the correct formulas for  
doing this.  right now the velocity is spit out with the position,  
but nothing is done with it.

i think there is an external that implements the flocking algorithm,  
but i haven’t seen it yet, so let me know what you think, or if you  
want to see the java code.

thanks to all who answered questions along the way.

thanks.
-rob

Leave a Comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.