Reference · A picture of each of the 88 constellations, in light and dark
paddedOutlinefunction
A soft outline round some stars: their convex hull grown by a margin with rounded corners, as a closed ring of positions. It is what a figure with no official boundary is drawn with, in the same dashed line and wash as the boundary of a constellation. Only the 88 constellations have official boundaries; this outline is a drawing aid, not a border.
Import it
import { paddedOutline } from "@johnmorrisdotca/hoshi-stars/thumbnails";
Definition
function paddedOutline(points: readonly SkyPoint[], padDegrees?: number): SkyPoint[]
Parameters
| Name | Type | Description |
|---|---|---|
points | readonly SkyPoint[] | The positions of the stars (degrees, J2000). At least one. |
padDegrees (optional) | number | undefined | How far the outline stands off the stars. Left out, 0.8 degree or 8 per cent of the figure's width, whichever is more. |
Returns
SkyPoint[]
One closed ring (the first position repeated as the last), ready for ThumbnailInput.outlines.
Examples
import { figureOf } from "@johnmorrisdotca/hoshi-stars/lines";
import { paddedOutline } from "@johnmorrisdotca/hoshi-stars/thumbnails";
import { chinese } from "@johnmorrisdotca/hoshi-stars/cultures/chinese";
const ring = paddedOutline(figureOf("北斗", chinese).stars);
console.log(ring.length > 8, ring[0]!.rightAscension === ring[ring.length - 1]!.rightAscension);true trueWhat it prints (run when this page was built)