Life in Glyph · 4 of 4

Draw me a sunflower's
secret math

200 seeds packed at the golden angle, animated from one English sentence. You asked Claude. Glyph drew it. Every sunflower, every pine cone, every aloe rosette uses the exact same 137.50776° — the only angle that fills a disc without leaving gaps or making stripes.

▸ The prompt
"Draw me how a sunflower packs its seeds. Use the Glyph viz grammar with a recurrence shape — each seed n placed at radius √n, angle n × 137.5° (the golden angle). 200 seeds. Beautiful enough that a child sees the spiral, deep enough that a grandparent recognizes the Fibonacci connection."

— what to say to your AI agent. Claude writes a Glyph spec; the Glyph compiler iterates the recurrence and emits one circle per seed.

A sunflower's seeds packing at the golden angle An animated SVG: stylized sunflower silhouette with golden-yellow petals around a central seed head; 200 seeds emerge one by one, each placed at the next golden-angle position, building up the characteristic interlocking spiral pattern. SEED 0 of 200 golden angle = π·(3 − √5) ≈ 137.50776°
~8 seconds to lock in the spiral · click anywhere to grow a new flower

The same angle, every time

Watch what happens as the seed count grows. The spiral arms reveal themselves not from any extra rule, but purely from the same fixed angle, applied 200 times.

STAGE 1
Seeds 1 – 13

The first arc

The first dozen or so seeds spiral outward in a single arc — no pattern visible yet. Each seed sits just outside its predecessor at exactly 137.5° around.

STAGE 2
Seeds 13 – 55

Spirals appear

Counting clockwise spirals, you'll find 13. Counterclockwise: 8. Both are Fibonacci numbers. This isn't a choice — it's forced by the angle. Any other angle gives stripes, gaps, or radial spokes.

STAGE 3
Seeds 55 – 200

Hexagonal lock

At higher counts the spirals refine. Each seed sits with six near-equal-distance neighbors — the same hexagonal packing real sunflower seeds settle into. The pattern is identical for 200 seeds or for 2,000.

How Glyph drew it

Claude writes the JSON; Glyph iterates the recurrence 200 times and emits one row per seed. Same spec → byte-identical SVG, every platform, every run.

The Glyph spec JSON

// sunflower-seeds.json — Vogel's phyllotaxis at the golden angle
{
  "version": "glyph/0.1",
  "title": "Sunflower seeds",
  "data": {
    "recurrence": {
      "shape": "recurrence",
      "state": ["x", "y"],
      "initial": { "x": 0, "y": 0 },
      // seed n placed at radius √n, angle n·golden_angle
      // golden_angle = π·(3 − √5) ≈ 2.39996322972865 rad
      "step": {
        "x": "sqrt(n + 1) * cos((n + 1) * 2.39996322972865332)",
        "y": "sqrt(n + 1) * sin((n + 1) * 2.39996322972865332)"
      },
      "steps": 800
    }
  },
  "layers": [{
    "mark": "point",
    "encoding": {
      "x": { "field": "x" },
      "y": { "field": "y" }
    }
  }]
}

Try changing 2.39996 to 2.0 (you'll get stripes) or to π (radial spokes), then change it back. The pattern collapses everywhere except the golden angle — that's the proof. View on GitHub.

Glyph compiler output SVG

Glyph-rendered golden-angle phyllotaxis pattern with 800 seeds, byte-locked across CI

Byte-stable across Ubuntu / macOS / Windows × Node 20 / 22. 800 seeds emitted as 800 circles. cos and sin precision-clamped to 12 significant figures so libm drift never reaches the SVG.

Your turn — prompts to try

Phyllotaxis is everywhere in nature. Name the plant or the angle, and Claude can ask for the right variation.

▸ Bad angles
"Show me three sunflowers side by side. Seed angles of 137.5° (golden), 90°, and 137.4°. Same number of seeds. Highlight how only 137.5° packs without gaps."
▸ Pine cone
"Draw me a pine cone. Same recurrence as a sunflower but seeded outward in 3D — show me the top-down view where the Fibonacci spirals (5 + 8 = 13) are clearest."
▸ Sea shell
"Show me a Fibonacci spiral overlaid on a Nautilus shell cross-section. Use a recurrence where each new arc's radius is the sum of the previous two."
▸ Bee dance
"Plot a honeybee's waggle-dance figure-eight. Use a parametric trajectory; label the angle of the waggle line and how it encodes direction to the food source relative to the sun."

More Life in Glyph

See all four ↗ Orion's Journey A Heartbeat A Leopard's Spots