New Simulations
Galton Board — Binomial Distribution & CLT
Animated bean machine: balls cascade through n rows of pegs with probability p per deflection. Side-by-side histogram shows B(n,p) PMF and normal approximation overlay. Live mean and Ο tracking.
Belousov-Zhabotinsky Reaction — Chemical Spiral Waves
3-state excitable-medium CA (Greenberg-Hastings model) producing self-organizing spiral waves. Click to plant sparks. Four colour schemes, adjustable threshold and refractory steps.
Turing Machine — Step-by-Step Tape Simulator
Animated infinite tape with read/write head. Highlighted transition table updates in sync. Five programs: binary increment, unary addition, palindrome check, copy, busy beaver.
π― Galton Board β Binomial Distribution & Central Limit Theorem
The bean machine
Francis Galton's bean machine (1889) is a physical demonstration of the Central Limit Theorem. Balls drop from a single slot at the top and encounter n rows of pegs. At each peg a ball deflects left with probability p or right with probability q = 1 β p. If we count the number of rightward deflections k, the resulting distribution is the binomial:
P(k) = C(n, k) Β· p^k Β· (1-p)^(n-k) k = 0, 1, ..., n
The mean is ΞΌ = nΒ·p and standard deviation
Ο = β(nΒ·pΒ·q). By the Central Limit Theorem, as n increases
this binomial distribution converges to a normal distribution N(np, npq)
regardless of the value of p. The simulator shows the binomial PMF as a
dashed curve and the smooth normal approximation in teal, both updating
live as balls fall.
Simulation design
Balls are animated through the peg grid. Each ball's bin destination is pre-computed at spawn from a Bernoulli sequence, so it follows the exact binomial distribution. The left panel shows the animated cascade; the right panel renders a real-time histogram of bin counts with the theoretical overlay.
- Rows n: 4β16 (up to 17 bins)
- Probability p: 0.1β0.9 (for asymmetric distributions)
- Ball rate: 1β20 balls per animation frame
- Live statistics: observed mean, observed Ο, theoretical Ο
- Drop 100 balls instantly to fill the histogram quickly
π Belousov-Zhabotinsky Reaction β Excitable-Medium CA
The chemistry behind the spiral
The Belousov-Zhabotinsky reaction is an oscillating chemical system discovered by Boris Belousov in 1951 (and independently by Anatol Zhabotinsky in 1961). A mixture of malonic acid, sodium bromate and a cerium or ferroin catalyst spontaneously cycles between oxidized and reduced states, producing concentric colour waves visible to the naked eye. The Oregonator is the standard kinetic model, but a simpler cellular automaton captures the essential behaviour.
Greenberg-Hastings model
The 3-state excitable-medium CA (Greenberg & Hastings, 1978) uses three cell states:
- Resting (0) β a cell becomes excited if the number of excited nearest-neighbours in the 8-cell Moore neighbourhood meets or exceeds the threshold T.
- Excited (1) β the cell transitions to the refractory state on the next step. This is the "wave front."
- Refractory (2 β¦ k) β the cell counts down k steps back to resting. This creates the "refractory tail" that prevents waves from reversing direction and forces spiral or concentric patterns to persist.
Initial asymmetric seeds produce spiral wave pairs. Spontaneous ignition (a tunable rate) seeds new wave centres over time. All rendering uses ImageData pixel arrays for performance, supporting grids up to 300Γ300 at 60 fps.
π₯οΈ Turing Machine β Computability Made Visible
Why simulate a Turing machine?
Alan Turing's 1936 paper "On Computable Numbers" introduced a hypothetical machine that reads and writes symbols on an infinite tape, one cell at a time, using a finite set of rules. Despite its simplicity, the Church-Turing thesis states that any effectively computable function can be computed by such a machine. Visualising execution step by step makes abstract concepts like accepting/rejecting states, halting, and the transition function concrete and graspable.
Five built-in programs
-
Binary increment β scans to the end, adds 1 with
carry propagation. Input
1011β1100. -
Unary addition β replaces the + separator with a 1
and erases the trailing 1. Input
111+11β11111. -
Palindrome checker β marks and matches outer
characters inward over alphabet {a, b}. Accepts
abba, rejectsabab. -
String copy β copies a unary string past a separator:
111β1110111. - 3-state Busy Beaver β the champion 3-state BBM writes 6 ones in 14 steps before halting. Start on a blank tape.
Tape display
The canvas renders a sliding window of tape cells centred on the read/write head. The active cell is highlighted with a purple glow; blank cells show a β‘ symbol. The transition table scrolls to highlight the rule executed at each step. The head pointer turns green on accept, red on reject.
What's Next
Wave 59 will continue expanding coverage across category gaps. High-priority candidates include stochastic resonance (noise-enhanced signal detection in threshold systems), elastic waves (longitudinal and transverse wave propagation with reflection and interference), and cell growth and morphogenesis (reaction-diffusion Turing patterns driving cell differentiation).