The lab · 98 simulations · 9 domains

Physics you can touch

Every entry is a running program: written in Rust, compiled to WebAssembly, computed live in your browser. Open one, change the parameters, break it.

01Orbits and gravity

15 simulations
Two-body problem Two masses on Kepler orbits around their common center. Velocity Verlet Three-body problem Three equal masses, no closed solution, quickly chaotic. Leapfrog Stable three-body orbits Rare periodic solutions where three bodies never collide. Velocity Verlet Figure-eight orbit Three bodies chasing each other along one shared figure eight. Leapfrog Sun, Earth and Moon A moon orbiting a planet orbiting a star, to scale in time. Leapfrog Solar system The planets with their real orbital periods. Velocity Verlet Lagrange points The five points where a small body can ride along with two large ones. Leapfrog Gravitational slingshot A probe stealing momentum from a planet as it passes. N-body Satellite constellation Symmetric rings of satellites on shared orbits. Velocity Verlet Circumbinary asteroids Asteroids around a pair of stars: the inner ones are thrown out, the outer ones stay. Velocity Verlet Galaxy collision Two disk galaxies merging, with tidal tails. Leapfrog Tidal disruption A star torn apart by a black hole it passes too closely. N-body Accretion disk Gas spiraling inward around a central mass. N-body N-body cloud A cloud of particles collapsing under its own gravity. Velocity Verlet Projectile motion Throwing parabolas, with and without air drag. Velocity Verlet
Two-body problem Two masses on Kepler orbits around their common center.
Method
Parameters
Presets
Velocity Verlet
19
4
Open simulation
Three-body problem Three equal masses, no closed solution, quickly chaotic.
Method
Parameters
Presets
Leapfrog
14
4
Open simulation
Stable three-body orbits Rare periodic solutions where three bodies never collide.
Method
Parameters
Presets
Velocity Verlet
16
5
Open simulation
Figure-eight orbit Three bodies chasing each other along one shared figure eight.
Method
Parameters
Presets
Leapfrog
14
2
Open simulation
Sun, Earth and Moon A moon orbiting a planet orbiting a star, to scale in time.
Method
Parameters
Presets
Leapfrog
17
3
Open simulation
Solar system The planets with their real orbital periods.
Method
Parameters
Presets
Velocity Verlet
17
3
Open simulation
Lagrange points The five points where a small body can ride along with two large ones.
Method
Parameters
Presets
Leapfrog
14
4
Open simulation
Gravitational slingshot A probe stealing momentum from a planet as it passes.
Method
Parameters
Presets
N-body
10
3
Open simulation
Satellite constellation Symmetric rings of satellites on shared orbits.
Method
Parameters
Presets
Velocity Verlet
18
4
Open simulation
Circumbinary asteroids Asteroids around a pair of stars: the inner ones are thrown out, the outer ones stay.
Method
Parameters
Presets
Velocity Verlet
18
3
Open simulation
Galaxy collision Two disk galaxies merging, with tidal tails.
Method
Parameters
Presets
Leapfrog
12
1
Open simulation
Tidal disruption A star torn apart by a black hole it passes too closely.
Method
Parameters
Presets
N-body
10
3
Open simulation
Accretion disk Gas spiraling inward around a central mass.
Method
Parameters
Presets
N-body
6
4
Open simulation
N-body cloud A cloud of particles collapsing under its own gravity.
Method
Parameters
Presets
Velocity Verlet
18
5
Open simulation
Projectile motion Throwing parabolas, with and without air drag.
Method
Parameters
Presets
Velocity Verlet
8
3
Open simulation

02Chaos and oscillators

