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 · The bodies nearest to a body on a date, in the sky or in space, and when two bodies come closest: nearest, within, closestApproach and conjunctions

NearestOptionstype

The options of nearest, within, closestApproach and conjunctions that mean the same in each.

Import it

import type { NearestOptions } from "@johnmorrisdotca/wakusei-planets/nearest";

Definition

interface NearestOptions {
    count?: number;
    within?: number;
    kind?: NearestKind | readonly NearestKind[];
    bodies?: readonly BodyId[];
    by?: "sky" | "space";
    date?: When;
    observer?: Viewpoint;
}

Members

NameTypeDescription
count (optional)number | undefined

How many to return. Default 5, or all of those inside within when within is given.

within (optional)number | undefined

Only those this close: degrees for by: "sky", kilometres for by: "space".

kind (optional)"moon" | "star" | "planet" | "dwarf-planet" | readonly ("moon" | "star" | "planet" | "dwarf-planet")[] | undefined

Only this kind of body, or any of these kinds.

bodies (optional)readonly BodyId[] | undefined

Search only these bodies. Default: every body.

by (optional)"sky" | "space" | undefined

"sky" (default): the angle between the two in the sky of the observer. "space": the distance between their centres.

date (optional)When | undefined

The moment, a Date or milliseconds since 1970 (UTC). Default: now.

observer (optional)Viewpoint | undefined

Where the sky is seen from; ignored by by: "space". Default: the Earth's centre.

Examples

import { nearest, type NearestOptions } from "@johnmorrisdotca/wakusei-planets/nearest";

const options: NearestOptions = { count: 3, kind: "planet", date: Date.UTC(2026, 10, 8) };
console.log(nearest("moon", options).map((row) => row.id).join(", "));
venus, mercury, jupiter

What it prints (run when this page was built)

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