About Wang Tiles

Below are the 16 possible configurations of details that can be combined to allow one to complete a larger overall drawing.

The detail type is derived from bitwise math in which the adjacency at the North, East, South, or West is given a specific value that when summed provide the detail type. When there are no adjacencies, these cardinal values are given a value of 0.

The Type number can be derived from this binary weighting:
Up Adjacency = 08
Right Adjacency = 01
Down Adjacency = 02
Left Adjacency = 04
Hence each detail Type Number can be either from 0 – 15.

Below is a further graphical diagram representation of how the types can be combined to finish a larger drawing: