SkyFromViewpointtype
Where a sky is seen from: a bright star, a nearby star (from /nearby), a name starByName finds, or a point { x, y, z } in parsecs on the J2000 equatorial axes with the Sun at the origin (x toward right ascension 0, z toward the north pole). A star must have a distance (a parallax above 0).
Import it
import type { SkyFromViewpoint } from "@johnmorrisdotca/hoshi-stars/sky-from";
Definition
type SkyFromViewpoint = Star | NearbyStar | string | {
x: number;
y: number;
z: number;
};
Examples
import { skyFrom, type SkyFromViewpoint } from "@johnmorrisdotca/hoshi-stars/sky-from";
const viewpoint: SkyFromViewpoint = "Rigil Kentaurus";
console.log(skyFrom(viewpoint, { magnitude: 1 }).length);15What it prints (run when this page was built)