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 · Bodies as objects for your own three.js scene

orientationfunction

The north pole and the prime meridian of a body at a time, as unit vectors in the scene's axes (x to the vernal equinox, y north). A moon that keeps one face to its planet is given the direction to the planet as its meridian, so its near side faces the planet.

Import it

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

Definition

function orientation(id: BodyId, ms: number): { pole: Vec3; meridian: Vec3; }

Parameters

NameTypeDescription
idBodyId

The body's name.

msnumber

The instant, in milliseconds since 1970.

Returns

{ pole: Vec3; meridian: Vec3; }

The pole and the direction of longitude 0, both unit vectors.

Examples

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

const { pole } = orientation("mars", Date.UTC(2026, 10, 2));
console.log(pole.map((n) => n.toFixed(2)).join(", "));
0.45, 0.80, 0.41

What it prints (run when this page was built)

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