本文へ移動

Hoshi Stars星

肉眼で見える星の名前・色・距離、88星座の線と境界、メシエ天体、そしてそれらを描くための7種類の図法を使えます。

「星」(ほし) は、夜空に光って見えるものです。 名前について(英語)

目次

リファレンス · 全天を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[][]

引数

名前型説明
pointsreadonly SkyPoint[]

The sky positions in degrees, in order (a closed outline repeats its first point).

optionsAllSkyOptions

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

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/hoshi-stars 0.47.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。