Generator

Euclid's algorithm on a 34 by 13 rectangle

A generator in the geometry library, called 22 times across 6 essays. Below: what it draws with nothing chosen and at each mode an essay asks for, what it checks while drawing, and everywhere it is used.

euclid is one function. Everything below came out of it during this build, at parameters taken from the essays rather than invented for this page — so a figure here is the same figure a reader meets in an essay, and if the generator changes, this page changes with it.

With nothing chosen

Euclid's algorithm on a 34 by 13 rectangle. The rectangle is tiled by peeling off the largest square that fits, again and again, until nothing is left.

Square-peeling on a 1 by φ rectangle

Square-peeling on a 1 by φ rectangle. The same construction as Euclid's algorithm, run on a rectangle whose sides have no common measure. 9 passes are drawn and it never terminates.

Euclid's game on 34 and 21

Euclid's game on 34 and 21. A 34 by 21 rectangle tiled by the squares of Euclid's algorithm, each run of equal squares shaded by the player who faces it, with the deciding run outlined.

The whole game tree of Euclid's game from (7, 3)

The whole game tree of Euclid's game from (7, 3). A tree of positions of Euclid's game starting from a small pair, each node shaded as a win or a loss for the player to move, with winning replies drawn heavier.

Who wins Euclid's game, for every start up to 40

Who wins Euclid's game, for every start up to 40. A square grid of starting positions with the losing positions for the player to move shaded, forming a narrow wedge around the diagonal bounded by two lines through the origin whose slopes are the golden ratio and its reciprocal.

Consecutive Fibonacci numbers in Euclid's game

Consecutive Fibonacci numbers in Euclid's game. Rows of consecutive Fibonacci pairs with their ratio marked on a number line around the golden ratio, and each row labelled with the winner of Euclid's game from that position.

What it checks while it draws

Collected by running the family and recording what it asserted, not written here. The count is how many separate times the claim was put to the test while these drawings were made.

Where it is called

Every figure on this list is drawn by the same rule, so a change to the rule changes all of them at once. That is why the list is published.

Number

A fraction that never closes

Euclid's algorithm throws away everything except the number of squares it peeled at each step. Those counts are a second name for the number it started from — one that terminates exactly when the ratio is a ratio.

Geometry

The oldest algorithm, drawn as a tiling

Euclid's method for finding a greatest common divisor is usually presented as a loop. It is also a way of tiling a rectangle with squares, and the tiling explains why it works.

Geometry

The player who meets the first long run

Turn Euclid's algorithm into a game: two players take turns cutting squares off the rectangle, any number from the current run, and whoever cuts the last one wins. The whole game is decided before it starts — by whether the ratio of the sides is more or less than the golden ratio, which is the same thing as how many runs of length one come first.

Geometry

The rectangle that eats itself

Cut a square off a golden rectangle and what is left is a golden rectangle. That single property is the whole of the golden ratio, and it explains both what the number really does and most of what is wrongly claimed for it.

Geometry

The remainders that count the roots

Run Euclid's algorithm on a polynomial and its derivative, flipping the sign of each remainder, and write down the signs of the whole chain at any point. The number of sign changes drops by exactly one each time the point passes a real root — so the roots in any interval can be counted, exactly, without finding a single one.

Number

The square that cannot shrink

The usual proof that the square root of two is irrational is about even and odd numbers. There is a proof about squares instead, in which a supposed solution is folded into a smaller one — and the folding is a drawing.

The whole library · What the figures prove