Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Generate the hexagonal tiling pattern of the hat and its supertiles
ResourceFunction["HatHexagonalTiling"][init] plots the hat tiling initial conditions for integer init from 1 to 10. | |
ResourceFunction["HatHexagonalTiling"][init,size] plots the hat tiling with init as initial conditions for a hexagonal array of integer size layers. | |
ResourceFunction["HatHexagonalTiling"][init,size,"type"] plots the combinatorial tiling of the given type. | |
ResourceFunction["HatHexagonalTiling"][init,size,typelist] plots the combinatorial tilings of all types in the typelist. |
| "Hexagon" | combinatorial hexagons |
| "Hat" | the Hat tiles |
| "Cluster" | 1-level supertiles of the Hat |
| "SuperCluster" | 2-level supertiles of the Hat |
| "n-Supertile" | n-level supertiles of the Hat |
| ColorFunction | Automatic | function with inputs from 1 to 10, gives colors as output. |
| ColorRules | Automatic | list of rules from integers (from 1 to 10) to colors. |
| "Count" | 1 | required number of possible tilings. |
Plot a single hat tile:
| In[1]:= |
| Out[1]= | ![]() |
Plot a hexagonal tiling of three layers of the Hat tiles:
| In[2]:= |
| Out[2]= | ![]() |
Plot with combinatorial hexagon, the Hat, its supertile (cluster), 2-supertile and so on:
| In[3]:= |
| Out[3]= | ![]() |
Generate three different combinatorial equivalent tilings with two types of tiles:
| In[4]:= | ![]() |
| Out[4]= | ![]() |
There are 10 different initial conditions:
| In[5]:= |
| Out[5]= | ![]() |
Compare with its supertiles:
| In[6]:= | ![]() |
| Out[6]= | ![]() |
You can generate any higher level supertiles as you want:
| In[7]:= | ![]() |
| Out[7]= | ![]() |
Color the tiling using GrayLevel:
| In[9]:= |
| Out[9]= | ![]() |
Add red EdgeForm in a blue tiling:
| In[10]:= |
| Out[10]= | ![]() |
Use "Count" to generate more possible tilings:
| In[11]:= |
| Out[11]= | ![]() |
Generate all valid one layer surroundings:
| In[12]:= |
| Out[12]= | ![]() |
The resource function HatHexagons generates tilings by substitution rule, which gives a fractal structure. HatHexagonalTiling focuses on surrounding the center tile by multiple layers. Compare the results of two functions after using the same initial conditions:
| In[13]:= | ![]() |
| Out[13]= | ![]() |
You can use this function to generate higher level supertiles of the Hat as a whole, and use HatHexagons to see how it is made of the hat tiles:
| In[14]:= | ![]() |
| Out[14]= | ![]() |
The "Cluster" is exactly 1-Supertile, the "SuperCluster" is exactly 2-Supertile and the "Hat" is the "0-Supertile":
| In[15]:= | ![]() |
| Out[15]= | ![]() |
The holes in the Hat tiling are where the reflected tiles should be. An easy way to fill them is:
| In[16]:= | ![]() |
| Out[16]= | ![]() |
Duplicate elements in typelist will give duplicate corresponding results:
| In[17]:= |
| Out[17]= | ![]() |
If you want to generate combinatorial tilings with different type of tiles, please use the typelist argument rather than Map. There is a significant efficiency difference:
| In[18]:= |
| Out[18]= |
| In[19]:= |
| Out[19]= |
They have the same result:
| In[20]:= |
| Out[20]= |
Show the two kinds of tiles next to the reflected tiles:
| In[21]:= |
| Out[21]= | ![]() |
Wolfram Language 13.0 (December 2021) or above
This work is licensed under a Creative Commons Attribution 4.0 International License