Home▸Animals & Their World▸Zebra Waterhole Lab (2D)

🧪 Zebra Waterhole Lab (2D)

A 2D top-down flocking lab: a dazzle of zebras cycles between grazing ground and a waterhole under real separation/alignment/cohesion steering, with heat and leader confidence as genuine, live-tunable parameters.

Animals & Their World2DModerate60 FPS📱 Mobile-adapted💧 Water⇄ 3D version
2d-zebra-waterhole-lab ↗ Open standalone

This 2D companion swaps the 3D scene for a plain top-down canvas built to read the steering behaviour directly: every zebra sums a separation force (keep clear of close herd-mates), an alignment force (match the local group's average heading) and a cohesion force (drift toward the local group's centroid) with a seek force toward whichever waypoint it's currently walking to — the grazing ground or the waterhole — then lingers a few seconds on arrival before turning back, so the dazzle cycles continuously between the two. Heat level and leader confidence are real parameters, not cosmetic: heat raises the seek force and top speed while shrinking each animal's comfort radius, so the herd visibly bunches tighter as it nears the water under heat stress; leader confidence raises the alignment weight and damps random wander, holding the group to a straighter, more parallel line.

⚙ Under the hood

2D top-down zebra flocking lab: real separation/alignment/cohesion steering plus a seek force toward a cycling grazing-ground/waterhole waypoint, with heat and leader confidence changing spacing, speed and route directness live.

ZebraWaterholeBehaviorFlocking

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)