A 2,000-year-old analog computer, animated from one English sentence. You asked Claude. Glyph drew it. Bronze gears, ground by hand, that predicted lunar eclipses to within a few hours — sixteen centuries before the next mechanical computer would exist.
"Draw me the Antikythera Mechanism's Moon-pointer output. Use the Glyph viz grammar with a parametric function:x(t) = R₁·cos(t) + R₂·cos(13t),y(t) = R₁·sin(t) + R₂·sin(13t)— a deferent + epicycle, matching Hipparchus's 2nd-century-BCE lunar theory. R₁ = 5, R₂ = 1.2. Pencil-sketch style. A child should see the looping flower-pattern; a historian should recognize the same Saros 223:235 ratio the original bronze gears encoded."
— what to say to your AI agent. Claude writes the Glyph spec; the compiler samples the compound epicycle 800 times around one solar year.
Sum two circular motions at integer-ratio frequencies and you get a flower. Antikythera doesn't just decorate — those flower-petals correspond to the Moon's monthly passes around the sky, and a pointer running on the output gear tracks the Moon's actual position to within a fraction of a degree.
The main wheel turns once per solar year — driven by a hand crank on the front of the mechanism. Original tooth count: 64. This represents the average annual motion through the zodiac.
A smaller gear mounted on the deferent, geared to spin 13 times for every revolution of the parent. Original tooth count: 50. This represents the Moon's faster orbital motion against the background of the stars.
Combining the two motions through additional gear stages, the mechanism predicts when the Moon, Sun, and Earth align. The Saros cycle (223 lunar months ≈ 235 synodic months) repeats eclipses every 18 years; the Antikythera dial pre-printed the date of each one.
Claude writes the JSON; Glyph samples the compound epicycle 800 times around one solar year and emits the trace. Same spec → byte-identical SVG, every platform, every run.
// antikythera-moon.json — compound epicycle, R₁:R₂:freq = 5:1.2:13 { "version": "glyph/0.1", "title": "Antikythera Moon trace", "data": { "function": { "shape": "function", "parameter": { "name": "t", "min": 0, "max": 6.283185307179586, "samples": 800 }, // deferent (annual) + epicycle (13× faster) "xExpr": "5*cos(t) + 1.2*cos(13*t)", "yExpr": "5*sin(t) + 1.2*sin(13*t)" } }, "layers": [{ "mark": "line", "encoding": { "x": { "field": "x" }, "y": { "field": "y" } } }] }
Try 13 → 12 (twelve petals, even more flower-like), 7 (less symmetric, but matches Mercury's actual orbital ratio), or 235/19 ≈ 12.37 (the Metonic cycle — never closes, drifts each year). The two-thousand-year-old gear ratios are still the right ones. View on GitHub.
Byte-stable across Ubuntu / macOS / Windows × Node 20 / 22. Twelve clean lobes, one for each lunar month. The same astronomical knowledge that survived a Roman shipwreck — restored as 800 floating-point samples.
Compound circular motion describes a huge swath of astronomy and engineering. Tell Claude the body, the cycle, or the gear count.
"Show me Mars retrograde motion as seen from Earth. Two circular orbits (Earth at 1 AU, Mars at 1.52 AU); plot Mars's apparent position against the stars over two years. The looping retrograde paths are the Antikythera's planetary dials in action."
"Draw a Spirograph rosette with a 7:1 gear ratio. Inner gear radius 1, outer gear radius 5, pen offset 3. Show the petal pattern."
"Plot Lord Kelvin's tide-predicting machine output: sum of 12 sinusoids with different frequencies and amplitudes (the dominant tidal constituents M2, S2, N2, K1, O1, …). Show how the composite predicts the tide at any port."
"Draw a Lissajous figure for a perfect fifth (3:2 frequency ratio) and an octave (2:1). Side by side. Animate the trace so the viewer sees the closed curves form."