Legacy Dunham

hypertiling provides a mostly literal, unoptimized, implementation of the tiling algorithm by Douglas Dunham, translated to Python; More specifically, this is the improved version published in [Dun07]

Sources:

  • [Dun86] Dunham, Douglas. “Hyperbolic symmetry.” Symmetry. Pergamon, 1986. 139-153.

  • [Dun07] Dunham, Douglas. “An algorithm to generate repeating hyperbolic patterns.” the Proceedings of ISAMA (2007): 111-118.

  • [Dun09] Dunham, Douglas. “Repeating Hyperbolic Pattern Algorithms — Special Cases.” unpublished (2009)

  • [JvR12] von Raumer, Jakob. “Visualisierung hyperbolischer Kachelungen”, Bachelor thesis (2012), unpublished

The actual algorithm is implemented in the DUN07 kernel

class hypertiling.kernel.DUN07.Dunham(p, q, n)

A more or less literal, unoptimized, implementation of the tiling algorithm by Douglas Dunham, translated to Python; specifically, this is the improved version published in [Dun07]

Note that this kernel internally uses Weierstrass (hyperboloid) arithmetic.

For the convenience of the reader, we present the details of the kernel in separate sections:


A central ingredient in this algorithm is the transformation which is successively iterated as the tiling is generated. We wrap it in a class object:

class hypertiling.kernel.DUN07.DunhamTransformation(matrix, orientation, p_position)

The DunhamTransformation class is used to represent transformations that include a transformation matrix, an orientation value (-1 or +1), and an index of the last transformation’s edge.

matrix

The transformation matrix.

Type:

np.array

orientation

The orientation of the transformation (-1 or +1).

Type:

int

p_position

The index of the edge across which the last transformation was made.

Type:

int

__mul__(self, other)

Specifies how two DunhamTransformation objects are multiplied.

Getter

Finally, the DUN07 kernel satisfies the required getter methods:

hypertiling.kernel.DUN07.Dunham.get_polygon(self, index: int) HyperPolygon

Returns the polygon at index as HyperPolygon object. Method exists mainly for compatibility reasons. Usage is discouraged!

Parameters:

index (int) – Index of the polygon.

Returns:

Polygon at index.

Return type:

HyperPolygon

hypertiling.kernel.DUN07.Dunham.get_vertices(self, index: int) array

Returns the p vertices of the polygon at index in Poincare disk coordinates. Since this kernel’s internal arithmetic is done in Weierstrass representation, this requires some coordinate transform.

This method overwrites the method of the base class.

Parameters:

index (int) – Index of the polygon.

Returns:

p vertices of the polygon.

Return type:

np.array

Notes

Time complexity of this method is O(1).

hypertiling.kernel.DUN07.Dunham.get_center(self, index: int) complex128

Returns the center of the polygon at index in Poincare disk coordinates. Since this kernel’s internal arithmetic is done in Weierstrass representation, this requires a coordinate transform.

Parameters:

index (int) – Index of the polygon.

Returns:

Center of the polygon.

Return type:

np.complex128

Notes

Time-complexity: O(1) Overwrites method of base class.

hypertiling.kernel.DUN07.Dunham.get_angle(self, index: int) float

Returns the angle to the center of the polygon at index.

Parameters:

index (int) – Index of the polygon.

Returns:

Angle of the polygon.

Return type:

float

Notes

Time-complexity: O(1)