Skip to content

Interface: SubstitutionRule ​

Properties ​

coverRadius ​

ts
coverRadius: number;

Radius of a disc around the origin that the seed patch fully covers, at scale 1.


edge ​

ts
edge: number;

Edge length of the final tiles at scale 1, before any subdivision.


factor ​

ts
factor: number;

Each subdivision shrinks pieces by this factor.


period? ​

ts
optional period?: number;

The seed patch reproduces itself (scaled) every period subdivisions. Step counts are rounded up to a multiple of it, so a larger region shows more of the same pattern instead of a different one. Defaults to 1.


seed ​

ts
seed: Omit<Piece, "path">[];

Pieces at scale 1, centerd on the origin.

Methods ​

assemble() ​

ts
assemble(pieces, tolerance): RawTile[];

Turn the final pieces into tiles (e.g. join half-tiles into whole ones).

Parameters ​

ParameterType
piecesPiece[]
tolerancenumber

Returns ​

RawTile[]


subdivide() ​

ts
subdivide(piece): Omit<Piece, "path">[];

Children of one piece, in the same coordinate frame.

Parameters ​

ParameterType
piecePiece

Returns ​

Omit<Piece, "path">[]

Hat tiling and isohedral tilings after Craig S. Kaplan's hatviz and Tactile (BSD 3-Clause).