๐Ÿ˜ Elephant Herd โ€” Follow the Leader to Water for Kids

Watch the matriarch lead a family of elephants to water across a 3D savanna. Change the rules and see how the herd moves.

Switch to 2D

Presets

Where to?

Click the ground to plant a flag. Drag to turn the view, right-drag or two fingers to slide it, wheel or pinch to zoom.

How the herd follows

Playback

Herd and rules

Camera

Layers

Quality

Model checks

The science

Why do herds follow a leader?

African elephant families are led by the matriarch, usually the oldest female. She remembers where water and food were found in earlier years, and the others copy where she goes. Following a leader is cheap for each animal: it needs only a few simple rules, not a map of the whole savanna.

The rules in this model

Every elephant is a point with a position x and a velocity v. Each moment it works out a desired velocity v* and then relaxes towards it:

dv/dt = (v* - v) / τ with τ = 0.8 s, and the heading may turn at most ω radians per second.

The matriarch has v* = vL pointing at the target, slowing down smoothly near the water. A follower adds up several steering terms:

  • Follow: v*f = min(K · d, 1.5 vL) towards its slot, where d is the distance to the slot and K the follow strength. A slot is a place behind and beside the leader (Leader slots), behind the elephant in front (Single file) or the leader itself (Boids flock).
  • Personal space: a push away from any neighbour closer than the personal-space distance, stronger when very close.
  • Stay together / match neighbours (Boids only): a pull to the average position and the average velocity of nearby adults, like Reynolds' boids.
  • Obstacles: trees, rocks and termite mounds push the herd sideways so it flows round them.
  • Wandering: a random drifting velocity (an Ornstein-Uhlenbeck process) that stands for distraction. Calves also try to stay beside their mother.

What the numbers mean

Polarisation Φ = |Σ v̂i| / N, where v̂ is the unit heading of each moving elephant. Φ = 1 means everyone walks the same way; N random headings give about √(π/N) / 2. Spread is the root-mean-square distance from the herd centre. Follow lag is how far each follower is from its slot.

With the follow law above a follower behind a leader moving at speed u settles at a gap of u / K: a faster leader or a weaker follower means a longer trail. The page tests this, the leader's travel distance vL(T - τ(1 - e-T/τ)) and the polarisation formula against the running code (see Model checks).

Thirst and water

Thirst grows steadily and falls while an elephant stands within a few metres of the water. Drinking is counted in litres: a full thirst bar is 200 L for an adult and 80 L for a calf, in line with the roughly 100 to 200 litres a big elephant can drink in a day.

Honest simplifications

Real herds also split and merge, rest in the shade, communicate by low rumbles and choose routes from memory and smell. Here the leader goes straight to a chosen target; there is no hunger, no heat, no seasons and the ground is flat for the steering (the 3D hills only change the picture). Speeds and distances are realistic orders of magnitude, not measurements of a particular herd.

What to try
  • Press Drought dash: thirst rises fast, the matriarch hurries and the follow lag graph shows the tail stretching out.
  • Switch between Leader slots, Single file and Boids flock and compare polarisation and spread.
  • Drag the Follow strength slider to zero: the herd no longer follows. Then raise it and watch the gap shrink as u / K.
  • Click the ground to plant a flag and send the matriarch somewhere new. Click inside a waterhole to send everyone to drink.
  • Turn Wandering up to see a distracted herd, then switch on Match-neighbours pull to see order come back.
Loading model...
Loading Blender model...
Did you know?
Polarisation: how aligned is the herd?
Follow lag and herd spread (m)
Thirst of the herd (%)
Made with ๐ŸŸ  Blender ยท Three.js