From 036af5f02d6ef7fda211adf47000faf8cf9f3526 Mon Sep 17 00:00:00 2001 From: Senrokai Date: Tue, 29 Sep 2026 19:33:38 +0200 Subject: [PATCH] Test what the drawn solar system claims at far dates and on Saturn's ring Three claims had no test that fails without them: - Standish's rates for a, e and i. The frozen Horizons vectors run from 1950 to 2100, where dropping them moves a planet at most 0.036 degrees (Saturn in 2100), inside every ceiling; the clock runs to AD 3000, and the long span is what those rates are for. Two vectors from Horizons (DE441) for 3000-01-01 now join the table: the Earth-Moon barycentre, 0.005 degrees out (0.129 without the rates), and Saturn's, 0.065 (0.412). - A planet's orbit line turned each tick with its node and periapsis: only the Moon's and Pluto's were tested. Mars must stay on its own line 730 000 days before J2000; on a line left at J2000 it is 3.3 million km from it at AD 1. - Saturn's ring lit and drawn from both faces, which dc20acc's title claims and the tests, reading only its geometry and picking through its front face, never checked. Controls: the three rates dropped fails "puts earth within 0.02 degrees of Horizons on JD 2816787.5" (and Saturn's); the top-level line left unturned fails "turns a planet's drawn orbit with its node"; an unlit front-face-only material fails "is lit, and seen from either face". Co-Authored-By: Claude Opus 5.5 (1M context) --- .../system-orbits-renderer.spec.ts | 17 +++++++++++++++++ .../shared/rendering/texture-catalog.spec.ts | 8 ++++++++ 2 files changed, 25 insertions(+) diff --git a/src/app/features/galaxy-system/system-orbits-renderer.spec.ts b/src/app/features/galaxy-system/system-orbits-renderer.spec.ts index 298e5a7..a37df6b 100644 --- a/src/app/features/galaxy-system/system-orbits-renderer.spec.ts +++ b/src/app/features/galaxy-system/system-orbits-renderer.spec.ts @@ -537,6 +537,11 @@ describe('solar-system bodies against Horizons', () => { // tidal acceleration). const HORIZONS: Array<[id: string, jd: number, x: number, y: number, z: number, maxDeg: number]> = [ ['earth', 2488069.5, -0.1574071329883954, 0.890666220858489, 0.3859132211165683, 0.02], + // AD 3000, the end of the clock's window and of Standish's fit: the Earth-Moon barycentre and + // Saturn's, 0.005 and 0.065 degrees out. Without Standish's rates for a, e and i they were 0.129 + // and 0.412, which no date between 1950 and 2100 shows (at most 0.036, Saturn in 2100). + ['earth', 2816787.5, 0.06574092668156256, 0.9022934196570718, 0.3887693148519465, 0.02], + ['saturn', 2816787.5, 8.434780522117482, 3.87565654130078, 1.235068259814154, 0.1], ['jupiter', 2433282.5, 3.406605247558555, -3.425997624196318, -1.551719750032203, 0.1], ['saturn', 2478938.5, -3.51309768447752, -8.723317933082274, -3.452662390556131, 0.25], ['pluto', 2442413.5, -29.2488165026956, -7.1421817246801, 6.58403957591589, 0.1], @@ -596,6 +601,18 @@ describe('solar-system bodies against Horizons', () => { } }); + it('turns a planet’s drawn orbit with its node, so Mars stays on its own line two thousand years out', () => { + // At AD 1 a line fixed at J2000 has Mars 3.3 million km from it, 0.5 million out of its plane. + const mars = renderer.members.find((member) => member.id === 'mars')!.marker; + const line = renderer.object.children[renderer.object.children.indexOf(mars) - 1]; + expect(line.name).toBe('orbit-line'); + for (const days of [0, -730000]) { + renderer.update(DEFAULT_EPOCH_JD + days); + const normal = new THREE.Vector3(0, 0, 1).applyQuaternion(line.quaternion); + expect(Math.abs(mars.position.clone().normalize().dot(normal))).toBeLessThan(1e-9); + } + }); + it('turns the Moon’s drawn orbit with its node, so the Moon stays on its own line', () => { // Half the node's 18.6-year turn on, the ellipse drawn at the epoch has the Moon 10 degrees off // its plane at the worst. diff --git a/src/app/shared/rendering/texture-catalog.spec.ts b/src/app/shared/rendering/texture-catalog.spec.ts index effbebf..d8436e0 100644 --- a/src/app/shared/rendering/texture-catalog.spec.ts +++ b/src/app/shared/rendering/texture-catalog.spec.ts @@ -54,6 +54,14 @@ describe('saturnRing', () => { } }); + it('is lit, and seen from either face', () => { + // An unlit ring shows no day and night; one drawn from its front face alone vanishes when Earth + // is on its south side, as on 24 September 2026. + const material = saturnRing(SATURN_RADIUS_KM, 1).material as THREE.Material; + expect(material).toBeInstanceOf(THREE.MeshStandardMaterial); + expect(material.side).toBe(THREE.DoubleSide); + }); + it('lies in the equator of a sphere built round +Y', () => { for (const { y } of radiiAndU(saturnRing(SATURN_RADIUS_KM, 1), SATURN_RADIUS_KM)) { expect(Math.abs(y)).toBeLessThan(1e-12);