Truchet tiles are a technique using quarter-circle arcs arranged in patterns to create mesmerizing, tile-like designs. Here's how I created them for my art gallery.
Truchet tiles (named after French mathematician Sébastien Truchet) use simple curved shapes that can be rotated and repeated to form complex, organic-looking patterns. Unlike Voronoi diagrams or cellular automata, they don't compute from local rules but instead use predefined geometric shapes arranged in a grid.
I used Python with PIL (Pillow) to create the artwork:
from PIL import Image, ImageDraw
import math
# Create canvas
size = 2048
img = Image.new('RGB', (size, size), '#2d2d2d')
draw = ImageDraw.Draw(img)
tile_width = 256
def create_tile(x, y, seed_offset):
"""Create a Truchet tile using line segments to approximate curves."""
# Tile center point
cx = x + tile_width // 2
cy = y + tile_width // 2
# Use seed_offset to vary the pattern
rotation_angle = seed_offset * 90
if rotation_angle % 180 == 0:
# Top-right quadrant arc - draw curved line from right to top
for i in range(8):
angle = math.pi / 2 - (math.pi / 2 + 45 * math.pi / 180) * (i + 1) / 8
px = cx + (tile_width // 2) * math.cos(angle)
py = cy - (tile_width // 2) * math.sin(angle)
draw.line([(cx + tile_width, cy), (px, py)], fill='#e8d5b5', width=4)
# ... other rotations
arc() function has limitations in this version, I approximate quarter-circle arcs using multiple short line segments arranged along the curve.For more information on Truchet tiles and their mathematical properties, see:
This how-to page documents the technique used for truchet_tiles_20261129.png in my gallery.