Architecture · RFC #9 · pattern + sunset gradient

Draw me a skyscraper at dusk

Form follows function. You asked Claude. Glyph drew it — from a compose spec. A blue-glass tower at last light, hundreds of yellow-lit windows, an antenna with a blinking red warning light.

▸ The prompt
"Draw me a modern skyscraper at sunset. Tall rectangular tower with a grid of lit windows. Adjacent shorter buildings in silhouette. Antenna mast on top with a blinking red warning light. Dramatic dusk sky."

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

A modern glass skyscraper at dusk: a tall dark-blue rectangular tower filled with a grid of warmly-lit windows (pattern tiling) and a slanted warm reflection across its facade, an Art-Deco setback near the top, an antenna mast with a pulsing red warning light, smaller silhouetted buildings flanking it, and a vertical sunset gradient sky going from deep blue at top to red, orange, and peach at the horizon.

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-windows

720 lit windows

A single 24×36 pattern with four yellow rectangles per tile. Tile it across the tower's facade and you get hundreds of lit windows for the cost of one pattern definition. Different opacities per rect give a few dark-window flickers.

PRIMITIVE 2
4 gradients + slanted reflect

Sunset + reflection

A vertical 4-stop linear gradient (blue → red → orange → peach) for the sky. A separate diagonal gradient over the facade shows the sunset reflected on glass — angled top-right to bottom-left, low opacity, gold-to-transparent.

PRIMITIVE 3
starfield + pulse

Stars + warning light

Thirty stars in the upper band (sky-only region). The antenna warning light is a tiny circle with a pulse loop at 1.5 s period, scale 1.4 — the same blink every aviation regulation requires.

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": 800, "height": 1000 },
    "theme": { "background": "#0c1126" },
    "defs": {
      "gradients": [
        { "id": "g-dusk", "kind": "linear",
          "x1": "0%", "y1": "0%", "x2": "0%", "y2": "100%",
          "stops": [
            { "offset": "0%",  "color": "#1e3a8a" },
            { "offset": "40%", "color": "#7c2d12" },
            { "offset": "70%", "color": "#dc2626" },
            { "offset": "100%","color": "#fed7aa" }
          ]
        }
        // ... g-tower, g-reflect, g-ground
      ],
      "patterns": [ /* p-windows · 24×36 × 4 lit rects */ ]
    },
    "children": [
      // 1. dusk sky linear gradient rect
      // 2. starfield · 30 stars · seed 47 · top region
      // 3. adjacent buildings silhouette + windows pattern
      // 4. main tower silhouette (gradient fill)
      // 5. tower windows (pattern fill)
      // 6. facade sunset reflection (diagonal gradient)
      // 7. art-deco setback at top
      // 8. antenna mast polyline
      // 9. warning light circle w/ pulse · 1.5 s
      // 10. ground silhouette + sidewalk line
      // 11. title + caption text
    ]
  }
}

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

Glyph compose output SVG

Glyph-rendered draw me a skyscraper at dusk, 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 ↗ Greek Temple Cathedral Bridge