Skip to the content

Wakusei Planets惑星

The Sun, the planets and their moons as a clean line drawing, a shaded realistic drawing or a painted surface map, with real sizes, tilt and rotation, and the moons where they are at any date and time.

Wakusei is the Japanese word 惑星 for a planet. About the name

Contents

Reference

Facts, line drawings and positions

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

Exports

NameKindWhat it is
addBodyfunctionAdd a body to a scene (once), in its place in the order of the sky for an automatic layout, or at the front and to the right of the others for a manual one.
apparentfunctionHow a body looks from the Earth at a time, from its real pole, rotation and the Sun's direction.
ApparenttypeWhat the sky shows of a body at a time: its pose, the latitude the viewer sees it from (how open its rings are), the longitude at the middle of the disc, the phase and the size.
BODIESconstantEvery body's facts, by name: sizes, flattening, axial tilt, poles and rotation from the IAU and NASA.
BODY_IDSconstantEvery body's name: the Sun, the planets outward, the dwarf planets, then the moons of each.
BodyFactstypeThe facts of one body: its radius, flattening, axial tilt, pole, prime meridian, rotation, colour, rings and the features a line drawing shows.
BodyIdtypeThe name of a body: sun, a planet, a dwarf planet or a moon.
decodeScenefunctionThe scene from its text.
defaultPortraitfunctionAn empty scene with the usual settings: an automatic row, readable sizes, the stars behind, the Sun upper left.
drawnTiltfunctionThe tilt a drawing shows for a body: its obliquity, turned past 120 degrees to the other side (Venus is nearly upside down, so it is drawn nearly upright).
DWARF_IDSconstantThe dwarf planets besides Pluto, nearest the Sun first (by the size of their orbits).
DwarfIdtypeThe name of a dwarf planet besides Pluto: ceres, eris, haumea...
EMBED_KINDSconstantThe ways embedCode writes a body into a page.
embedCodefunctionThe text that puts a body in a page, for one way of making the page.
embedCreditfunctionThe credits that travel with a picture of a body: the line and illustrated looks are drawn from numbers, and realistic and painted use the surface maps.
EmbedKindtypeOne of the ways in EMBED_KINDS.
EmbedOptionstypeWhat the reader chose: the body, how it is drawn, and whether it is a portrait or the sky at a date.
EmbedSettingstypeWhere the embed code points: the package's version on jsDelivr, and the published demo, where embed.html is.
encodeScenefunctionThe scene as one short piece of text that is safe in an address: fields joined by ~, each name:value, then one body_x_y_r_spin_tilt_pitch_turn for each body, back to front.
FeaturetypeA thing a line drawing shows on a body's surface, placed by longitude and latitude in degrees (angular sizes in degrees): a circle, an oval, a band of latitude or a line.
heliocentricfunctionA planet's or dwarf planet's position in the Sun's frame (J2000 ecliptic, astronomical units) at a time: Mercury to Neptune from the VSOP87B series, and Pluto and the other dwarf planets from tables fitted to Horizons (each within a few arc-seconds or better, see the accuracy guide; outside a table's years a dwarf planet falls back to the osculating elements of one epoch from JPL's Small-Body Database).
heliocentricModelfunctionThe theory that heliocentric(planet, ms) answers with, given the tables loaded now: VSOP87B for Mercury to Neptune, a fitted Chebyshev table where one covers the moment, else osculating elements (a dwarf planet) or JPL's approximate elements (Pluto outside its table).
HostIdtypeA body a moon can go round: a planet, Pluto or another dwarf planet.
JOURNEY_STOPSconstantEvery body, in the same order as BODY_IDS: the Sun, the planets, the dwarf planets, then the moons.
journeyStopfunctionOne body's row.
JourneyStoptypeOne body, with what a trip needs.
layoutPortraitfunctionWhere every body is and how big, and the camera that holds them.
LineOptionstypeOptions for lineSvg: the size, a pose (tilt, pitch, phase, spin, a time or a pose), moons, range, fill, the language and the colours.
lineSvgfunctionA body as a line drawing, as an SVG string: the outline (squeezed by its flattening and leaning at its axial tilt), bands and features, rings with their gaps, and the dark side dashed off.
LooktypeHow a body is drawn: line (an outline drawing), realistic and painted (a real surface map; painted is the same maps), or illustrated (shaded from the numbers, not a default).
meanSunAufunctionMean distance from the Sun, in astronomical units: a planet's semi-major axis at J2000, or a dwarf planet's semi-major axis at the epoch of its elements.
mixfunctionMix two #rrggbb colours: t is how much of b (0 to 1).
moonGeocentricfunctionThe Moon's position from the Earth's centre (J2000 mean ecliptic and equinox, kilometres), from the lunar solution ELP2000-82B (Chapront-Touze and Chapront, IMCCE) cut to its 540 largest terms and run in terrestrial time: within a few arc-seconds of Horizons from 1800 to 2200.
MoonIdtypeThe name of a moon the package draws, such as moon, io or titan.
MoonPlacetypeOne moon, placed in a planet's system: in planet radii, x to the right, y up, z toward the viewer, with its distance from the planet and its phase angle.
MOONS_OFconstantThe moons the package draws, by planet or dwarf planet.
orbitPathfunctionThe path one moon follows round its planet over one trip, as the Earth sees it at time: x, y, z in planet radii, in the viewer's frame at that moment.
PlacedItemtypeA 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.
PLANET_IDSconstantThe planets and the dwarf planet Pluto, nearest the Sun first.
PlanetIdtypeThe name of a planet or of Pluto: mercury to pluto.
portraitfunctionA pose from a tilt, a pitch, a phase and a spin: the body as a portrait, with the Sun a little above the left.
PortraittypeA portrait scene: the bodies, back to front, and how they are arranged, sized, lit and drawn.
PORTRAIT_PRESETSconstantReady-made scenes to start from: a family photo of the Sun and the planets, the gas giants to scale, Jupiter and the Galileans, the Earth and the Moon to scale (size and distance), Mars and its moons at their true distance, and the inner planets round the Sun.
portraitCodefunctionThe text that puts a portrait scene in a page, for each way a page is made, as embedCode does for a single body.
PortraitEmbedtypeA scene of the portrait builder to put in a page: the scene as the builder writes it in its address, how wide the picture is, and the look to draw it in if not the scene's own.
PortraitItemtypeOne body in the scene: which body, where it is and how big, how it is turned and how fast it turns by itself.
PortraitLayouttypeWhat a layout works out for a scene: every body placed, and the camera that holds them (its centre and half-height, in the scene's units).
PortraitOptionstypeOptions for a pose when no date is given.
PortraitPresettypeA ready-made scene with its name in English and Japanese.
PosetypeThe way a body is turned toward the viewer, in the viewer's frame (x to the right, y up, z toward the viewer), as unit vectors: its north pole, the direction of longitude 0 and the Sun's direction.
RingBandtypeOne band of a ring system, in kilometres from the planet's centre: how much light it stops (alpha, 0 to 1) and how bright it is (tone, 0 dark, 1 bright).
ringReachfunctionThe ring system's outer edge in body radii, or 1 for a body with no rings.
ringStripfunctionThe strip of a body's rings, made from its ring bands: where each band is it stops light and has its tone, with fine ringlets in it and soft edges.
RingStriptypeThe strip of a body's rings: RGBA bytes width pixels across, and the inner and outer radii in body radii.
stopPlaceAufunctionWhere a body is in the Sun's frame at an instant, in astronomical units.
systemfunctionA planet and its moons as the Earth sees them at a time: each moon's place in planet radii, in the viewer's frame (x right, y up, z toward the viewer).
SystemtypeA planet's own pose and its moons as the Earth sees them at a time, nearest first.

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/wakusei-planets 0.24.0.