Tartan Generator

“An interactive p5.js tool to explore and code textile patterns.”

The Project: Coding the Material

The Tartan Generator is an interactive web-based tool developed with the p5.js library. It allows users to design and generate authentic Tartan patterns using the official color shade table from the Scottish Register of Tartans (SRT).

This software was born out of the practical need to instantly visualize complex patterns (for the “Tartan Pattern Design” project) prior to their physical weaving. It is also available and distributable as a playable web application on Itch.io.

Integrating SRT Standards

Tartans are created through specific weaving patterns (the “sett”) alternating warp and weft threads. The Scottish register defines strict color codes (e.g., R for Red, DB for Dark Blue, G for Green).

The tool directly translates the traditional “threadcount” notation (e.g., R/24 DB/8 Y/4 G/16) into visual patterns rendered on an HTML5 canvas.

Roadmap & Optimizations

The open-source project is under continuous improvement (available on GitHub):

  • Visual Rendering: Ongoing implementation of a true “2/2 twill weave” simulation (where threads pass over and under in a 45-degree diagonal) to reproduce an authentic woven texture.
  • Syntax Parser: Adding the ability to copy/paste an official formula from the SRT database to visualize it instantly.
  • UI & Exports: Interactive controls to adjust thread thickness, and export capabilities to generate a “Seamless Tile” image for 3D printing or graphic design.

Skills

Hard Skills

  • Generative Design: Designing visual structures based on strict algorithmic rules.
  • Web Development: Mastery of p5.js, DOM manipulation (HTML5 Canvas), and rendering loop optimization.

Project Details

Period2025 – Ongoing
Status🟢 Active Software / Open Source
CategoryAlgorithms / Web Tool
Tech StackJavaScript, p5.js, HTML5 Canvas
Liens