diff --git a/src/app/features/galaxy-system/system-framing.spec.ts b/src/app/features/galaxy-system/system-framing.spec.ts index 4bd2c68..bcda348 100644 --- a/src/app/features/galaxy-system/system-framing.spec.ts +++ b/src/app/features/galaxy-system/system-framing.spec.ts @@ -18,6 +18,8 @@ import { const TRAPPIST_1 = { innermost: 0.01154, outermost: 0.06189 }; const GL_357 = { innermost: 0.035, outermost: 0.204 }; const SOLAR = { innermost: 0.387, outermost: 30.07 }; +/** The solar system as the map draws it: out to Eris's semi-major axis, 67.93 AU. */ +const SOLAR_TO_ERIS = { innermost: 0.387, outermost: 67.93 }; describe('starMarkerRadiusAu', () => { it('never reaches the innermost orbit', () => { @@ -123,14 +125,15 @@ describe('the grid and the framing together', () => { const VIEWPORTS: SystemViewport[] = [ { fovDegrees: 50, aspect: 1.78 }, { fovDegrees: 50, aspect: 1 }, - { fovDegrees: 50, aspect: 0.6 } + { fovDegrees: 50, aspect: 0.6 }, + { fovDegrees: 50, aspect: 390 / 844 } // a phone held upright ]; it('leaves the outermost ring clear of the frame edge at every scale and window shape', () => { // The whole point of framing against the grid rather than the orbits: before this, 368 of // the 371 systems in the datasets drew a grid wider than the view that was meant to hold it. for (const viewport of VIEWPORTS) { - for (const { outermost } of [TRAPPIST_1, GL_357, SOLAR, { outermost: 1 }, { outermost: 12.4 }]) { + for (const { outermost } of [TRAPPIST_1, GL_357, SOLAR, SOLAR_TO_ERIS, { outermost: 1 }, { outermost: 12.4 }]) { const { ring, frame } = fit(outermost, viewport); expect(ring).toBeLessThan(frame); expect(ring / frame).toBeLessThan(0.93); diff --git a/src/app/features/galaxy-system/system-framing.ts b/src/app/features/galaxy-system/system-framing.ts index a410df7..9395f26 100644 --- a/src/app/features/galaxy-system/system-framing.ts +++ b/src/app/features/galaxy-system/system-framing.ts @@ -61,13 +61,15 @@ const MIN_FRAMING_DISTANCE_AU = 0.06; /** * Ceiling on the framing distance, so a distant companion does not push the star to a dot. * - * Generous enough to frame the solar system out to Pluto in any window shape, which needs 120 AU - * on a landscape display and 140 on a portrait one once the camera's real field of view is - * accounted for. Only genuinely pathological systems reach it now — the handful with + * Generous enough to frame the solar system out to Eris in any window a reader holds: its grid's + * outer ring, 80 AU, needs 192 AU on a landscape display and 416 on a 390 by 844 phone once the + * camera's real field of view is accounted for, and 500 holds it down to an aspect of 0.385. At + * 200, which framed Pluto's 40 AU ring, a portrait window arrived with Eris off screen, and a + * phone with Makemake too. Only genuinely pathological systems reach it now — the handful with * directly-imaged companions hundreds of AU out — and those still arrive framed on their inner * region, with the orbit controls reaching far enough to pull back to the rest. */ -const MAX_FRAMING_DISTANCE_AU = 200; +const MAX_FRAMING_DISTANCE_AU = 500; /** Framing for a star with no known planets, where there is nothing to fit. */ const EMPTY_SYSTEM_FRAMING_DISTANCE_AU = 3;