The toy shelf

Small machines; large consequences.

Four little experiments live here. Each one gives the hand something to do, then points back to the page whose mathematics it carries.

Four toysZero dependenciesCanvas, SVG, and a little chance
01 / Randomness

Buffon's needles

Unit needles fall onto unit-spaced ruled paper. The crossing count gives a running estimate of π, one toss at a time.

Needles: 0 / 2,000π ≈ waitingCrossings: 0
2,000

The estimate is 2N/C when needle length and line spacing are both one.

Structure shelf
02 / Many small choices

The Galton board

At each peg, a bead chooses left or right. The live histogram gathers those choices into a bell-shaped pile.

Beads: 0 / 1,20012 rows; 13 binsThe bins are waiting.
1,200

Each row doubles paths; the final bin is the sum of twelve independent left-or-right choices.

Boltzmann's entropy
03 / A shape from chance

The chaos game

A point starts at the center, chooses a corner at random, and jumps halfway there. Repetition draws a Sierpiński triangle from almost nothing.

Points: 0 / 20,000Halfway, every timeEach jump halves the distance to one corner.
20,000

Each update contracts the distance to the chosen corner by exactly one half.

Lorenz attractor
04 / Infinity, with a door

Hilbert's hotel

Every room is occupied, and a new guest arrives. Each resident moves from room n to room n + 1, leaving room one open.

New arrivals: 0Rooms keep going past the frame

    The shift n ↦ n + 1 is a bijection from all occupied rooms to every room except the first.

    Noether's theorem Structure shelf