Labs · Autonomous Agents
Path Following
Reynolds' path following combines seek with a bit of geometry. Each vehicle:
- predicts where it will be a short time ahead,
- finds the closest point on the path to that prediction (its normal point, found by vector projection onto each segment),
- and, only if the prediction would leave the path's radius, seeks a target a little further along the path.
A separation force stops vehicles piling on top of each other. Inside the path they drift freely, which looks surprisingly natural.
Drag on the canvas to draw your own path. Shrink the radius to make them hug the centre line.
Controls
- Vehicles
- Path radius
- Max speed
- Max force
- Separation
- Debug: prediction & normal
- Path colour
- Vehicle colour
Evolved from Steering Behaviors.
Evolved into Phantom Traffic Jams.