本文へ移動

Wakusei Planets惑星

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

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

目次

リファレンス

日付ごとの太陽・月・惑星の位置を、二つの縮尺で。カメラの計算つき

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

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

エクスポート

名前種類概要
AU_IN_EARTH_RADII定数Earth radii in one astronomical unit.
blend関数A frame between two others, t from 0 to 1.
compress関数The same direction at a compressed distance from the Earth: the Moon is 10 Earth radii away, and a body k times further than the Moon is k^0.25 times as far here.
createTrack関数Answers for any moment from two real ones: at(ms) works out a frame only when ms leaves the span the last two answers cover, and then looks stepMs ahead, so playing time at a steady rate costs one pair of lookups every stepMs and every draw in between is arithmetic.
EARTH_RADIUS_KM定数The Earth's equatorial radius in kilometres (IAU), the unit of the scene's distances.
frameAt関数The state of the sky at ms: the Sun, the Moon and eight planets as seen from the Earth's centre, worked out by this package's own models in a fraction of a millisecond.
groundDirection関数The unit direction, in the scene's axes, of a longitude and latitude on the Earth as the stars see it at ms: the camera fixed to the stars looks at the same place on the ground only at that moment, and the Earth turns away under it as time runs.
MOON_COMPRESSED定数The Moon's distance in a compressed view, in Earth radii (the true one is about 60).
placeAround関数A place helio astronomical units from the Sun (a planet, or a point on its orbit), round the Sun at sun.
placeMoon関数The Moon, from the Earth's centre.
placeSun関数The Sun, from the Earth's centre: in a compressed view always 44 Earth radii away, in its real direction.
planetOrbit関数The path a planet takes round the Sun, as count + 1 points round one trip from where the planet is at ms, from the Sun, in astronomical units and the scene's axes.
radiusIn関数A body's radius in Earth radii: the real one, or one large enough to see in a compressed view.
RIDE_FOV定数The field of view, in degrees, of a camera riding along at zoom 1.
RideInput型What ridePose is asked: the camera's place from the centre of the body it goes round and its way of travel (any length), that body's radius in the unit of the place, where it looks, and the shared controls' yaw, tilt and zoom.
RideLook型Where a riding camera looks: down straight at the centre of the body it goes round (the ground goes by under the camera), or horizon tipped forward along the way it is going until the horizon is a little above the middle of the view.
ridePose関数The camera of a body-borne view: at position, looking at the body it goes round (a Moon over the Earth, a moon over Jupiter, a spacecraft over Mars: any centre, by radius), with the way it is going at the top of the picture.
RidePose型The camera ridePose works out: where it is, which way it looks, which way is up in the picture, its field of view in degrees, and how big the body looks from there (its angular radius in degrees).
ScaleMode型The scale the space view is drawn in: compressed squeezes the distances so the Moon, the Sun and Neptune fit one view, and true keeps the real ones.
SPACE_PLANETS定数The planets the space view places, nearest the Sun first (the Earth is the middle of the view).
SpaceFrame型Where everything is at one moment: positions in astronomical units from the Earth's centre, in J2000 equatorial axes with y north.
SpacePlanet型One of the planets in SPACE_PLANETS.
SpaceVec3型A position or direction as [x, y, z] in the scene's axes: J2000 equatorial, x to the vernal equinox, y north.
SUN_COMPRESSED定数The Sun's distance from the Earth in a compressed view, in Earth radii (the true one is about 23,500).
truePosition関数A place in astronomical units from the Earth's centre, at true distance, in Earth radii.

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

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