Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Generate a tiling pattern from a set of Wang tiles
ResourceFunction["GenerateWangTiling"][tiles,{},n] covers an n× n array with edge-matching Wang tiles. | |
ResourceFunction["GenerateWangTiling"][tiles,{},{m,n}] covers an m× n array instead. | |
ResourceFunction["GenerateWangTiling"][tiles,{},size,All] lists all array coverings consistent with edge matching rules of the tiles. | |
ResourceFunction["GenerateWangTiling"][tiles,{},size,count] lists multiple coverings, up to integer count of them. | |
ResourceFunction["GenerateWangTiling"][tiles,seed,size,count] forces the seed tile to occur near the center of the pattern. |
Generate part of a Wang tiling from a set of just one tile:
In[1]:= |
Out[1]= |
Depict the 3×3 tiling as a Graphics object:
In[2]:= |
Out[2]= |
Change the region size to 2×4:
In[3]:= |
Out[3]= |
Plot a periodic pattern by alternating between two Wang tiles:
In[4]:= |
Out[4]= |
Shift the pattern's offset by changing the seed tile:
In[5]:= |
Out[5]= |
Verify that this tiling pattern in four colors has only two translates:
In[6]:= |
Out[6]= |
GenerateWangTiling can get returns for bigger tile sets with more colors:
In[7]:= |
Out[7]= |
GenerateWangTiling can also check boundary conditions:
In[8]:= |
Out[8]= |
Plot a section of the minimal-known aperiodic Wang tiling:
In[9]:= |
Out[9]= |
This work is licensed under a Creative Commons Attribution 4.0 International License