← back to work

Swatch

A spatial logic language for declarative architectural design and generative floor plan visualization, exporting directly to clean, scalable SVG.

[shaped]Spring 2026
[template]Language
[materials]
Ohm, Node.js, Canvas

the brief.

Swatch was born from the need for a simple, declarative way to describe architectural spaces. While professional CAD software is powerful, it is often too heavy for quick ideation and algorithmic layout generation. Swatch provides a lightweight, human-readable syntax that allows designers to define layouts, walls, and furniture with precision, while leveraging programming constructs like loops and components to create complex, generative floor plans that export directly to clean, scalable SVG.

The Swatch compiler performs a rigorous semantic analysis to ensure that every program is structurally sound, type-safe, and free of logical contradictions. It features definite declaration validation, strong type checking, and advanced spatial logic that calculates physical bounding boxes to prevent furniture from overlapping with walls. The output is a high-quality SVG featuring professional drafting details like dot-grids, soft shadows, and high-contrast 'pill-style' text halos for furniture labels.

By abstracting away the complexity of raw SVG coordinate math and filters, Swatch allows for the automation of repetitive architectural patterns through 'for' and 'while' loops. The resulting artifacts are not just visual representations, but type-safe architectural data structures sanitized for security and optimized for both screen and print.

[page 14]interior design section // vol. 26
k-galvin.github.io
Swatch
open site in new tab ↗
swatch.plate // figure logs[page 15]