Tilings by regular polygons
Regular polygons fit together round a point in exactly 21 ways. Only 11 of them can be the pattern at every vertex of a tiling, and for the other 10 there is a short reason, which the library gives.
polygonAngle(6); // 1/3 of a full turn
vertexTypes(); // 21 cyclic sequences: [3, 7, 42], …, [3, 3, 3, 3, 3, 3]
uniformTiling("3.4.6.4"); // { uniform: true, … }
uniformTiling("5.5.10"); // { uniform: false, reason: "round a 5-gon …" }
regularTilings(); // {3, 6}, {4, 4}, {6, 3}
Fitting round a point
The interior angle of a regular n-gon is of a full turn. Polygons with sides fit round a point exactly when
an equation in rationals. Each angle is at least and less than , so there are 3 to 6 polygons, and a search over increasing n with exact fractions finds 17 sets of polygons and 21 cyclic orders, from 3.7.42 (a triangle, a heptagon and a 42-gon) to six triangles.
Regular tilings
If q copies of the regular p-gon meet at each vertex, the equation becomes , which is . Its only solutions are {3, 6}, {4, 4} and {6, 3}: triangles, squares and hexagons. The triangle and hexagon tilings are dual to each other, and the square tiling is its own dual.
Uniform tilings
In a uniform (Archimedean) tiling every vertex has the same type. Consider an n-gon of the tiling with n odd. At each of its corners, the polygons on its two edges are the neighbours of that n-gon in the vertex type. If those two neighbours are always different kinds, the polygons round the n-gon must alternate between two kinds, which is impossible round an odd number of edges. The library carries out this argument in its general form: it asks whether the allowed pairs of neighbours can be chained round a cycle of length n. That rules out exactly 10 of the 21 types, among them 3.7.42, 5.5.10 and 3.4.4.6. The other 11 are realized by the three regular tilings and the eight semiregular ones, known since Kepler's Harmonices Mundi (1619). They are drawn on Pictures of geometry, where a patch is grown from each vertex type and checked.
| call | returns |
|---|---|
| polygonAngle(n) | A Rational: the fraction of a full turn |
| vertexTypes() | The 21 types as arrays |
| uniformTiling(type) | { type, fits, uniform, reason } |
| regularTilings() | [{ p, q, symbol, dual }] |
@ratmath/geo and Core's Rational in scope. The last line's value is shown; PRINT(…) adds lines, TEX(…) typesets math.