Truchet Tiles using Python & Turtle
This script is a strong simplification of a version made for CPython to run on a PC see: GitHub truchet_tiles2.py
This numworks version also uses the Turtle library, unlike the PC version it does not have the capability to fill a shape.
This script shows a series of patterns of Truchet Tiles.
The tiles are drawn using the Turtle libary. All patters are made from 4 different tiles.
The patterns are defined as rows and columns of tile numbers, for this nested tuples are used:
pattern_X = (
(2,4,3,4,4,2),
(2,1,2,2,4,4),
(3,4,4,2,2,4),
(2,2,4,4,2,1),
(4,2,2,4,3,4),
(4,4,2,1,2,2)
)