25 simulations
Double pendulum Two linked pendulums, the classic picture of chaos. Runge-Kutta 4 Pendulum One pendulum, beyond the small-angle approximation. Runge-Kutta 4 Magnetic pendulum Which of three magnets does it settle on? A fractal answer. Runge-Kutta 4 Kapitza pendulum Shake the pivot fast enough and the pendulum stands upside down. Runge-Kutta 4 Foucault pendulum The swing plane turning with the rotating Earth. Runge-Kutta 4 Lorenz attractor Three equations from convection, and the butterfly effect. Runge-Kutta 4 Rössler attractor A single folded band, the simplest continuous chaos. Runge-Kutta 4 Aizawa attractor A sphere-like attractor pierced by a tube. Runge-Kutta 4 Halvorsen attractor Three cyclically symmetric lobes. Runge-Kutta 4 Thomas attractor Cyclically symmetric chaos from sines and friction. Runge-Kutta 4 Sprott B One of Sprott's minimal chaotic flows. Runge-Kutta 4 Dadras attractor A multi-scroll attractor from five parameters. Runge-Kutta 4 Chua’s circuit Chaos from an electronic circuit with one nonlinear diode. Runge-Kutta 4 Rucklidge attractor A model of double-diffusive convection. Runge-Kutta 4 Nosé-Hoover oscillator A thermostat that turns an oscillator chaotic. Runge-Kutta 4 Duffing oscillator A driven, stiffening spring. Runge-Kutta 4 Van der Pol oscillator Self-sustained oscillation settling onto a limit cycle. Runge-Kutta 4 Hénon map Two lines of algebra, a fractal attractor. Iterated map Hénon-Heiles system A star in a galactic potential, regular or chaotic by energy. Runge-Kutta 4 Standard map A kicked rotor, islands of order in a chaotic sea. Iterated map Logistic map Period doubling all the way into chaos. Iterated map Lotka-Volterra Predators and prey in space, chasing each other in waves. Reaction-diffusion Phase portraits Draw any 2D system and watch its flow. Runge-Kutta 4 Lissajous figures Two perpendicular oscillations and their ratio. Runge-Kutta 4 Bunimovich stadium A billiard table shaped so that every path becomes chaotic. Ray tracing
Double pendulum Two linked pendulums, the classic picture of chaos.
Method
Parameters
Presets
Runge-Kutta 4
15
4
Open simulation
Pendulum One pendulum, beyond the small-angle approximation.
Method
Parameters
Presets
Runge-Kutta 4
10
4
Open simulation
Magnetic pendulum Which of three magnets does it settle on? A fractal answer.
Method
Parameters
Presets
Runge-Kutta 4
8
4
Open simulation
Kapitza pendulum Shake the pivot fast enough and the pendulum stands upside down.
Method
Parameters
Presets
Runge-Kutta 4
5
4
Open simulation
Foucault pendulum The swing plane turning with the rotating Earth.
Method
Parameters
Presets
Runge-Kutta 4
4
4
Open simulation
Lorenz attractor Three equations from convection, and the butterfly effect.
Method
Parameters
Presets
Runge-Kutta 4
7
3
Open simulation
Rössler attractor A single folded band, the simplest continuous chaos.
Method
Parameters
Presets
Runge-Kutta 4
7
3
Open simulation
Aizawa attractor A sphere-like attractor pierced by a tube.
Method
Parameters
Presets
Runge-Kutta 4
8
4
Open simulation
Halvorsen attractor Three cyclically symmetric lobes.
Method
Parameters
Presets
Runge-Kutta 4
3
4
Open simulation
Thomas attractor Cyclically symmetric chaos from sines and friction.
Method
Parameters
Presets
Runge-Kutta 4
3
4
Open simulation
Sprott B One of Sprott's minimal chaotic flows.
Method
Parameters
Presets
Runge-Kutta 4
2
2
Open simulation
Dadras attractor A multi-scroll attractor from five parameters.
Method
Parameters
Presets
Runge-Kutta 4
7
4
Open simulation
Chua’s circuit Chaos from an electronic circuit with one nonlinear diode.
Method
Parameters
Presets
Runge-Kutta 4
6
4
Open simulation
Rucklidge attractor A model of double-diffusive convection.
Method
Parameters
Presets
Runge-Kutta 4
4
4
Open simulation
Nosé-Hoover oscillator A thermostat that turns an oscillator chaotic.
Method
Parameters
Presets
Runge-Kutta 4
3
4
Open simulation
Duffing oscillator A driven, stiffening spring.
Method
Parameters
Presets
Runge-Kutta 4
9
4
Open simulation
Van der Pol oscillator Self-sustained oscillation settling onto a limit cycle.
Method
Parameters
Presets
Runge-Kutta 4
6
4
Open simulation
Hénon map Two lines of algebra, a fractal attractor.
Method
Parameters
Presets
Iterated map
4
3
Open simulation
Hénon-Heiles system A star in a galactic potential, regular or chaotic by energy.
Method
Parameters
Presets
Runge-Kutta 4
4
4
Open simulation
Standard map A kicked rotor, islands of order in a chaotic sea.
Method
Parameters
Presets
Iterated map
1
5
Open simulation
Logistic map Period doubling all the way into chaos.
Method
Parameters
Presets
Iterated map
6
4
Open simulation
Lotka-Volterra Predators and prey in space, chasing each other in waves.
Method
Parameters
Presets
Reaction-diffusion
11
4
Open simulation
Phase portraits Draw any 2D system and watch its flow.
Method
Parameters
Presets
Runge-Kutta 4
7
6
Open simulation
Lissajous figures Two perpendicular oscillations and their ratio.
Method
Parameters
Presets
Runge-Kutta 4
7
9
Open simulation
Bunimovich stadium A billiard table shaped so that every path becomes chaotic.
Method
Parameters
Presets
Ray tracing
3
3
Open simulation

03Fluids

