This simulation needs WebAssembly, and it could not start in this browser.
The image is a frame from a real run. Check that JavaScript is on, or try another browser.
The Lotka-Volterra equations, set up independently by Alfred Lotka in the early 1920s and Vito Volterra in 1926, describe prey that multiply and predators that live by eating them. In the original form the two populations oscillate forever on closed orbits whose size depends on where they start. This version follows the model Michael Rosenzweig and Robert MacArthur used in 1963. The prey grow logistically up to a carrying capacity K, a predator needs a handling time h for each prey it catches, so it eats at most 1/h prey per unit time, and both species spread by diffusion across a square grid.
The handling time is what keeps the motion alive. Without it, the logistic term damps the oscillations and every cell settles into the same equilibrium. With it, the equilibrium becomes unstable once the prey can grow to a large enough population, and every cell runs around a limit cycle of fixed size and period, a result Rosenzweig called the paradox of enrichment. The grid is then an oscillatory medium: neighboring cells that are out of phase pass the oscillation on as a wave, and a point around which the phase winds once becomes the center of a rotating spiral.
What you see
The prey density , in the viridis colormap by default, stretched each frame between the current minimum and maximum. Predators are not drawn. Twenty steps are taken before the first frame. All presets use the default rates α = 1, β = 1, γ = 0.4, δ = 1, K = 3 and h = 1, at which a single cell oscillates with a period of about 18 time units, a little under a second on screen, with the prey between 0.08 and 2.3.
Spiral waves: . The prey and predator densities start with a phase that winds once around a point one third of the way across and once the other way around a point two thirds across. Each point becomes the tip of a spiral, and the two spirals turn in opposite directions and send waves out across the grid.
Patchy coexistence: . Both densities start within 20 % of the equilibrium at random in every cell. Diffusion first smooths the noise, then the remaining phase differences grow into many small spirals that collide and break up, so the grid stays a shifting patchwork of prey and predator patches.
Local oscillations: , so the cells hardly interact. The prey start from a smooth random landscape, the predators at their equilibrium value. Every cell runs around the same limit cycle, but each with its own phase, and the picture shows bright bands sweeping over the grid as neighboring regions reach their prey maximum one after another.
Predator invasion: . Prey fill the grid at the carrying capacity, and predators are released in a small square at the left edge. The predators spread as a ring that eats the prey down, and behind its front the populations keep oscillating, so rings of prey and predators follow it outward. On the far side of the grid the ring meets itself across the periodic edges.
Governing equation
with prey density and predator density . If the two species can coexist at
provided . The prey isocline has its maximum at . Left of that hump the equilibrium is unstable and the cell oscillates on a limit cycle; right of it the oscillations are damped. At the defaults lies left of the hump at , and the oscillations set in above . For the response is linear, the hump disappears, and the equilibrium is always stable. The grid is advanced with explicit Euler steps, and , using the five-point Laplacian, four steps per frame. This is stable only for , that is , and the diffusion sliders stop at 2.
Parameters
α (prey birth rate), β (attack rate), γ (predator death rate), δ (conversion efficiency): 0.1 to 3 each, defaults 1, 1, 0.4 and 1.
Carrying capacity K: 0.5 to 5, default 3.
Handling time h: 0 to 2, default 1.
Diffusion Dᵤ, Diffusion Dᵥ: the diffusion coefficients of prey and predators, 0.001 to 0.2, defaults 0.05.
Boundary: periodic edges, the default, or solid walls that nothing crosses.
Resolution: grid cells per side, 50 to 400, default 128. Size and diffusion apply on Reset.