Brighter stars: smaller point spread, gentler contrast compression, larger points (starting values; the operator tunes by eye)

Under a full moon at the new framing every constellation-line vertex in the sky strip now carries a drawn star (was 24 of 34); a test pins it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-11-20 21:12:47 +01:00
commit 3185ea90c1
2 changed files with 26 additions and 3 deletions

View file

@ -127,3 +127,26 @@ describe('painting', () => {
expect(calls.filter((c) => c === 'arc').length).toBeGreaterThanOrEqual(nb.stars.length + 2);
});
});
describe('the stars under the figures', () => {
it('carry every constellation-line vertex in the sky strip, even under a full moon, at the app framing', async () => {
const { windowFor } = await import('./view');
const { linesAt } = await import('./starCatalogue');
const cam = windowFor(FALLBACK_VIEW, 1100, 619).camera;
const t = new Date('2026-11-25T00:00:00Z'); // full moon, high in the south
const p = makePhysicalSky('night', t, 0, FALLBACK_VIEW, sunAt(P, t));
const nb = nightBodies(p, paintSky(p, 1100, 619, cam), false);
let vertices = 0;
let carried = 0;
linesAt(t, P.lat, P.lon).forEach((chain) =>
chain.forEach((q) => {
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;
})
);
expect(vertices).toBeGreaterThan(20);
expect(carried / vertices).toBeGreaterThan(0.9);
});
});

View file

@ -18,18 +18,18 @@ 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: 4,
starPsfArcmin: 2.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.5,
starContrastExp: 0.65,
/** 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. */
starRadius: { base: 0.45, perMag: 0.17 },
starRadius: { base: 0.65, perMag: 0.22 },
/** The moon's disc, as a multiple of its true angular size (1 is true; a viewer's eye sees it larger than a lens does). */
moonScale: 1,
/** Earthshine on the unlit part of the disc, as a fraction of the lit surface's radiance. */