10 simulations
Kármán vortex street A cylinder in a stream sheds vortices, left and right in turn. Lattice Boltzmann Kelvin-Helmholtz instability Two layers sliding past each other curl up into vortices. Lattice Boltzmann Rayleigh-Bénard convection A layer heated from below turns over into rolls and plumes. Vorticity-streamfunction Rayleigh-Taylor instability Heavy fluid on top of light fluid, falling in mushroom-capped spikes. Vorticity-streamfunction Lid-driven cavity A box of fluid stirred by its sliding lid, the classic solver benchmark. Lattice Boltzmann Pipe flow Flow through a channel settling into a parabola, with or without a cylinder. Lattice Boltzmann Shallow water Waves on shallow water, all running at the same speed. Finite differences Decaying turbulence Two-dimensional eddies merging into ever larger vortices. Vorticity-streamfunction Smoke A buoyant plume rising, curling and filling its box. Vorticity-streamfunction Point vortices Ideal vortices in a box, pushing each other around. Runge-Kutta 4

04Statistical physics

9 simulations
Ising model Magnetic spins ordering below the critical temperature. Metropolis Monte Carlo Lennard-Jones fluid Atoms that attract at a distance and repel up close. Velocity Verlet Lennard-Jones phase transition Cool the gas and watch it condense and crystallize. Velocity Verlet Maxwell-Boltzmann gas Colliding discs relax to Maxwell's distribution of speeds. Hard discs Brownian motion Tracers on random walks, spreading with the square root of time. Langevin dynamics Elastic collisions Hard discs between hot and cold walls, carrying heat through the gas. Hard discs Percolation When does a random network first connect across? Cluster labeling Diffusion-limited aggregation Random walkers sticking together into a fractal. Random walk Sandpile Self-organized criticality, one grain at a time. Cellular automaton

05Patterns and reaction-diffusion

9 simulations
Gray-Scott Two chemicals producing spots, stripes and dividing cells. Reaction-diffusion Belousov-Zhabotinsky An oscillating reaction drawing spiral waves. Reaction-diffusion Brusselator A model reaction that forms Turing patterns. Reaction-diffusion Gierer-Meinhardt Activator and inhibitor, the recipe for animal spots. Reaction-diffusion FitzHugh-Nagumo Excitable media, like nerve and heart tissue. Reaction-diffusion Keller-Segel Cells following their own chemical trail into clusters. Reaction-diffusion Diffusion Heat spreading out and smoothing every bump. Field solver Complex Ginzburg-Landau Spiral defects and phase turbulence. Field solver Kuramoto-Sivashinsky Spatiotemporal chaos in a single equation. Finite differences

06Cellular automata

8 simulations
Game of Life Conway's four rules and everything that grows from them. Cellular automaton Brian’s Brain Three states, endless gliders. Cellular automaton Langton’s ant Chaos for ten thousand steps, then a highway. Cellular automaton Lenia A continuous Game of Life with gliding creatures. Cellular automaton Forest fire Trees grow, lightning strikes, fires spread. Cellular automaton Rock, paper, scissors Three species chasing each other in spiral waves. Monte Carlo Wireworld Electrons running along wires, enough to build logic gates. Cellular automaton Elementary cellular automata Wolfram's 256 one-dimensional rules, one row per step. Cellular automaton

07Collective behavior

11 simulations
Boids Flocking from three local rules. Agent-based Boids with predators The same flock, now with something to flee from. Agent-based Vicsek model Noisy self-propelled particles that suddenly align. Agent-based Kuramoto synchronization Coupled oscillators falling into step. Runge-Kutta 4 Ant colony Ants finding food with pheromone trails. Agent-based Schelling segregation Mild preferences, strong segregation. Agent-based Voter model Opinions spreading by imitation. Cellular automaton Prisoner’s dilemma Cooperators and defectors on a grid, in kaleidoscopes. Cellular automaton SIR epidemic Susceptible, infected, recovered, spreading across a grid. Cellular automaton Traffic flow Traffic jams that appear out of nowhere. Cellular automaton Yard-sale economy Random fair trades that still concentrate the wealth. Agent-based

08Waves, fields and quantum

9 simulations
Wave equation Waves reflecting and interfering in 2D. Finite differences Vibrating string Plucked strings and their harmonics. Finite differences Schrödinger equation A wave packet tunneling through a barrier. Finite differences Double slit Two openings, one interference pattern. Field solver Double-slit accumulation Single particles building up the interference pattern. Monte Carlo Electrostatics Positive and negative charges pairing up and settling in a box. Particle system Coulomb interaction Charged particles attracting and repelling. Particle system Force fields Field lines and equipotentials of fixed point charges. Field solver Wien filter Crossed electric and magnetic fields that let one speed through. Particle system

09Numerical methods

2 simulations
Monte Carlo estimate of π Random points in a square, counted until π appears, against a quasi-random sequence. Monte Carlo, Halton sequence Quadtree The Barnes-Hut tree that makes large N-body runs fast, with its cost and error. Barnes-Hut, velocity Verlet