Helpers

There is a number of helper functions used in the Dunham algorithm, which are presented below:

hypertiling.kernel.DUN07.Dunham._prepare_exposures(self)

We define the exposure of a p-gon in terms of the number of edges it has in common with the next layer. A p-gon has minimum exposure if it has the fewest edges in common with the next layer, and thus shares an edge with the previous layer. A p-gon has maximum exposure if it has the most edges in common with the next layer, and thus only shares a vertex with the previous layer. We abbreviate these values as min_exp and max_exp, respectively.

hypertiling.kernel.DUN07.Dunham._compute_edge_reflections(self)

Computes a list of reflection transformations across the edges of a fundamental polygon as required by Dunham’s algorithm [Dun07].

Generates a list of DunhamTransformation objects, each representing a reflection transformation associated with an edge of the fundamental polygon.

Steps: 1. Computes the reflection transformation matrix using the formula from [Dun86]. 2. Iterates over all edges of the polygon. 3. Computes the angle of the midpoint of the current edge. 4. Computes the associated rotation matrices. 5. Performs the following transformations in sequence:

  • Rotates the edge to make it parallel to the y-axis.

  • Performs a reflection in the x-direction on the radius of the fundamental cell.

  • Rotates the edge back to its original orientation.

  1. Wraps the resulting transformation matrix in a DunhamTransformation object and adds it to the list.

Note: The proper usage of the orientation value is unexplained in Dunham’s papers, so we stick with -1 in combination with (0,1,2,3,…) as edge indices. This produces a proper tiling (compare [JvR12] section 3.2 for further details).

hypertiling.kernel.DUN07.Dunham._draw_pgon_pattern(self, trans)

This method applies a given transformation to a copy of the fundamental polygon and adds the resulting polygon to the tiling.

Since hypertiling uses Poincare disk coordinates, but this kernel uses Weierstrass (hyperboloid) coordinates, it requires transformations between the two representations.

Parameters:

trans (Transformation) – The transformation to apply to the fundamental polygon.

Return type:

None

hypertiling.kernel.DUN07.Dunham._add_to_tran(self, tran, shift)

Helper function to adjust the transformation used in the Dunham tiling algorithm

Parameters:
  • tran (object) – The original transformation.

  • shift (int) – The shift value used to adjust the transformation.

Returns:

The adjusted transformation.

Return type:

object

hypertiling.kernel.DUN07.Dunham._compute_tran(self, tran, shift)

Helper function to adjust the transformation used in the Dunham tiling algorithm

Parameters:
  • tran (DunhamTransformation) – The original transformation object.

  • shift (int) – The amount to shift the transformation.

Returns:

The new transformation object after applying the edge transformations.

Return type:

DunhamTransformation