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 · Where the Sun, Moon and planets are for a date, in two scales, with the camera maths

planetOrbitfunction

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.

Import it

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

Definition

function planetOrbit(id: SpacePlanet, ms: number, count?: number): Vec3[]

Parameters

NameTypeDescription
id"mercury" | "venus" | "mars" | "jupiter" | "saturn" | "uranus" | "neptune" | "pluto"

The planet.

msnumber

The moment the path starts at, in milliseconds since the Unix epoch.

count (optional)number

How many segments to cut the trip into.

Returns

Vec3[]

count + 1 points; the last is near the first.

Examples

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

const points = planetOrbit("jupiter", Date.UTC(2026, 10, 2), 12);
console.log(points.length);
13

What it prints (run when this page was built)

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