3D Boid Model

The Boid model is a famous multi-agent model that was invented by Craig Reynolds. Each Boid is an agent following three simple rules: (1) Align with other neighbors; (2) Try to be close to neighbors; (3) Avoid collision with other neighbors. These rules can make the flock of Boids reproduce the behaviors of real bird flocks or fish schools. Push the Play button to trigger the simulation, and adjust the number of Boids, the size of the world and other parameters by using the sliders, then enjoy yourself.

(60 lines omitted)

Normally, animations in Mathematica made by animation functions are played with a list of histories. This method has lots of weak points, such as fixed history size and massive computation before performing. Actually, this Demonstration shows that manipulation and animation functions can be also used as triggers to invoke simulation steps. This makes it possible to realize real-time simulations in Mathematica.
comments
 
Powered by Wolfram Mathematica
Give us your feedback
Give us your feedback

Source page:




 often  occasionally  never

Note: Please do not include anything you consider confidential or proprietary. Your message and contact information may be shared with the author of any specific Demonstration for which you give feedback, but will not otherwise be published or distributed.
Privacy Policy »

Note: To run this Demonstration you need the free
Mathematica Player
or Mathematica 7+
Download or upgrade to Mathematica Player 7
I already have Mathematica Player or Mathematica 7+