Claude × Glyph showcase

Draw me Orion's
journey to the Moon

A 25-day spacecraft mission, animated from one English sentence. You asked Claude. Glyph drew it. Same JSON spec, same SVG, every time — byte-for-byte. Watch the path get pen-drawn across the stars below.

▸ The prompt
"Draw me NASA's Artemis I Orion spacecraft journey to the Moon and back. Use the Glyph viz grammar. Make it beautiful — visible to a 5-year-old and meaningful to a 70-year-old. Show Earth on the left, the Moon on the right, and the spacecraft's curved path: an outbound transit, a wide retrograde orbit around the Moon, and the return arc. Add a draw-in animation so the path traces itself over the mission timeline."

— what to say to your AI agent. Claude reads it, writes a Glyph JSON spec, and the Glyph compiler renders the SVG below. No code on your end.

Orion spacecraft's journey to the Moon and back An animated SVG: starry background, Earth on the left, Moon on the right with a dashed orbital ring. A glowing path traces from Earth, arcs upward to the Moon, loops 0.75 times around the Moon retrograde, then returns to Earth below. A small spacecraft icon flies along the path. Total mission duration shown as 25 days. Earth Moon MISSION DAY 1 of 25
25 seconds of animation · 1 second ≈ 1 mission day · click anywhere to refresh

The mission, in three acts

Each act of the journey corresponds to one phase of the path above. Real Artemis I numbers from NASA's mission log.

PHASE 1
Days 1 – 6

Outbound transit

The Space Launch System rocket boosts Orion onto a trans-lunar trajectory. The spacecraft coasts upward and outward, gravity gently bending its path toward the Moon — a four-day journey across about 240,000 miles of space.

PHASE 2
Days 6 – 22

Distant Retrograde Orbit

Orion swings around the Moon in a wide, stable orbit — backwards relative to the Moon's own motion. It travels 64,000 km beyond the lunar far side, farther than any human-rated spacecraft has ever flown.

PHASE 3
Days 22 – 25

Return & splashdown

A return burn slingshots Orion back toward Earth. The capsule re-enters at 25,000 mph (Mach 32), the heat shield handling temperatures half as hot as the Sun's surface. Splashdown: Pacific Ocean, December 11, 2022.

How Glyph drew it

Claude translates the English prompt into this JSON spec. Glyph compiles the spec to a deterministic SVG — byte-identical every run, every platform.

The Glyph spec JSON

// orion-journey.json — what Claude writes for the prompt above
{
  "version": "glyph/0.1",
  "title": "Orion's Journey: Earth → Moon → Earth",
  "data": {
    "function": {
      "shape": "function",
      "parameter": { "name": "t",
                     "min": 0, "max": 1,
                     "samples": 400 },
      // three phases, switched by t — outbound, DRO, return
      "xExpr": "(t < 0.3) ? (0.6 + 4.9*(t/0.3))
              : ((t < 0.7)
                  ? (8 + 2.5*cos(PI - 1.5*PI*((t-0.3)/0.4)))
                  : (8 - 7.4*((t-0.7)/0.3)))",
      "yExpr": "(t < 0.3) ? (sin((t/0.3)*PI)*1.5)
              : ((t < 0.7)
                  ? (2.5*sin(PI - 1.5*PI*((t-0.3)/0.4)))
                  : (-2.5*(1-(t-0.7)/0.3)
                       - sin(((t-0.7)/0.3)*PI)*0.5))"
    }
  },
  "layers": [{ "mark": "line",
               "encoding": { "x": { "field": "x" },
                            "y": { "field": "y" } } }],
  "animation": { "kind": "draw-in",
                  "duration_ms": 12000,
                  "easing": "ease-in-out" }
}

The three-phase ternary is the whole "mission profile" — phase boundaries at t = 0.3 and t = 0.7 partition the timeline into outbound, DRO, and return. View on GitHub.

Glyph compiler output SVG

Glyph-rendered Orion mission path, byte-locked across CI

Byte-stable across Ubuntu / macOS / Windows × Node 20 / 22. The 12-second pen-draw animation is part of the SVG itself — open the file directly to see it loop. No JS required for the animation, no runtime dependency at view time.

Your turn — prompts to try

Tell Claude what you want to see. Be specific about entities (Earth, Moon, spacecraft), shape of the path (arc, loop, transit), and who it's for (a 5-year-old, a textbook, a museum wall).

▸ Mathematics
"Draw me a Lissajous curve where the frequencies are 3 and 2. Show the figure-eight clearly. Animate the pen drawing it from start to finish over five seconds."
▸ Physics
"Show me a pendulum swinging back and forth, then a damped one that gradually stops. Side by side, same starting angle. Label which is which."
▸ Biology
"Use Gray-Scott reaction-diffusion to show how a leopard gets its spots. Periodic boundary, F=0.062, k=0.062. Let the pattern emerge over 200 steps."
▸ Astronomy
"Show four photons passing a black hole at different impact parameters. One scatters, one orbits the photon sphere once before scattering, one falls in. Make it look like a textbook figure."

More Life in Glyph

See all four ↗ A Heartbeat A Leopard's Spots A Sunflower's Seeds
Joy of Math ⭐ GitHub