diff --git a/src/app/features/scene/ridge/nightBodies.test.ts b/src/app/features/scene/ridge/nightBodies.test.ts index 1761270c..b189f6f0 100644 --- a/src/app/features/scene/ridge/nightBodies.test.ts +++ b/src/app/features/scene/ridge/nightBodies.test.ts @@ -143,7 +143,9 @@ describe('the stars under the figures', () => { const a = onScreen(cam, q.azimuth, q.elevation); if (a.x < 0 || a.x > 1 || a.y < 0 || a.y > 0.8) return; vertices += 1; - if (nb.stars.some((s) => Math.hypot((s.x - a.x) * 1100, (s.y - a.y) * 619) < 4)) carried += 1; + // Visible: the star's centre is at least 20 of 255 lighter than the sky behind it in some channel. + const lift = (c: string, d: string) => Math.max(...c.match(/\d+/g)!.map((v, i) => Number(v) - Number(d.match(/\d+/g)![i]))); + if (nb.stars.some((s) => Math.hypot((s.x - a.x) * 1100, (s.y - a.y) * 619) < 4 && lift(s.fill, s.cover) >= 20)) carried += 1; }) ); expect(vertices).toBeGreaterThan(20); diff --git a/src/app/features/scene/ridge/nightSky.ts b/src/app/features/scene/ridge/nightSky.ts index c1707b87..c7146fb0 100644 --- a/src/app/features/scene/ridge/nightSky.ts +++ b/src/app/features/scene/ridge/nightSky.ts @@ -18,14 +18,14 @@ export const SUN_LUX = luxOfMagnitude(SUN_V); /** The look of the night's bodies. EYEBALLED knobs: the operator tunes these by eye. */ export const NIGHT_LOOK = { /** Radius of the point spread a star's light is spread over, arcminutes: smaller is brighter and more of them saturate. */ - starPsfArcmin: 2.5, + starPsfArcmin: 1.5, /** Atmospheric extinction in magnitudes per air mass (V band, a clean low site is 0.2). */ extinctionPerAirmass: 0.2, /** * Display contrast of a star over its sky is the physical contrast to this power (1 = physical): the eye and a camera cannot show a * mag 0 star at the 1e4:1 it has over a dark sky. Brightest stars still saturate; the faintest keep a little. */ - starContrastExp: 0.65, + starContrastExp: 0.8, /** The same for the moon's disc (physical contrast is 1e7 and more). */ moonContrastExp: 0.3, /** Visible radius of a star, CSS px: `base` for the faintest, plus `perMag` for each magnitude brighter than 5.5. */