From 4c1e19d63580a27e7627766abfea673074297f07 Mon Sep 17 00:00:00 2001 From: Senrokai Date: Wed, 30 Sep 2026 19:17:20 +0200 Subject: [PATCH] Give the disc sizes the framing quotes as radii, and the meta columns in the order they are stored The framing rule works in radii: at 390x844 a giant's disc may take 0.74 - 90/195 = 0.278 of the 195 px half-side, 54 px from the centre, and before e62e2fb it took half of it, 98 px. The comment and the spec called the 98 px a disc, which reads as a width, and a name 70 px from the centre would then have been off it. e62e2fb's message says "54 px wide" and "98 px wide" for the same radii: the discs are about 108 and 195 px across. The stars-meta.bin doc comment still put the photometry byte before the distance error, which f31ffe1 moved ahead of it for alignment; metaColumns, the DISTANCE_ERROR_STEPS comment and the README already had the new order. The scene's 2 883 hosts past the survey edge are all hosts past it: 2 878 are the archive's own stars and 5 are HYG's (HD 81817, HD 102272, HD 158996, HD 208527, HD 220074). Co-Authored-By: Claude Opus 5.5 (1M context) --- .../features/galaxy-system/galaxy-system-scene.component.ts | 6 +++--- src/app/features/galaxy-system/system-framing.spec.ts | 4 ++-- src/app/features/galaxy-system/system-framing.ts | 6 +++--- src/app/shared/models/star-catalog.ts | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/app/features/galaxy-system/galaxy-system-scene.component.ts b/src/app/features/galaxy-system/galaxy-system-scene.component.ts index 35f48f1..d4be335 100644 --- a/src/app/features/galaxy-system/galaxy-system-scene.component.ts +++ b/src/app/features/galaxy-system/galaxy-system-scene.component.ts @@ -761,9 +761,9 @@ export class GalaxySystemSceneComponent implements AfterViewInit, OnDestroy { publishedTemperaturesK(exoplanets), ); // Ringed, and drawn ahead of the brightness tier, only inside the survey edge. The 2 883 hosts - // the archive places past it, 916 of them beyond a kiloparsec, mostly the Kepler field's, were - // a band of 1 687 fixed-size rings over the opening view's lower right, on the 250-350 pc grid - // labels, and read as neighbours; they still compete for the budget by brightness, and search + // past it, 2 878 of them placed by the archive and 916 beyond a kiloparsec, mostly the Kepler + // field's, were a band of 1 687 fixed-size rings over the opening view's lower right, on the + // 250-350 pc grid labels, and read as neighbours; they still compete for the budget by brightness, and search // still enters them. const ringed = (star: StarRecord): boolean => this.starIdsWithBodies.has(star.id) && Math.hypot(star.x, star.y, star.z) <= SURVEY_EDGE_PC; this.hostStars = Uint8Array.from(stars, (star) => (ringed(star) ? 1 : 0)); diff --git a/src/app/features/galaxy-system/system-framing.spec.ts b/src/app/features/galaxy-system/system-framing.spec.ts index 194c12f..7955d12 100644 --- a/src/app/features/galaxy-system/system-framing.spec.ts +++ b/src/app/features/galaxy-system/system-framing.spec.ts @@ -64,8 +64,8 @@ describe('systemFramingDistanceAu', () => { }); it("keeps a giant's disc clear of its neighbours' names on a phone, which hang a fixed 78 px in from their ring", () => { - // Betelgeuse at 390x844 and at 1600x1000. Kept to half the half-side, its disc was 98 px on the - // phone, where the names come within 66 px of the centre. + // Betelgeuse at 390x844 and at 1600x1000. Kept to half the half-side, its disc was 98 px in radius + // on the phone, where the names come within 66 px of the centre. const betelgeuseAu = 2.72; for (const [width, height] of [[390, 844], [1600, 1000]]) { const viewport = { fovDegrees: 50, aspect: width / height, shorterSidePx: Math.min(width, height) }; diff --git a/src/app/features/galaxy-system/system-framing.ts b/src/app/features/galaxy-system/system-framing.ts index a26aa21..42fd8c4 100644 --- a/src/app/features/galaxy-system/system-framing.ts +++ b/src/app/features/galaxy-system/system-framing.ts @@ -65,8 +65,8 @@ const MAX_FRAMING_DISTANCE_AU = 200; * How much of the view's tighter half-extent a giant's disc may take on arrival: inside the ring * the system view names the star's neighbours on, and clear of the names hung inward from it, * whose nearest corners come within 292 px of the centre on a 1 000 px view. Framed to fill the - * frame instead, Betelgeuse settled at the three-radius closest approach with a disc of 379 px, - * past the 370 px ring, and its neighbours' names on it. + * frame instead, Betelgeuse settled at the three-radius closest approach with a disc 379 px in + * radius, past the ring 370 px out, and its neighbours' names on it. */ const STAR_FRAME_FRACTION = 0.5; /** @@ -78,7 +78,7 @@ export const NEIGHBOUR_RING_FRACTION = 0.74; * How far a neighbour's name reaches in from that ring, in pixels whatever the window: its nearest * corner measured 74 px in on a 390 px phone and 78 px on a 1 000 px view, and a margin on that. * The fraction above left the names 0.24 of the half-side, 47 px on a phone, and at 390x844 - * Betelgeuse's 98 px disc had HD 39374's name 70 px from its centre. + * Betelgeuse's disc, 98 px in radius, had HD 39374's name 70 px from its centre. */ const NAME_REACH_PX = 90; /** However small the window, the disc still takes this much of it. */ diff --git a/src/app/shared/models/star-catalog.ts b/src/app/shared/models/star-catalog.ts index 3dd5bdd..3fed759 100644 --- a/src/app/shared/models/star-catalog.ts +++ b/src/app/shared/models/star-catalog.ts @@ -27,8 +27,8 @@ export const BYTES_PER_STAR_POSITION = STAR_POSITION_COMPONENTS * Float32Array.B /** * Columns in `stars-meta.bin`, in order: catalogue id, apparent magnitude, colour index, an - * index into the spectral-type dictionary, what those were measured in (see {@link PHOTOMETRY}), - * and the distance's relative error (see {@link DISTANCE_ERROR_STEPS}). Stored column by column + * index into the spectral-type dictionary, the distance's relative error (see + * {@link DISTANCE_ERROR_STEPS}), and what those were measured in (see {@link PHOTOMETRY}). Stored column by column * rather than record by record so each one is a single typed-array view over the buffer, with no * per-record stride or alignment padding. */