Hyperbolic tiling in Python: draw Escher's Poincare disc and 3D print it
Escher's Circle Limit prints show a hyperbolic tiling squeezed into a disc, with tiles shrinking toward the rim. The maths is short: a tile edge is a circle that meets the unit circle at right angles, and the next tile is the mirror image of the current one across that circle. Mirroring across a circle is an inversion. That is all you need to draw the {7,3} tiling (heptagons, three at every…
Escher's Circle Limit prints depict hyperbolic tiling confined within a disc, with tiles diminishing towards the edge. The underlying mathematics is straightforward: a tile edge is a circle intersecting the unit circle at 90-degree angles, and each subsequent tile is the mirror image of the preceding one across that circle. Inversion, achieved through reflection, is the key operation. To create the {7,3} tiling (heptagons with three at each corner) and print it as a flat ornament using manifold3d, follow these steps:
1. Determine the vertices of the central polygon for a {p,q} tiling using the provided closed formula. In this case, p = 7 and q = 3.
2. Calculate the edge circle and inversion by solving two linear equations for the center 'c' and radius 'R' of the circle. The function circ(u, v) finds these values.
3. Reflect each polygon across its edges to expand the tiling. Skip polygons already created, identified by the sum of their vertices rounded to three decimal places. Maintain two lists, one for polygons and another for newly discovered polygons.
4. Construct the edges as circular arcs, segmenting them into 12 short straight pieces. Thicken each piece into a thin rectangle and combine them with an outer rim, extruding the entire structure to a thickness of 2.4 mm. Remember to stop the tiling at radius 0.93, where tiles become smaller than the nozzle.
Certain considerations: limit the tiling radius to 0.93 to prevent tiles smaller than the nozzle, place the rim at the same radius, and adjust line width based on distance from the center, ensuring a minimum half-width of 0.65 mm. The same code can generate {5,4}, {4,5}, and {3,7} tilings as well. Finished ornaments and a 3-pack of different tilings can be found on Cults3D for $1.27. For more experiments, check out the author's Patreon.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.