Individual wolves hunt individual deer on a steppe while the textbook equations run beside them. Watch the two populations chase each other round the phase portrait, then change the rules and see why cycles grow or die out.
Green curve: deer nullcline (deer stop changing). Orange line: wolf nullcline. Arrows: direction of the equations. White: individual-based trail; cyan dashed: the equations from the same start.
Each button runs headless simulations with the current settings and tabulates the result.
The science
Equations (Rosenzweig-MacArthur 1963). Deer N and wolves P obey dN/dt = r N (1 − N/K) − F(N) P and dP/dt = e F(N) P − m P, where the Holling type II functional response is F(N) = a N / (1 + a h N) (deer killed per wolf per year), h = handling time (the days a wolf spends feeding after a kill, divided by 365), e = wolves born per deer eaten and m = wolf death rate. Setting h = 0 and K → ∞ gives the classic Lotka-Volterra pair with neutral cycles, conserved quantity V = e a N − m ln N + a P − r ln P and small-cycle period T = 2π/√(r m).
Equilibrium and stability. Coexistence needs e > m h; then N* = m / (a (e − m h)) and P* = r (1 − N*/K)(1 + a h N*) / a. The equilibrium is stable when N* > (K − 1/(a h)) / 2; when K is raised above Kc = 2N* + 1/(a h) a Hopf bifurcation turns the spiral into a limit cycle (the "paradox of enrichment": feeding the deer destabilises the system).
Individual-based model. One step is one day on a 300 m by 300 m reflecting arena. Deer take a correlated random walk (about 9 m/day) and run away at 18 m/day from a wolf within 16 m. A wolf that is not feeding wanders at 26 m/day, chases the nearest deer inside 14 m at 34 m/day and, when it arrives, kills with probability 0.5 per attempt; it then feeds for Th days. Each deer gives birth with probability r/365 per day and dies of crowding with probability r (N/K)/365, so the mean follows logistic growth. Each kill adds e to a pool and every full unit of the pool becomes a cub; wolves die with probability m/365 per day. Because encounter, chase and handling emerge from the movement rules, the kill rate per wolf saturates by itself near 1/h: that is the Holling type II curve, and the "Measure the functional response" experiment shows it.
Simplifications. No age, sex, season, terrain, packs or disease; uniform arena; the encounter coefficient a is not an input of the individual-based model but a result of its geometry (default a = 0.30 was measured from it and then entered into the equations). Rates r, m, e and the sizes are illustrative and tuned for a small arena, not wolf or deer field data; real wolf-prey systems also depend on migration, alternative prey and winter. With few animals, chance (demographic noise) makes the individual-based run wander around the equations and sometimes go extinct, which the deterministic equations cannot show. Wolves and deer models: Blender-built named-part meshes with a procedural gait.
Spot-check list. Rosenzweig and MacArthur (1963) criterion; Holling (1959) type II response; the numbers above are model constants, not measurements.
Made with Blender and Three.js.