Orbital regimes, Lagrange points and three-body orbits: around Earth first, and their analogues at every planet and moon
Maintainers usually reply within 1 day
@pablo-mayrgundter is already working on this.
Since Oct 23, 2026.
- #297 by @pablo-mayrgundter — open
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript, three.js
- Domain
- computer-graphics
Research direction
Start with DESIGN.md’s orbit-lines and loading sections, then inspect the scene and orbit visibility settings described in the issue, including permalink.js and wideLines.js. The scope spans analytic orbital features, periodic-orbit data and integration, rotating-frame views, search and rendering across multiple body pairs. Done means the listed points, regimes and orbit families work in Earth–Moon and at least one other system, with offline fixtures, tests and documentation.
Written by the indexing model from the issue text.
Description
What
Show the structure of space around a body: the regions satellites and spacecraft use, the points where they can hold station, and the orbits around those points. Earth and the Earth–Moon system come first. Wherever a feature has an analogue elsewhere, build it as a rule that applies to every primary/secondary pair (Sun–planet, planet–moon), not as an Earth-only special case.
The prompt was an explainer video on cislunar space (transcript excerpts below). It sets out the features in order of distance: LEO, MEO, GEO, the region where the Moon's gravity starts to dominate (about 100,000 km), the Earth–Moon Lagrange points and their halo orbits, the orbits near the Moon, cislunar space as a 3D volume, and "Terran space" out to the Sun–Earth L1/L2. The economy and logistics side of the video is its own epic, #273.
Why
Today an orbit line is a body's own path around its primary (DESIGN.md orbit lines). Nothing shows the places in orbital space: where GEO is, where L2 is, why a halo orbit looks the way it does, or which moons have their own trojans. These are some of the most-asked "where is it" questions in spaceflight (JWST at Sun–Earth L2, Gateway's NRHO, the GEO belt). They are also the nodes of any logistics map (#273).
Scope
1. Every pair: Lagrange points, Hill spheres, synchronous orbits (analytic, cheap)
- L1–L5 for every primary/secondary pair in the scene: Sun–planet (including Sun–Earth-Moon barycentre), planet–moon, and Pluto–Charon. In the circular restricted three-body problem (CR3BP), L4/L5 form equilateral triangles with the two bodies; L1–L3 are the roots of the collinear quintic in the mass ratio μ (Newton's method, a few iterations). Place them in the pair's instantaneous rotating frame: the line between the two bodies, scaled by their current separation ("pulsating" frame), so they track the real, eccentric, perturbed orbits the scene already uses (the Moon's ELP, the planets' VSOP87).
- Hill sphere / sphere of influence of each secondary, as a faint shell: r ≈ a(1−e)·∛(μ/3).
- Synchronous orbit of each rotating body: a = ∛(GM·P_rot² / 4π²), drawn as a ring in the equator (stationary orbit) with its radius. Flag the cases where it's meaningless: inside the body, or outside the Hill sphere (Mercury, Venus, the Moon: selenosynchronous ≈ 88,000 km, past the Moon's ~60,000 km Hill radius, so unstable). Mars's areostationary orbit (≈17,000 km altitude) is a good check: Phobos orbits inside it and Deimos outside.
- Validation from real objects at these points: Jupiter's Trojans (Sun–Jupiter L4/L5; with #30), Earth's trojans (2010 TK7, 2020 XL5), and the co-orbital moons of Saturn: Telesto and Calypso at Tethys's L4/L5, Helene and Polydeuces at Dione's.
2. Earth's orbital regimes (and analogues where they make sense)
- LEO (to ~2,000 km altitude), MEO (with GNSS, e.g. GPS at ~20,200 km), GEO (35,786 km) and the geostationary belt, the GEO graveyard, HEO shapes (Molniya, Tundra). Draw them as translucent shells or rings, labelled, on the overlay layer.
- The ~100,000 km boundary where the Moon's gravity begins to matter. The video calls it the "warden line" (spelling from an auto-transcript: confirm the name against the video before using it as a label).
- Cislunar space as a volume: the torus enclosing the Moon's orbit and the Earth–Moon Lagrange points (the transcript's "MLAN Taurus" is garbled; confirm the term against the video).
- Sun–Earth L1/L2 (~1.5 million km) and Earth's Hill sphere: the boundary of "Terran space".
- Analogues: sun-synchronous orbits exist at Mars too (MRO, MGS), set by its J2 just as Earth's are. Areostationary orbit for Mars relays.
3. Three-body periodic orbits
- Halo, Lyapunov and vertical orbits around L1/L2, near-rectilinear halo orbits (NRHO, e.g. Gateway's 9:2 L2 southern NRHO), distant retrograde orbits (DRO), and short- and long-period orbits around L4/L5.
- Source: JPL's three-body periodic orbit catalogue (
ssd.jpl.nasa.gov/tools/periodic_orbits.html; the host is allowed in the sandbox). It gives initial conditions for Earth–Moon, Sun–Earth, Mars–Phobos, Jupiter–Europa, Saturn–Enceladus, Saturn–Titan and other systems. Record the queries and the results as offline fixtures, as with Horizons; tests never hit the network. - Integrate one period in the CR3BP (normalised units, cheap; RK or Taylor), then map into the scene through the pair's rotating frame, as with the points.
- A rotating (synodic) frame view option. Halo orbits, DROs and the stationkeeping regions only read in the frame turning with the pair; in the inertial frame they're the spirograph-like paths the video mentions. This could ride
ffollow, or a new frame choice next to it.
4. Near the Moon (and the other bodies' near space)
- Low lunar orbits, and the "frozen" inclinations (about 27°, 50°, 76° and 86°) where mascons and Earth's pull leave the orbit stable for long periods. Elliptical lunar orbits (e.g. CAPSTONE and LRO-type). Brief text on why most LLOs decay (mascons).
5. Later, with the integrator (#11)
- Cyclers: Earth–Moon cyclers and the Aldrin Earth–Mars cycler.
- Low-energy transfers (ballistic lunar transfer via Sun–Earth L1/L2) and the manifolds of the halo orbits.
UI and plumbing
- In the
oorbits visibility group, or a new letter ins=(permalink.jsSETTINGS_DEFAULTS) so a link can show them. A detail level of its own: points and regimes on by default when near the pair, the families on request. - Lagrange points are targets: searchable ("Earth-Moon L2", "Sun-Jupiter L4"),
goTo-able, with a label and a short description card. - Drawn with
wideLines.jsand the label renderer, on the overlay layer, throughsceneReferred()(HDR). - Real spacecraft at these points (JWST, SOHO, Gaia, the planned Gateway) belong to #50 and #120; this issue gives them their frame and context.
- Load lean: the analytic parts are a few hundred lines; the periodic-orbit families are data loaded on demand (DESIGN.md what loads when).
Done when
- L1–L5, the Hill sphere and the synchronous orbit (or a note on why there isn't one) show for every pair, and track the real bodies over time. Tests check them against the closed forms and against the real co-orbitals (Telesto, Calypso, Helene, Polydeuces and Jupiter's Trojans near the right points).
- Earth's LEO/MEO/GEO regimes, the cislunar boundary and volume, and Sun–Earth L1/L2 are visible and labelled. A permalink shows each.
- At least the Earth–Moon L1/L2 halo family, an NRHO and a DRO, from JPL's catalogue with offline fixtures, draw in both the inertial and the rotating frame. One non-Earth system (Mars–Phobos or Saturn–Enceladus) uses the same code path.
- A doc for the area (e.g.
js/scene/Lagrange.mdor a DESIGN.md section) records the frames, the sources and what was checked.
Related
- #11 integrator (cyclers, transfers, manifolds); #2 flight sim
- #50 Earth satellites (TLE/SGP4: real LEO/MEO/GEO populations fill the regimes); #30 asteroids and comets (Trojans); #114, #112 (orbital frames)
- #120 missions and models (JWST, Gateway, CAPSTONE at these orbits)
- #273 cislunar economy epic: uses these points and regimes as its network's nodes
Source: the cislunar explainer video, auto-transcribed
Chapters: 1 Orientation to space · 2 Orbital mechanics · 3 Defining cislunar space · 4 Terran space and asteroids · 5 The cislunar economy · 6 Security and future strategy.
Key passages for this issue:
- LEO to ~2,000 km; GPS in MEO; GEO "about twice as far", where satellites orbit at the rate the Earth turns; the Moon's orbit at ~10× GEO.
- "Beginning at roughly three times the distance to GEO at about 100,000 km above the Earth, the Moon's gravity becomes increasingly important … This makes possible very complex trajectories, including spirograph-like paths and cycler orbits. Traditional astronavigation using two-line elements … is no longer sufficient."
- "Around the orbit of the moon are five special locations … the Lagrange points. Spacecraft can also travel in halo orbits around these points."
- "L1 and L2 orbits, the gateway orbit, distant retrograde orbit, and the regions around L4 and L5."
- "Very close to the moon are low lunar orbits along with a variety of elliptical orbits. Only a limited number of these orbits are naturally stable over long periods because of the moon's uneven mass concentrations or mascons and the gravitational perturbations of the earth."
- "this vast region beyond GEO and especially the region beginning around the warden line at approximately 100,000 km extending through the [MLAN Taurus], a donut-shaped volume encompassing the moon's orbit and Lagrange points … cislunar space … not just a plane, it encompasses an enormous three-dimensional volume."
- "This enormous region surrounding the earth moon system can be thought of as Terran space. Within it we find the Sun–Earth L1 and L2 points."
- "Small asteroids, particularly those that are relatively easy to reach in energy terms, routinely pass through Terran and cislunar space."
- Dominant language
- JavaScript
- Stars
- 55
- Forks
- 4
- Avg merge
- 10h 12m
- Merged PRs (30d)
- 134
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from celestiary/web
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
celestiary/web#345 ·
Maintainers usually reply within 1 day
-
Cesium guest (?cesium=iframe): white flicker near Mars's and Earth's surface remains after #335Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
celestiary/web#344 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
celestiary/web#340 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 1-2 days Newbie friendliness 48/100
celestiary/web#336 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
celestiary/web#334 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
feimacode/open-design-agent-kit#66 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
xojs/eslint-config-xo#134 ·
-
FEATURE REQUEST
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
linuxmint/cinnamon-spices-extensions#1193 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 80/100
huggingface/transformers.js#1839 ·
Maintainers usually reply within 1 day