Δευτέρα, 20 Ιουνίου 2011

Boids!!!

http://www.red3d.com/cwr/boids/

Boids
Background and Update
by Craig Reynolds


In 1986 I made a computer model of coordinated animal motion such as bird flocks and fish schools. It was based on three dimensional computational geometry of the sort normally used in computer animation or computer aided design. I called the generic simulated flocking creatures boids. The basic flocking model consists of three simple steering behaviors which describe how an individual boid maneuvers based on the positions and velocities its nearby flockmates:
separation diagram
Separation: steer to avoid crowding local flockmates
alignment diagram
Alignment: steer towards the average heading of local flockmates
cohesion diagram
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.
neighborhood diagram
a boid's neighborhood

(More details on the algorithm can be found here.)

Δεν υπάρχουν σχόλια:

Δημοσίευση σχολίου