本文へ移動

Wakusei Planets惑星

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

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

目次

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

StarNumbers型

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

The numbers a star is drawn from. Only the temperature and the radius are needed; the rest has a stated default.

インポート

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

定義

interface StarNumbers {
    name?: string;
    temperatureK: number;
    radiusSun: number;
    luminosityClass?: LuminosityClass;
    rotationDays?: number;
    activity?: number;
    oblateness?: number;
    corona?: number;
    estimated?: readonly StarNumberName[];
}

メンバー

名前型説明
name (省略可)string | undefined

What to call it: the picture's label. Default Star.

temperatureKnumber

The effective surface temperature in kelvin, 1,000 to 200,000. It sets the colour.

radiusSunnumber

The radius in solar radii (the Sun is 1), above 0 and up to 5,000. It sets the size beside the Sun and the size of the rings drawn round the star.

luminosityClass (省略可)"0" | "Ia" | "Iab" | "Ib" | "II" | "III" | "IV" | "V" | "VI" | "D" | undefined

The luminosity class: it sets how coarse the surface is (fine cells on a dwarf, a few giant cells on a supergiant, none on a white dwarf). Default V.

rotationDays (省略可)number | undefined

Days for one turn at the equator, negative when it turns backwards. Left out, a slow turn is drawn and the picture says the rotation is not given.

activity (省略可)number | undefined

How spotted it is, 0 to 1. Left out it follows the temperature and the class: none on hot stars, many on cool dwarfs and red dwarfs, few and large on giants. The spots are illustrative either way.

oblateness (省略可)number | undefined

(equatorial radius - polar radius) / equatorial radius, 0 to 0.4. A fast spinner such as Altair is about 0.2. The star is drawn squashed, with the poles hotter than the equator (gravity darkening). Default 0.

corona (省略可)number | undefined

The strength of the soft glow round the star, 0 to 1. Default 0.8.

estimated (省略可)readonly StarNumberName[] | undefined

The numbers above that are estimates, not measurements (a radius worked out from brightness, say). The picture says so.

例

import { starLook, type StarNumbers } from "@johnmorrisdotca/wakusei-planets";

const betelgeuse: StarNumbers = { name: "Betelgeuse", temperatureK: 3600, radiusSun: 760, luminosityClass: "Ia", rotationDays: 2100 };
console.log(starLook(betelgeuse).colour);
#ffc392

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

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

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