リファレンス · 88星座それぞれの絵 (明るい版と暗い版)
paddedOutline関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
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 { paddedOutline } from "@johnmorrisdotca/hoshi-stars/thumbnails";
定義
function paddedOutline(points: readonly SkyPoint[], padDegrees?: number): SkyPoint[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
points | readonly SkyPoint[] | The positions of the stars (degrees, J2000). At least one. |
padDegrees (省略可) | 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. |
戻り値
SkyPoint[]
One closed ring (the first position repeated as the last), ready for ThumbnailInput.outlines.
例
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 true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。