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

Portraittype

A portrait scene: the bodies, back to front, and how they are arranged, sized, lit and drawn. Plain data: keep it, change it by making a new one, and encodeScene it for an address.

Import it

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

Definition

interface Portrait {
    items: Item[];
    layout: "auto" | "manual";
    arrange: Arrange;
    scale: ScaleMode;
    moons: "auto" | "manual";
    look: Look;
    bg: Background;
    aspect: number;
    light: {
        az: number;
        el: number;
    };
    labels: boolean;
    orbits: boolean;
    shadows: boolean;
    date: string | undefined;
    camera: {
        x: number;
        y: number;
        h: number;
    };
}

Members

NameTypeDescription
itemsItem[]

Back to front.

layout"auto" | "manual"

auto: the layout places and sizes every body. manual: the positions and sizes below are used as they are.

arrangeArrange
scaleScaleMode
moons"auto" | "manual"

auto: a planet's moons that are in the scene go round it in orbit order. manual: each body is placed by itself.

lookLook
bgBackground
aspectnumber

Width over height.

light{ az: number; el: number; }

Where the Sun is: az clockwise from the top of the picture, el toward the viewer (0 along the page, 90 straight at it), degrees.

labelsboolean
orbitsboolean
shadowsboolean
datestring | undefined

The body as the Earth sees it on this date (ISO), or undefined for a portrait.

camera{ x: number; y: number; h: number; }

The view in a manual layout: the centre and the half-height, in scene units. An automatic layout always fits.

Examples

import { addBody, defaultPortrait, type Portrait } from "@johnmorrisdotca/wakusei-planets";

const scene: Portrait = addBody(addBody(defaultPortrait(), "jupiter"), "io");
console.log(scene.items.length, scene.layout, scene.scale);
2 auto readable

What it prints (run when this page was built)

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