Antikythera
A working reconstruction of the Antikythera mechanism in one HTML file. Scroll turns the crank, and every gear turns at its true ratio.
- Status
- Live
- Launched
- Licence
- MIT
- Language
- HTML
One command, copied from the repo.
Install Antikythera: git clone https://github.com/rishsadh/antikythera
rishsadh/antikythera
What it does
The gears are drawn by a single WebGL2 fragment shader as signed distance fields, so the teeth, bores and spokes are maths, not pictures. There are no images anywhere. The train uses real tooth counts, and each wheel's speed is set by the tooth ratio of the wheel before it. Scroll is the crank: the readout at the bottom, with the day count, the Moon phase and the Saros month out of 223, is computed from how far you have turned it. Two wheels mounted slightly off axis drive a pin and slot, so the output speeds up and slows down on the Moon's rhythm. A uRuin uniform lets fractal noise eat the bronze away toward roughly the share of the mechanism that survived the sea. A resolution governor measures frame times and lowers the render scale when frames run long.
To run it, open index.html in a browser. It loads GSAP, ScrollTrigger and Lenis from jsDelivr and two Google Fonts. Everything else is in the file.
It is a visual reconstruction, not a scholarly model. Where the surviving fragments are silent, the layout is chosen to read well, not proven. The tooth counts follow the published reconstructions, and the main drive wheel uses 224 teeth where some give 223.
Why it exists
I built it as a test of my coding agent, to see how far it could go when pushed to its limit on one self-contained file.
The 127-tooth wheel exists because 254 sidereal months fall almost exactly into 19 years. This build makes that ratio something you can move: scroll the page and every wheel in the train turns at its true ratio, reversing at every mesh, while the readout counts days, Moon phase and the Saros month.