Reference · Constellation boundaries and which constellation a point is in
Boundarytype
The boundary of one constellation, as lines to draw.
Import it
import type { Boundary } from "@johnmorrisdotca/hoshi-stars/boundaries";
Definition
interface Boundary {
constellation: Constellation;
outlines: Array<Array<{
rightAscension: number;
declination: number;
}>>;
}
Members
| Name | Type | Description |
|---|---|---|
constellation | Constellation | The constellation the boundary encloses. |
outlines | { rightAscension: number; declination: number; }[][] | The closed outlines, each a list of points (degrees, J2000) with the first point repeated as the last. Most constellations have one; Serpens has two, its head and its tail. |
Examples
import { boundaryOf, type Boundary } from "@johnmorrisdotca/hoshi-stars/boundaries";
const crux: Boundary = boundaryOf("Cru");
console.log(crux.constellation.name, crux.outlines.length, crux.outlines[0]!.length);Crux 1 35What it prints (run when this page was built)