本文へ移動

Wakusei Planets惑星

太陽・惑星・衛星を、線画、陰影つきの絵、表面の地図で描きます。実際の大きさ・傾き・自転つきで、任意の日時の衛星の位置も分かります。

「惑星」(わくせい) は、太陽のまわりを回る大きな星のことです。 名前について(英語)

目次

リファレンス · データ・線画・位置

PlacedItem型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

A body of a scene as the layout puts it: its place and size now (stored, or worked out by an automatic layout), and how far its picture reaches past the disc.

インポート

import type { PlacedItem } from "@johnmorrisdotca/wakusei-planets";

定義

interface Placed extends Item {
    index: number;
    reach: number;
}

メンバー

名前型説明
indexnumber
reachnumber

How far the picture of the body reaches from its centre (rings, the Sun's glow), in scene units.

bodyBodyId
xnumber
ynumber
rnumber

The radius, in scene units.

spinnumber

The longitude at the middle of the disc, degrees east (with a date: turned this much from the real one).

tilt (省略可)number | undefined

The pole's lean on the page, degrees; the body's own tilt when left out.

pitch (省略可)number | undefined

How far the viewer looks over the pole, degrees; the usual for the body when left out.

turnnumber

Degrees a second it turns by itself, eastward.

例

import { addBody, defaultPortrait, layoutPortrait, type PlacedItem } from "@johnmorrisdotca/wakusei-planets";

const placed: PlacedItem[] = layoutPortrait(addBody(defaultPortrait(), "saturn")).placed;
console.log(placed[0]?.reach, placed[0]?.r);
0.8417508417508418 0.3477788484205139

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

ソースを見るGitHub で編集@johnmorrisdotca/wakusei-planets 0.24.0 のソースから作成しました。

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