This model is inspired by the Boids simulation invented by Craig Reynolds. Just subtracting the numbers, or averaging the numbers, doesn't give you the results you'd expect, because of the discontinuity where headings wrap back to 0 once they reach 360. Notice the need for the subtract-headings primitive and special procedure for averaging groups of headings. Or, you could simulate the diminished air resistance that birds experience when flying together by making them fly faster when in a group.Īre there other interesting ways you can make the birds different from each other? There could be random variation in the population, or you could have distinct "species" of bird. ![]() What would happen if you gave the birds different velocities? For example, you could make birds that are not near other birds fly faster to catch up to the flock. What happens if you put walls around the edges of the world that the birds can't fly into?Ĭan you get the birds to fly around obstacles in the middle of the world? Is there some way to get V-shaped flocks, like migrating geese? What happens if birds can only see in front of them? The in-cone primitive can be used for this. EXTENDING THE MODELĬurrently the birds can "see" all around them. Will running the model for a long time produce a static flock? Or will the birds never settle down to an unchanging formation? Remember, there are no random numbers used in this model. Is one rule by itself enough to produce at least some flocking? What about two rules? What's missing from the resulting behavior when you leave out each rule? You can turn off a rule entirely by setting that rule's angle slider to zero. Play with the sliders to see if you can get tighter flocks, looser flocks, fewer flocks, more flocks, more or less splitting and joining of flocks, more or less rearranging of birds within flocks, etc. How does this happen? You may need to slow down the model or run it step by step in order to observe this phenomenon. Sometimes a bird breaks away from its flock. Why do you think this is?Īfter running the model for a while, all of the birds have approximately the same heading. A flock, once together, is not guaranteed to keep all of its members. The fluid, lifelike behavior of the birds is produced entirely by deterministic rules.Īlso, notice that each flock is dynamic. There are no random numbers used in this model, except to position the birds initially. THINGS TO NOTICEĬentral to the model is the observation that flocks form without a leader. VISION is the distance that each bird can see 360 degrees around it. Three TURN-ANGLE sliders control the maximum angle a bird can turn as a result of each rule. However, you can play with them to get variations: ![]() The default settings for the sliders will produce reasonably good flocking behavior. Press SETUP to create the birds, and press GO to have them start flying around. HOW TO USE ITįirst, determine the number of birds you want in the simulation and set the POPULATION slider to that value. Each bird always moves forward at the same constant speed. ![]() The three rules affect only the bird's heading. When two birds are too close, the "separation" rule overrides the other two, which are deactivated until the minimum separation is achieved. ![]() "Cohesion" means that a bird will move towards other nearby birds (unless another bird is too close). "Separation" means that a bird will turn to avoid another bird which gets too close. "Alignment" means that a bird tends to turn so that it is moving in the same direction that nearby birds are moving. The birds follow three rules: "alignment", "separation", and "cohesion". Rather, each bird is following exactly the same set of rules, from which flocks emerge. (The resulting motion also resembles schools of fish.) The flocks that appear in this model are not created or led in any way by special leader birds. This model is an attempt to mimic the flocking of birds. You can also Try running it in NetLogo Web If you download the NetLogo application, this model is included.
0 Comments
Leave a Reply. |