Physics & Maths simulations

Physics & Maths simulations

Interactive physics and maths simulations that run entirely in your browser.

Ising & XY model simulator

A Monte Carlo simulation that runs entirely in your browser. Drag the temperature through the phase transition and watch a lattice of spins order and disorder, and coarse-grain configurations with block-spin renormalisation.

It also simulates the two-dimensional XY model, whose planar spins are drawn as hue, so you can watch vortices and antivortices bind and unbind across the topological Berezinskii–Kosterlitz–Thouless transition.

Ising lattice near the critical temperature: black-and-white spin domains of every size XY model phase field coloured by hue, with vortices and antivortices marked as crosses

Play with the simulator →

Double-slit experiment simulator

The most beautiful experiment in physics, running in your browser: an electron gun fires electrons one at a time at a wall with two slits. Each electron lands as a single dot on the detection screen, yet the dots build up an interference pattern — until you switch on a detector that observes which slit each electron goes through, and the pattern collapses into two classical heaps.

Top view of the electron wave diffracting through two slits into an interference fan

Fire some electrons →

Persistent homology visualisation

Sample points off a noisy shape and grow a disc of radius \(\varepsilon/2\) around each one. Two points join with an edge once their discs touch; three points fill in with a triangle once all three overlap. Whatever loop is left over — a closed path that isn't the edge of any triangle — is a hole; counting pieces and holes this way is what mathematicians call \(H_0\) and \(H_1\).

A live barcode tracks exactly when each hole opens and closes as \(\varepsilon\) grows, so a real hole (a long bar) is easy to tell apart from noise (a short one).

A noisy circle's Vietoris–Rips complex mid-growth: translucent balls, edges and triangles forming a ring with a clear hole in the middle Persistence barcode: many short-lived bars from noise and one long bar spanning most of the radius range - the real hole

Grow the balls and watch the holes →