# Wolfram Function Repository

Instant-use add-on functions for the Wolfram Language

Function Repository Resource:

Generate trees describing the essential combinatorial structure of the aperiodic hat tiling

Contributed by:
Bradley Klee

ResourceFunction["HatTrialityTree"][ gives a tree grown from | |

ResourceFunction["HatTrialityTree"][ rotates the tree around its root by an angle of |

ResourceFunction["HatTrialityTree"] accepts all the options of Tree, and two additional options: ColorFunction and "Seeds". Any valid ColorFunction should accept up to two arguments: the first being a positive integer for vertex "Class", and the second being a bit (either a 0 or 1) describing the "Symmetry" type of the tree to which the vertex belongs. The "Seeds" option accepts a Boolean value, True or False, when set to True, causes ResourceFunction["HatTrialityTree"] to generate forests rather than isolated trees.

The "Hat triality pattern" is part of a new math discovery following from the groundbreaking research of David Smith et al. It is a three coloring of the hexagonal lattice, which describes valencies of some vertex figures in a Hat tiling.

The Hat tiling is known to be aligned with the hexagonal lattice. The following map is used with lattice vertices at the center of each hexagon:

A duality pattern is obtained by classifying interior hexagons and edge-centered hexagons into two separate sets. A triality pattern is obtained from inner/outer duality by allowing edge-centered hexagons to fall into two distinct subsets. Subset membership depends upon how many Hat tiles are incident upon the corresponding lattice vertex, which can be either two or three.

The interior set must consist of isolated vertices so that edge 3-joins link with their neighbors to form ever-larger "triality trees". That is what has been discovered from analyzing large patches of the Hat tiling and the two-dimensional substitution rules that generate them.

The purpose of this function is not to recreate the valency triality pattern, but instead to recreate another more subtle triality pattern, the "mutual trees triality pattern" (see Neat Examples).

However, both "valence" and "mutual trees" triality patterns overlap on the set of edge 3-joins, which are called "the triality trees" or "the triality forest". These trees fall into two subsets. In ResourceFunction["HatTrialityTree"], the two subsets are generated by setting *seed* to 1 or 2. Unfortunately, any one triality tree is not plane-filling, so it cannot describe the entire Hat tiling.

Closer analysis shows that the root vertices of smaller triality trees can be linked to branches of their older neighbors in a way that covers enough of the hexagonal lattice. When this is done correctly, by setting the option “Seeds”→True, the Hat tiling can be obtained by mapping H7 and H8 Hat clusters onto leaves of the triality tree (see Neat Examples).

More precisely, reflected Hats at the center of the H7 and H8 clusters are in 1-to-1 correspondence with two particular types of 3-join vertices: proper terminals ("Class"=1 in this data model, Orange with ColorFunction→Hue), and singleton seeds ("Class”=3, Green). When clusters are drawn differently from the original paper (as above), the minority H7 can be put into 1-to-1 correspondence with singleton seeds.

By mixing some edge 2-joins with all interior vertices, a third tree can be obtained which covers about half the hexagonal lattice by itself, while still fitting in the interstices between isolated triality trees. By setting *seed* to 0, all types of symmetric trees are generated.

Setting *seed* to 3 joins symbols from the symmetric and asymmetric trees, resulting in a growth pattern that must collide on skip vertices ("Class”=0, LightGray). The resulting trees also only collide on skip vertices. This pattern intersperses symmetric and asymmetric triality trees, leaving a sparse third set of vacancies.

The singleton and doubleton seeds:

In[1]:= |

Out[1]= |

Grow the singleton seed through successive generations:

In[2]:= |

Out[2]= |

Check the hidden data for the first larger singleton tree:

In[3]:= |

Out[3]= |

Rotate a doubleton tree clockwise by *π*/3 radians:

In[4]:= |

Out[4]= |

Another growth rule produces a symmetric tree:

In[5]:= |

Out[5]= |

A fourth seed combines symbols from both growth rules:

In[6]:= |

Out[6]= |

The growth rules are mutually consistent, and distinct trees do not collide without re-seeding:

In[7]:= |

Out[7]= |

Color singleton trees according to vertex class:

In[8]:= |

Out[8]= |

Fill space by allowing trees to re-seed their surroundings each generation:

In[9]:= |

Out[9]= |

Generate a larger patch of the triality forest:

In[10]:= |

Out[10]= |

Color the symmetric tree according to vertex class:

In[11]:= |

Out[11]= |

Color symmetric and asymmetric trees differently:

In[12]:= |

Out[12]= |

Count the number of class 8 vertices per generation:

In[13]:= |

Out[13]= |

These are the squares of the Fibonacci numbers:

In[14]:= |

Out[14]= |

Calculate a weighted ratio from counts of class 1 and class 3 vertices:

In[15]:= |

Out[15]= |

Convert to decimal notation:

In[16]:= |

Out[16]= |

Compare with the fourth power of the GoldenRatio:

In[17]:= |

Out[17]= |

With re-seeding, vertex collisions can affect graphical output:

In[18]:= |

Out[18]= |

The data can still be used to extract patches of the mutual trees triality pattern:

In[19]:= |

Out[19]= |

Draw the "ein stein" Hat tile in either of two reflections:

In[20]:= |

In[21]:= |

Out[21]= |

Add surrounding tiles in either of two distinct ways:

In[22]:= |

In[23]:= |

Out[23]= |

Use triality trees to draw larger and larger patches of the tiling:

In[24]:= |

In[25]:= |

Out[25]= |

Depict a larger patch of the mutual trees triality pattern:

In[26]:= |

Out[26]= |

- 1.0.0 – 10 April 2023

This work is licensed under a Creative Commons Attribution 4.0 International License