pyboxbuilder.lid.tilings.multigrid_tiling

pyboxbuilder.lid.tilings.multigrid_tiling(width: float, length: float, symmetry: int, edge: float) → list[list[tuple[float, float]]][source]

Tile an area with rhombi, by de Bruijn’s multigrid method.

Take symmetry families of equally spaced parallel lines, each family turned by 180° / symmetry from the last. Every crossing of a line from one family with a line from another is a rhombus of the tiling, and which rhombus is decided by counting how many lines of every other family the crossing lies past. The rhombus’s edges are the two families’ normals, so its shape comes from the angle between them and nothing else.

This is the whole family in one function. Five-fold with offsets summing to a whole number is the Penrose rhombus tiling — the thin-and-thick one people mean by “Penrose”. Eight-fold is Ammann–Beenker. Seven- and twelve-fold are the same construction at their own symmetries, and none of them repeats.

Parameters:
width: float

Width of the area to cover, in mm.

length: float

Its length, in mm.

symmetry: int

How many line families. The tiling’s rotational symmetry is twice this for an even count and equal to it for an odd one, so 4 gives the eight-fold Ammann–Beenker, 5 the ten-fold Penrose, 6 the twelve-fold, and 7 the fourteen-fold. Four is the floor: with three families the crossings give a plain lattice, not a quasicrystal.

edge: float

Edge length of every rhombus, in mm. All tiles share it: that is what a rhombus tiling is.

Returns:

One list of four vertices per tile, anticlockwise, covering the area and overhanging it — the caller clips, as it does for every lattice.

Raises:

ValueError – If symmetry is below 4 or edge is not positive.