Topic

Hyperbolic triangles, motions and tilings

The angles of a hyperbolic triangle add up to less than two right angles, and what is missing is its area. So no triangle, however long its sides, has area more than π. Regular polygons can have any small enough angle, which is why seven-sided tiles can meet three at a corner.

const t = htriangle([0, 0], ["1/2", 0], [0, "1/2"]);
t.angles.A.text;                  // "π/2"
t.defect;                         // π − (A + B + C): the area
t.checks().all;                   // true: the laws of hyperbolic trigonometry, exactly
htriangle(ideal(1, 0), ideal(0, 1), ideal(-1, 0)).area.text;   // "π": the largest a triangle can be
hrotation(["1/2", 0], "1/6").classify();        // { kind: "rotation", center, angle: π/3 }
htranslation([0, 0], ["1/2", 0]).classify();    // { kind: "translation", axis, length: ln(3) }
hyperbolicTiling(7, 3).patch(4).counts;         // [1, 7, 21, 56, 147]

Triangles and their defect

For a triangle with angles A,B,CA, B, C, the defect is π−(A+B+C)\pi - (A + B + C). It is always positive, and by Gauss's theorem it is the area. A vertex may be an ideal point: the two sides that run to it are infinitely long and asymptotic, and the angle there is 0. A triangle with all three vertices ideal has defect, and area, exactly π, and every such triangle is congruent to every other.

The angle at a vertex has an exact cosine, computed from the tangent vectors there; the sides have exact cosh⁡\cosh. As on the sphere, whether an angle or the defect is a rational multiple of π is decided, and otherwise it is enclosed.

Hyperbolic trigonometry

Replace the sphere's cos⁡\cos and sin⁡\sin of a side by cosh⁡\cosh and sinh⁡\sinh:

cosh⁡a=cosh⁡bcosh⁡c−sinh⁡bsinh⁡ccos⁡A,cos⁡A=−cos⁡Bcos⁡C+sin⁡Bsin⁡Ccosh⁡a, \cosh a = \cosh b \cosh c - \sinh b \sinh c \cos A, \qquad \cos A = -\cos B \cos C + \sin B \sin C \cosh a, sin⁡Asinh⁡a=sin⁡Bsinh⁡b=sin⁡Csinh⁡c. \frac{\sin A}{\sinh a} = \frac{\sin B}{\sinh b} = \frac{\sin C}{\sinh c}.

For a right angle at AA the first is Pythagoras' theorem here: cosh⁡a=cosh⁡bcosh⁡c\cosh a = \cosh b \cosh c. The second says the three angles determine the sides, so there are no similar triangles: a shape has one size. checks() tests all three laws on the triangle given, each as an exact equality.

Isometries

An isometry is a 3 × 3 matrix that keeps the form BB and the upper sheet of the hyperboloid. line.reflection, hrotation(centre, turns), hhalfTurn(centre) and htranslation(a, b) build them, then composes them, and they act on points, ideal points, lines, triangles and circles. classify() reads any isometry back. The ones that keep orientation come in three kinds, told apart by the trace:

  • a rotation about a point (trace less than 3), with its centre and angle;
  • a parabolic map (trace exactly 3), which fixes one ideal point and no point of the plane: what a rotation becomes when its centre goes to infinity;
  • a translation along a line (trace more than 3), with its axis and length. Only the axis is moved along itself; points off it travel along curves at a fixed distance from it, which are not lines.

Those that reverse orientation are reflections and glide reflections. Every isometry is a product of at most three reflections, and the kind of a product of two is the relation of the two mirrors: intersecting mirrors give a rotation, asymptotic ones a parabolic map, ultraparallel ones a translation along the common perpendicular, by twice the distance between them.

toMobius() gives the same map of the Poincaré disc as a Möbius map z↦az+bcz+dz \mapsto \dfrac{az + b}{cz + d} with exact complex coefficients, each a pair [re, im]. The translation taking 0 to ½ is z↦z+1212z+1z \mapsto \dfrac{z + \frac12}{\frac12 z + 1}. The coefficients can be handed to the complex package's Möbius maps.

Regular tilings

The symbol {p,q}\{p, q\} means regular pp-gons, qq around each vertex, so each corner has angle 2π/q2\pi/q. A Euclidean regular pp-gon has corner angle π−2π/p\pi - 2\pi/p, and comparing the two sorts every symbol into one of three geometries:

(p−2)(q−2)  {<4sphere: the five Platonic solids=4plane: {4,4}, {3,6}, {6,3}>4hyperbolic plane: all the rest (p - 2)(q - 2) \; \begin{cases} < 4 & \text{sphere: the five Platonic solids} \\ = 4 & \text{plane: } \{4,4\},\ \{3,6\},\ \{6,3\} \\ > 4 & \text{hyperbolic plane: all the rest} \end{cases}

On the sphere and in the hyperbolic plane the corner angle fixes the size of the tile, and schlafli(p, q) gives it exactly: for the hyperbolic ones,

cosh⁡s2=cos⁡(π/p)sin⁡(π/q),cosh⁡R=cot⁡πpcot⁡πq,area=π(p−2−2pq), \cosh\frac s2 = \frac{\cos(\pi/p)}{\sin(\pi/q)}, \qquad \cosh R = \cot\frac\pi p \cot\frac\pi q, \qquad \text{area} = \pi\Bigl(p - 2 - \frac{2p}q\Bigr),

for the side ss and the circumradius RR. Every tile of {7,3}\{7, 3\} has area exactly π/3\pi/3.

hyperbolicTiling(p, q) places one tile at the centre of the disc with exact vertices; check() confirms, exactly, that its corner angle is 2π/q2\pi/q and its side is the one above (for {7, 3} the numbers have high degree and this takes several seconds). patch(n) grows the tiling outward by reflecting in sides, in floats and labelled kind: "float", and counts the tiles at each step. The counts grow exponentially, as areas do in this plane.

callreturns
htriangle(A, B, C)HTriangle: sides, angles, angleSum, defect, area, lines, idealVertices, checks()
line.reflection, hrotation(c, turns), hhalfTurn(c), htranslation(a, b)HIsometry: apply, then, inverse, preservesOrientation, classify(), toMobius()
schlafli(p, q){ geometry, interiorAngle, tileArea, edge, circumradius, inradius }, and for the sphere the solid with its faces, vertices and edges
hyperbolicTiling(p, q)The same, with tile (exact vertices), discRadius, check(), patch(layers)
hyperbolicTilingFigure(p, q, { layers, model })A figure of the tiling in the Poincaré or Klein disc
Try itEdit the code and run it with @ratmath/geo and Core's Rational in scope. The last line's value is shown; PRINT(…) adds lines, TEX(…) typesets math.
Ctrl/⌘ + Enter runs