本文へ移動

Wakusei Planets惑星

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

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

目次

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

starLineSvg関数

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

A star as a line drawing, as an SVG string: its outline (squeezed when it is oblate), its cells and spots as outlines, a ring of rays, and, drawn round it, the Sun's size and the orbits of the Earth and Jupiter wherever they fall in the picture, so the size can be read against what we know. A caption under it gives the radius, the temperature and the class. It takes the options of lineSvg (the size, pose, fill, zoom, pan, lang and the colours); a picture of a star with no pose is a portrait of the Sun's axis.

インポート

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

定義

function starLineSvg(star: StarNumbers | StarLook, options?: LineOptions): string

引数

名前型説明
starStarLook | StarNumbers

The star's numbers, or a star already made with starLook.

options (省略可)LineOptions

The drawing's size, pose and colours.

戻り値

string

The SVG markup, <svg ...> to </svg>.

例

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

const svg = starLineSvg({ name: "Betelgeuse", temperatureK: 3600, radiusSun: 760, luminosityClass: "Ia" }, { size: 320 });
console.log(svg.startsWith("<svg"), svg.includes("Earth's orbit"));
true true

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

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

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