Overview
A browser-based astronomy simulator for exploring the Solar System from different viewpoints and points in time. It combines astronomical calculations, real-world datasets and real-time 3D rendering to reproduce planetary positions, lunar phases, eclipses, shadows and the night sky.
The project
The project began as an experiment in rendering a topographically accurate 3D Moon in the browser and gradually expanded into a broader astronomy simulator.
Users can observe from Earth or the Moon, inspect celestial bodies in 3D, change the observer's date and location, accelerate time, and watch events such as solar and lunar eclipses develop within the simulation.
The simulation preserves physically accurate astronomical positions, relative sizes, lighting and eclipse geometry. Distances are deliberately compressed for presentation, as representing Solar System distances at true scale would make an interactive view impractical. Astronomical calculations remain in physical space and are translated separately into rendering space.
Technical highlights
- Astronomical positioning - Date-dependent positions for the Sun, Moon and planets, including topocentric observation from Earth.
- Eclipse and shadow geometry - Solar and lunar eclipses derived from the relative positions and dimensions of celestial bodies, including umbra, penumbra and antumbra.
- Lunar terrain - NASA elevation and imagery data used to construct a displaced 3D lunar surface.
- Star catalogue - Thousands of stars rendered using astronomical position, magnitude and colour data.
- Milky Way rendering - Large-scale galactic structure incorporated into the surrounding sky.
- Multiple observation modes - Earth and Moon observation alongside close inspection of individual celestial bodies.
- Time simulation - Arbitrary UTC dates and accelerated real-time playback.
- Real-time WebGL rendering - Interactive camera movement, terrain, lighting and continuously updated astronomical geometry.
- Responsive controls - Desktop and mobile interfaces designed around keeping the simulation itself visible.
Broader Solar System rendering
The simulator extends beyond its original Earth and Moon focus to include every planet in the Solar System, along with Pluto. Each body uses planetary imagery sourced from NASA and can be inspected within the same simulation, with date-dependent astronomical positioning, lighting and observation controls.
Engineering challenges
One of the main engineering problems was separating astronomical space from rendering space.
Real Solar System distances are impractical for an interactive 3D scene. Compressing those distances for display, however, cannot be allowed to affect the astronomical calculations that determine positions, apparent sizes, lighting, eclipses and shadows.
The simulator therefore performs its astronomical calculations using physical coordinates and dimensions, then translates the results into a separate rendering space for presentation. The rendered scene can be compressed and manipulated for useful observation without becoming the source of astronomical truth.
The architecture also allows the same simulated celestial bodies to be used across Earth observation, lunar observation and close inspection, rather than maintaining separate versions of the Solar System for each mode.
Observation modes
The simulator can be viewed from Earth or the Moon, with the sky updating to match the selected location and time. Users can also leave those observation points to inspect the Moon, planets and other celestial bodies freely in 3D.
Eclipses and time simulation
Users can jump to preset astronomical events, choose any UTC date, or accelerate time to watch the Solar System move and eclipses develop in real time. Solar and lunar eclipses emerge from the simulated positions and dimensions of the bodies rather than from pre-rendered animations or scripted sequences.
The current simulation state is stored in URL parameters, including the selected time and observation settings. This makes specific viewpoints and astronomical events directly linkable and shareable.
Technology
TypeScript · Three.js · WebGL · Vite · Astronomy Engine · GLSL
Astronomical and terrain data from NASA and stellar catalogues.
Current state
The simulator is live with its core observation, astronomical positioning and time-simulation systems in place. Development is ongoing, including performance work, atmospheric rendering, additional planetary detail and broader Solar System exploration.
Project Details
- Role
- Software Developer
- Project type
- Independent astronomy simulator
- Status
- Ongoing independent project
- Website
- View live project →