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

groundDirectionfunction

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.

Import it

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

Definition

function groundDirection(lon: number, lat: number, ms: number): Vec3

Parameters

NameTypeDescription
lonnumber

Degrees east.

latnumber

Degrees north.

msnumber

The moment, in milliseconds since the Unix epoch.

Returns

Vec3

The direction from the Earth's centre.

Examples

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

const [x, y, z] = groundDirection(0, 90, Date.UTC(2026, 10, 2));
console.log(y.toFixed(2));
1.00

What it prints (run when this page was built)

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