Architecture · RFC #9 · pattern + polygon

Draw me a Greek temple

Order in stone. You asked Claude. Glyph drew it — from a compose spec. Six Doric columns, a triglyph-metope frieze, a pediment at the top.

▸ The prompt
"Draw me a Greek temple — Doric order, front elevation. Six fluted columns on a stylobate. Architrave + triglyph frieze + cornice above. Pediment on top with an akroterion. Marble texture. Morning sky."

— what to say to your AI agent. Claude writes the Glyph compose spec; the compose compiler emits one byte-locked SVG.

A front elevation of a Doric Greek temple: six fluted columns standing on a two-step stylobate, with simple Doric capitals supporting an architrave with a triglyph-metope frieze, a cornice, a triangular pediment, and a small akroterion finial at the apex. Set against a sky-blue to parchment gradient with a green lawn at ground level.

One scene, three primitives

RFC #9's defs (gradients + patterns), shapes (silhouette-path, polygon, polyline, ellipse), and accents (glow, starfield, icon) compose the whole picture.

PRIMITIVE 1
pattern · p-flute

Doric columns

Each column body is a slightly tapered trapezoidal silhouette filled with a 8×8 flute pattern (two thin verticals per tile). Capitals and bases are stacked rectangles above and below. Six columns × three layered shapes = 18 children for the colonnade.

PRIMITIVE 2
pattern · p-marble + triglyph

Entablature + frieze

The architrave, cornice, and stylobate are all rectangles filled with a 60×30 stone-block marble pattern. Six triglyphs in the frieze — each a small marble rect with a vertical groove polyline.

PRIMITIVE 3
polygon + akroterion

Pediment

The pediment is a single triangle polygon filled with the marble pattern. A small akroterion (decorative apex finial) is a 3-point polygon perched at its peak.

How Glyph drew it

Claude writes the compose JSON; Glyph's compose compiler turns it into byte-identical SVG.

The compose spec JSON · excerpt

{
  "compose": {
    "viewBox": { "width": 1000, "height": 700 },
    "theme": { "preset": "pencil-parchment" },
    "defs": {
      "patterns": [
        { "id": "p-flute",  "width": 8, "height": 8,
          "children": [ /* two thin verticals */ ] },
        { "id": "p-marble", "width": 60, "height": 30,
          "children": [ /* block-pattern lines */ ] }
      ],
      "gradients": [ /* g-sky, g-ground */ ]
    },
    "children": [
      // 1. sky gradient + ground gradient
      // 2. stylobate (2 marble-filled steps)
      // 3. 6 columns (body + capital + base × 6 = 18)
      // 4. architrave marble band
      // 5. frieze background + 6 triglyphs (×2 = 12)
      // 6. cornice marble band
      // 7. pediment polygon (marble fill)
      // 8. akroterion finial
      // 9. title + caption text
    ]
  }
}

Generator script: scripts/gen-showcase-extensions.mjs · fixture: packages/core/__fixtures__/compose/arch-temple.json. View on GitHub.

Glyph compose output SVG

Glyph-rendered draw me a greek temple, same SVG as the hero stage

Byte-stable across Ubuntu / macOS / Windows × Node 20 / 22. The compose compiler resolves the gradient + pattern defs first, then walks children in z-order.

More Life in Glyph

See the gallery ↗ Cathedral Skyscraper Windmill