Reference · Constellation lines
CultureFiguretype
One figure of a sky culture, as stars and lines: the stars of the culture's figure that the catalogue holds.
Import it
import type { CultureFigure } from "@johnmorrisdotca/hoshi-stars/lines";
Definition
interface CultureFigure {
asterism: Asterism;
stars: Star[];
segments: Array<[
Star,
Star
]>;
}
Members
| Name | Type | Description |
|---|---|---|
asterism | Asterism | The figure: its names, reading, kind and how many of its stars we do not hold ( |
stars | Star[] | The stars the figure uses, each once, in the order the figure first reaches them. |
segments | [Star, Star][] | The lines to draw, each a pair of stars, no pair twice. Empty where the figure is one star. |
Examples
import { figureOf, type CultureFigure } from "@johnmorrisdotca/hoshi-stars/lines";
import { japanese } from "@johnmorrisdotca/hoshi-stars/cultures/japanese";
const subaru: CultureFigure = figureOf("昴", japanese);
console.log(subaru.asterism.names.en, subaru.stars.length, subaru.segments.length);Subaru 6 5What it prints (run when this page was built)