リファレンス · 全天を1枚の横長 (2対1) の地図に (銀河座標か赤道座標、モルワイデ・ハンマー・正距円筒図法。継ぎ目で線をきれいに切る)
allSkyLine関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A line on the sky (a figure's segment, a boundary, a meridian) as runs of points of the picture. The line follows great circles between your points, cut every step degrees so a curve
stays smooth, and a line that crosses the seam (the edge, half a turn from the centre) is cut there into two runs that end ON the edge, one at each side, so nothing is drawn across the picture.
インポート
import { allSkyLine } from "@johnmorrisdotca/hoshi-stars/all-sky";
定義
function allSkyLine(points: readonly SkyPoint[], options: AllSkyOptions, step?: number): AllSkyPoint[][]
引数
| 名前 | 型 | 説明 |
|---|---|---|
points | readonly SkyPoint[] | The sky positions in degrees, in order (a closed outline repeats its first point). |
options | AllSkyOptions | The picture. |
step (省略可) | number | The longest piece between two points of a run, in degrees; 2 by default. |
戻り値
AllSkyPoint[][]
One run for a line that stays on its side of the seam, more where it crosses; each has at least two points.
例
import { allSkyLine } from "@johnmorrisdotca/hoshi-stars/all-sky";
// Two points either side of the galactic anticentre: the line is cut at the edge
const runs = allSkyLine([{ rightAscension: 84, declination: 30 }, { rightAscension: 100, declination: 30 }], { width: 1000, centre: 0 });
console.log(runs.length);2出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。