Skip to content
CoreSource checked

Truchet Tiles

Generates decorative patterns by rotating or selecting simple tile motifs.

Quick Facts

Compact metadata for implementation and discovery.

Category
Procedural Generation
Difficulty
Intermediate
Family
Tile-Based Generation
Tier
Core
Status
Verified
Review
Source Checked
Sources
1
Formulas
0
Relationships
3
Code example
Ready
Visualization
Ready

Overview

Truchet tile generation fills a grid with small motifs, often arcs or diagonal patterns, and varies their orientation. Local motif choices create larger connected paths, textures, or ornamental patterns.

Core Concepts

pattern generationtile-based generationtile constraintsprocedural generation

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(n)

Average

O(n log n)

Worst

O(n^2)

Space

O(n)

When to Use

  • Use when a simple local tile rule can produce the desired visual variation.
  • Use when repeatable seed-driven pattern generation is useful.

When Not to Use

  • Avoid when the output needs strict global topology without validation.
  • Avoid when tile motifs cannot express the intended style.

What It Does

  • Defines a small set of tile motifs
  • Chooses an orientation or variant for each grid cell
  • Creates larger paths or patterns from local motif connections

Use Cases

  • Decorative procedural textures
  • Maze-like or path-like tile patterns
  • Teaching how local tile choices create global visual structure

Inputs

  • 2D grid dimensions (W × H) and tile set with edge-color or motif rules
  • PRNG seed and boundary constraints

Outputs

  • Seamlessly tiled 2D grid assignment
  • Edge-matched procedural pattern or connectedness layout

Pseudocode

  1. 1.Choose a motif set and seedable random source
  2. 2.For each grid cell
  3. 3.Select a motif orientation or variant
  4. 4.Place the tile in the output grid
  5. 5.Optionally validate connectivity or boundary rules

Canonical Example

Input
2x2 grid with quarter-circle tile motifs and seed = 7
Output
four oriented tiles forming a curved decorative pattern
Explanation
Each cell chooses an orientation, and neighboring motifs visually connect into larger curves.

Implementation Notes

  • Store the seed, motif set, and orientation rule with generated output.
  • Preview small grids to check motif continuity before scaling up.
  • Use constraint checks if path connectivity matters.

Common Pitfalls

  • Random orientations can create disconnected or visually noisy paths.
  • Boundary behavior must be defined for cropped or wrapping patterns.
  • Unrecorded seeds make pattern variations hard to reproduce.

Interactive Mechanism Walkthrough

Spatial Primitive & Sweep-Line Canvas

Show rotating simple tile motifs to create connected decorative patterns on a small pattern generation example.

Truchet Tiles mechanism walkthrough step 1 of 5
Step 1 of 5: Choose a motif set and seedable random source
procedural-generation-mechanism

Notes

Truchet tiles are local motif systems; add constraints when global path structure matters.

Sources (1)

What each reference supports for this entry.

Texturing and Modeling: A Procedural Approach

Book

Procedural texturing reference for tile-based local pattern construction.

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

Conceptual neighborWang Tiles

Both are tile-based procedural pattern systems with local placement rules.

Conceptual neighborSimple Tiled Model

Truchet placement can be framed as a simple local tile model when adjacency matters.

Tags

Procedural Generation