| Abstract: |
A method is presented for flocking behavior of creatures, birds, fishes and so on, that can form herds by evading obstacles in airspace, terrain or ocean floor topography in 3D space while being efficient enough to run in real-time. This method involves making modifications to Reynolds' flocking algorithm [1,2] as following. Separation: steer to avoid crowding local flockmates. Alignment: steer towards the average heading of local flockmates. Cohesion: steer to move toward the average position of local flockmates. Each boid has direct access to the whole scene's geometric description, but flocking requires that it reacts only to flockmates within a certain small neighborhood around itself. The neighborhood is characterized by a distance (measured from the center of the boid) and an angle, measured from the boid's direction of flight. Flockmates outside this local neighborhood are ignored. The neighborhood could be considered a model of limited perception (as by fish in murky water) but it is probably more correct to think of it as defining the region in which flockmates influence a boids steering. The modifications use only local properties of the spatial restriction, and thus have low complexity and wide application. The flocking algorithm with these modification produces naturally behaving herds that follow the spatial restriction. The evading obstacles rule added to the flocking algorithm has a constant parameter that can be adjusted to produce different behaviors. |