Skip to content

Tiling types

isotile.TilingType dataclass

TilingType(
    number: int,
    shape_types: tuple[str, ...],
    edge_shape_ids: NDArray[int64],
    edge_orientations: NDArray[int64],
    default_params: NDArray[float64],
    vertex_coeffs: NDArray[float64],
    aspect_coeffs: NDArray[float64],
    translation_coeffs: NDArray[float64],
    coloring: NDArray[int64],
    adjacency: NDArray[int64],
    safe_ranges: NDArray[float64],
)

Static data of one isohedral type. Geometry is coeffs @ [*params, 1].

Attributes:

  • number (int) –

    Type number, 7 for IH7.

  • shape_types (tuple of str) –

    Shape type ("J", "U", "S" or "I") of each edge shape id.

  • edge_shape_ids ((n_vertices,) int) –

    Shape id of each edge.

  • edge_orientations ((n_vertices, 2) int) –

    Flip and rotate flags of each edge (index into the four orientation matrices).

  • default_params ((n_params,) float) –

    Default parameters.

  • vertex_coeffs ((n_vertices, 2, n_params + 1) float) –

    Coefficients of the prototile vertices; the last column is the constant term.

  • aspect_coeffs ((n_aspects, 2, 3, n_params + 1) float) –

    Affine 2x3 matrix of each aspect (tile orientation inside the translation unit).

  • translation_coeffs ((2, 2, n_params + 1) float) –

    Translation vectors translation_u and translation_v; row k is vector k.

  • coloring ((19,) int) –

    Coloring table: 12 aspect/next-color entries, 3 + 3 transitions, period.

  • adjacency ((k, 5) int) –

    Rows (aspect, d_cell_u, d_cell_v, neighbor_aspect, kind) for a tile with cell (u, v) and the given aspect: the neighbor has the cell (u + d_cell_u, v + d_cell_v). kind is 0 for a shared edge and 1 for a shared vertex only.

  • safe_ranges ((n_params, 2) float) –

    Per free parameter, the interval [low, high] around the default value in which the straight prototile stays simple while all other parameters keep their defaults; an infinite end (-inf or inf) means no limit. A finite end is where the prototile becomes invalid (rounded inward to a multiple of 1e-6 of the distance from the default). Beyond a degenerate value the prototile can be valid again (a vertex passing through another one), but that is another component of the valid set.

    The intervals are one-parameter slices, not the valid region: combinations of parameters inside their intervals can still be invalid (use check_prototile), and values outside an interval can be valid when other parameters change.

Methods:

  • info –

    Metadata of the type as a dict.

  • describe –

    Multi-line human-readable summary of the type.

n_params property

n_params: int

Number of free parameters.

n_vertices property

n_vertices: int

Number of prototile vertices (equal to the number of edges).

n_aspects property

n_aspects: int

Number of aspects, the tiles per cell.

n_edge_shapes property

n_edge_shapes: int

Number of distinct edge shape ids.

edge_shapes property

edge_shapes: tuple[str, ...]

Shape type of each edge.

has_reflections property

has_reflections: bool

True if an aspect is a reflection (negative determinant of its linear part at the defaults).

info

info() -> dict[str, Any]

Metadata of the type as a dict.

Keys: num_parameters, num_vertices, num_aspects, num_edge_shapes, edge_shapes (one name per edge), default_parameters, edges (per edge: edge_index, shape_id, shape_type, description, customizable), has_reflections, customizable_shape_ids and parameters (per parameter: index, default, affected_vertices with the exact derivative dx_dp, dy_dp of each vertex it moves, rounded to 4 decimals, and a description).

describe

describe(parameters: ArrayLike | None = None) -> str

Multi-line human-readable summary of the type.

With parameters (n_params values) each parameter line shows its value next to the default.

isotile.get_type

get_type(number: int) -> TilingType

The data of type number; raises ValueError for a number that is not one of the 81 types.

isotile.tiling_types

tiling_types() -> tuple[int, ...]

The 81 valid type numbers.

isotile.find_types

find_types(
    *,
    num_vertices: int | None = None,
    num_parameters: int | None = None,
    max_parameters: int | None = None,
    num_aspects: int | None = None,
    has_reflections: bool | None = None,
    edge_types: Collection[str] | None = None,
    all_edges: str | None = None,
    has_customizable_edges: bool | None = None,
) -> list[int]

Numbers of the types that satisfy every given filter, sorted.

Parameters:

  • num_vertices (int, default: None ) –

    Exact number of prototile vertices (3, 4, 5 or 6).

  • num_parameters (int, default: None ) –

    Exact number of free parameters.

  • max_parameters (int, default: None ) –

    Maximum number of free parameters.

  • num_aspects (int, default: None ) –

    Exact number of aspects.

  • has_reflections (bool, default: None ) –

    True: only types with a reflected aspect; False: only types without.

  • edge_types (collection of str, default: None ) –

    Edge shapes ("J", "U", "S", "I") that the type must all contain.

  • all_edges (str, default: None ) –

    Only types in which every edge has this shape.

  • has_customizable_edges (bool, default: None ) –

    True: at least one edge is J, U or S; False: all edges are I.