Flow Field Following steering behavior

In this demonstration a vehicle exhibits flow field following behavior. It steers to align its motion with the local tangent of a flow field (also known as a force field or a vector field). The flow field defines a mapping from a location in space to a flow vector. Any flow field can be used as the basis of this steering behavior, although it is sensitive to high spatial frequencies and discontinuities in the field. In this demonstration the field is defined procedurally and consists of a rotational field with a radial three-lobed sinusoidal variation. The field could also be based on interpolation through a lattice of data points. The field shown here is static, but the same steering technique could be used with a time-varying field.

In this diagram, the vehicle is shown in green, its velocity vector in magenta, and its steering force vector in blue. The steering force is basically the difference between the flow direction and the current velocity. The black circle ahead of the vehicle is the point at which the field is being sampled. This location is an estimation of the vehicle's future position, based on its current velocity. The light brown vectors portray the flow field. Note that the vehicle's velocity is not always exactly parallel to the local flow field. This is due to the vehicle's inertia and the imprecise prediction of future position.

Steering Behaviors for Autonomous Characters