Garment Notation Language: Formal descriptive language for clothing construction
Introducing the Garment Notation Language (GNL), a novel formal descriptive language aiming to bring mathematical rigor to clothing construction. Much like musical notation or architectural blueprints, GNL seeks to enable unambiguous and generative garment descriptions. This project appeals to Hacker News's interest in domain-specific languages and applying computational thinking to diverse fields.
The Lowdown
The Garment Notation Language (GNL) is presented as a formal descriptive language for defining clothing construction. Inspired by established notation systems in dance (Labanotation), music (staff notation), and architecture (plan/section/elevation), GNL strives to provide a rigorous, unambiguous method for describing garments, allowing for their generative construction from a valid language expression.
- Core Principles: GNL is designed to be body-anchored, utilizing anatomical landmarks as its coordinate system; topological, treating garments as surfaces; constructive, encoding build order; and composable, allowing complex garments to be built from simpler elements.
- Language Implementation: The language's grammar is formally defined using a PEG (Parsing Expression Grammar) targeting Peggy, which generates a richly-typed Abstract Syntax Tree (AST) for processing.
- Interactive Viewer: A live web viewer is provided, allowing users to input GNL code and visualize both the assembled garment (with stitch lines and dimensions) and individual flat pattern pieces (with outlines, grain lines, and dimensions).
- Dataset Integration: A converter is included to transform garment templates from the Korosteleva NeurIPS 2021 dataset (2D panel geometry in JSON) into GNL, showcasing its descriptive capabilities and interoperability.
- Status and Future: Currently at v0.2 Draft, the project invites feedback from garment-makers, pattern-drafters, and computational designers for its refinement, with a comprehensive specification available for review.
GNL represents an intriguing intersection of computer science and textile design, offering a structured approach to garment creation that could streamline design, manufacturing, and communication within the fashion industry.