3D Simulation Technical Guide
This guide explains the concepts behind the Interactive 3D Solar System Simulation: the geocentric frame it renders in, the input constants that drive it, and how it computes positions. It is written for developers, researchers, and anyone curious about the technical implementation; basic familiarity with JavaScript and trigonometry is helpful but not required.
This page establishes:
- The geocentric frame the scene renders in, and the start date — The Geocentric Frame, Start date.
- Where the source code and data live, and what each input parameter is — Source Code & Data, Input Parameter Reference.
- How right ascension and declination are computed from world positions — Right Ascension & Declination Calculations.
- How the other planets and the Moon are placed — How Other Planets Work, Moon.
Code-level documentation lives upstream. The simulator’s own docs are the source of truth for its internals — scene-graph hierarchy, constants reference, the render loop, the equation of centre and the N-body engine. They are kept current with the code; this page is not. See the docs/ directory in the simulator repository.
The Geocentric Frame
The simulation places Earth at the center of the scene — a geocentric reference frame. The Sun orbits Earth (not the other way around), and all planets revolve around the Sun, which itself revolves around Earth. This is a natural choice because the model describes precession cycles as seen from Earth’s reference frame.
How it works in the 3D scene:
The Sun is placed by the engine every frame: its apparent longitude is the derived Sun (The Derived Sun) on the one deep clock, at the N-body distance of date. For the planets the scene reads the model’s own N-body element chain of date — each planet’s heliocentric position from its elements of date, evaluated with light-time, then placed geocentrically by adding the Sun’s position. The net effect is the correct apparent geocentric motion (annual retrograde loops, elongations, and zodiac transit) with no scaffold of nested rotations.
The two base units of the scene are 2π radians = one solar year and 100 units = 1 AU; every period and distance is expressed relative to those.
Start date
The scene opens at the June Solstice of 2000 (21 June 2000, 00:00 UTC). The engines place every body at that instant and at every other; the start date is a convenience, not an alignment the scene depends on.
Source Code & Data
- Simulation code: Available on GitHub (see the simulation source files)
- Model documentation: The simulator’s own docs — architecture, constants, verification gates — are in the repository’s
docs/ - Configuration: All values in the simulation match the Formulas and the theory described in this documentation
Input Parameter Reference
The simulation is driven by a set of input constants. All other values (day lengths, year lengths, precession rates, orbital positions) are derived from these inputs.
Core Cycle Parameters
| Parameter | Description |
|---|---|
perihelionalignmentYear | The year when the longitude of perihelion was exactly 90° (aligned with December solstice). According to J. Meeus’s formula (the IAU mean elements), this was 1246.03 (1246 AD) — a dated alignment event, used by the scene’s perihelion-date readouts. |
perihelionalignmentJD | The same alignment date expressed as a Julian Day number (2,176,153), used for precise date calculations. |
Year & Day Length Parameters
| Parameter | Description |
|---|---|
meansiderealyearlengthinSeconds | The sidereal year in seconds (31,558,149.76). This is the J2000 anchor of the model — held constant within the modern-era scope, where all day/year calculations derive from it. The value itself drifts very slowly at geological timescales via solar mass loss (Kepler’s third law) and Earth’s own N-body drift; see Expanding Resonance for the deep-time layer. |
Model Start Position Parameters
| Parameter | Description |
|---|---|
startmodelJD | The model’s reference date as a Julian Day (2,451,716.5 = June 21, 2000 at 00:00 UTC). All orbital positions are calculated relative to this point. |
startmodelYear | The same date as a decimal year (2000.5 = mid-2000). Used for year-based calculations. |
Physical Constants
| Parameter | Description |
|---|---|
currentAUDistance | The length of 1 Astronomical Unit in kilometers (149,597,870.698828 km). Used for converting simulation units to real distances. |
speedOfLight | Speed of light (299,792.458 km/s). Used for light-time calculations when computing apparent vs. true positions. |
deltaTStart | The ΔT stack’s trend anchor at J2000 (56.07 seconds), the fitted stack’s zero point — distinct from the IERS instantaneous ΔT of ~63.8 s. ΔT = TT − UT, the difference between Terrestrial Time and Universal Time, which changes over time due to Earth’s variable rotation. |
Right Ascension & Declination Calculations
All celestial position values in the simulation are calculated entirely in the browser - no external API calls. The calculations are deterministic based on the current Julian Date.
Step 1: Get World Positions
Each frame, the simulation retrieves the 3D positions of celestial bodies:
earth.rotationAxis.getWorldPosition(EARTH_POS); // Earth center
sun.planetObj.getWorldPosition(SUN_POS); // Sun center
obj.planetObj.getWorldPosition(PLANET_POS); // Current planetStep 2: Transform to Earth-Equatorial Frame
The planet’s position is converted to Earth’s local coordinate system, which carries the axial tilt of date:
LOCAL.copy(PLANET_POS);
earth.rotationAxis.worldToLocal(LOCAL); // World → Earth frameThe conversion’s x-axis is the March-equinox direction, whatever the scene’s start instant; the engines place the bodies in that frame.
Step 3: Convert to Spherical Coordinates
SPHERICAL.setFromVector3(LOCAL);
obj.ra = SPHERICAL.theta; // θ → Right Ascension (radians)
obj.dec = SPHERICAL.phi; // φ → Declination (radians)Since LOCAL is already in the tilted equatorial frame, θ directly gives the RA and φ gives the Declination - no additional trigonometry needed.
Step 4: Format for Display
The raw radians are converted to sexagesimal notation:
obj.raDisplay = radiansToRa(obj.ra); // "12h34m56s"
obj.decDisplay = radiansToDec(obj.dec); // "+12°34′56″"Earth’s own frame is placed from the engine each frame, so any change to its tilt, precession rate or date is reflected in the next projection.
How Other Planets Work
Every planet (Mercury through Neptune) is placed from the N-body element chain of date: engine-extracted J2000 anchors, the secular modes and the derived periodic terms, banked in the published element table and evaluated each frame with light-time (Moon & Planets). The inclination and node, the eccentricity and the perihelion are all elements of date from that chain — nothing is a static J2000 tilt. The perihelion markers sit on the chain’s own perihelion of date, and the published long-period descriptors are the chain’s leading secular eigenfrequencies.
Key Differences from Earth
| Aspect | Earth | Other Planets |
|---|---|---|
| Orbit plane | the engine’s orbit normal of date against the invariable plane | the N-body element chain of date |
| Spin axis | the obliquity integration’s spin axis on the composed lunisolar clock | the spin channel’s integration on the planet’s own orbit-plane history (Obliquity) |
| Perihelion | the N-body series’ own perihelion of date (the published perihelion-of-date beat is ~20,936 years) | the chain’s elements of date; the published periods are its leading secular eigenfrequencies |
Moon
The Moon uses Earth as its centre. Its position is the derived lunar series (The Derived Moon), evaluated in the Moon’s mean plane of date and turned into the ecliptic by the tilt of date: the stack’s base is the Laplace plane of date and the container’s tilt the free inclination of date, so the orbit plane regresses with the node of date and, inside the Laplace radius at deep time, precesses about Earth’s equator rather than the ecliptic. The Moon’s months are the IAU inputs; its perigee and node of date are compositions of the inertial lunar chain with the precession of date; its distance follows the cited Farhat 2022 history at deep time; and its axial tilt is a Cassini state of date, not a fixed composition.
The detailed settings for each body are browsable in the simulation’s Planet Orbit Analysis (Tools menu) and in the published @essrt/model-values registry.
Summary
| Component | Key Value | Purpose |
|---|---|---|
| Base time unit | 2π = 1 solar year | All periods relative to this |
| Base distance unit | 100 = 1 AU | All distances relative to this |
| Start date | June Solstice 2000 | The scene’s opening instant; every position is the engine’s at the current instant |
The published periods are the model’s dynamical values (Earth’s Clock); the seven planets render from the N-body element chain.
Key Takeaways
- Two base units - 2π for time (1 year), 100 for distance (1 AU)
- Engine-placed bodies — every position comes from the published engine at the scene’s instant; the two reference points are a display scaffold and carry no dynamics
- Browser-based calculations - All RA/Dec values computed locally, no external APIs
- Geocentric frame — the engines are heliocentric; the scene subtracts Earth’s position, so the Sun circles Earth once per year and the planets show their geocentric loops
- Cross-surface parity - All simulation values match the Orbital Calculator and the published model-values registry
Return to the Interactive 3D Simulation or explore the Formulas for the complete analytical formulas.