Drawing the Real Night Sky in a Browser
How Asterarium Works
Asterarium is a planetarium that runs in a browser. Choose a place on Earth and a moment in time, and it draws the sky of that place at that moment: the arrangement of the stars, the positions of the Sun, Moon and planets, and the brightness of the sky itself all come from real catalogues and astronomical calculation.
This article explains how it works, for developers. It starts from one constraint, a static site with no server-side code at all (no program runs on a server when a page is opened; what is served is only the files finished at build time), then follows what was decided, why, and how, across the ten sections listed below: from the big picture at the start to the design principles that run through all of them at the end.
Each section stands on its own, which is why a few premises are restated briefly from one section to the next. Jump to whichever one interests you from the table of contents. Within each section, astronomy and 3D-rendering terms carry notes. What the constraint cost, and what it bought, is set out at the end of the closing section, "Design Principles, in Summary".