Newsgroups: comp.ai
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!pipex!uunet!sparky!kwiudl.kwi.com!netcomsv!netcomsv!netcom.com!nagle
From: nagle@netcom.com (John Nagle)
Subject: Re: Flocking Boids
Message-ID: <nagleD1AKFs.DvH@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
References: <rkn-kWmy1SY6070yn@shore.net>
Date: Sat, 24 Dec 1994 01:35:52 GMT
Lines: 22

rjl@shore.net (Rich Lynch) writes:
>I have been fooling around with a flocking bird type program.  So far, 
>the birds just move around the screen randomly.  The will obey the
>boundary conditions that I have set, loop around or no boundary.

>I am just getting to the point to make them flock.  I have the algorithm
>straight in my head, no code yet.  The big question is how to let the
>birds "see" an obstruction such as a column in the flight path.

      Find Craig Reynolds' paper in SIGGRAPH a few years back to see
how he did it.

      The basic idea is that obstacles generate a field that repulses
the boids.  If you just implement that, though, the boids will abruptly sheer
off from obstacles, which looks wierd.  The trick to get around that
(which has been independently discovered by at least three people in
totally different problem domains) is
to project a point ahead of the boid where it will be at a short time in
the future.  Let the fields act on that point, and then have the boid
chase the deflected position of the projected point.

					John Nagle
