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

StarLooktype

A star ready to draw: its numbers with the defaults filled in, its colour, the shaded look and the facts the line drawing uses, how fast it turns on a page, and which parts of the picture are known and which invented.

Import it

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

Definition

interface StarLook {
    numbers: StarNumbers;
    name: string;
    temperatureK: number;
    radiusSun: number;
    radiusKm: number;
    quality: "full" | "low";
    luminosityClass: LuminosityClass;
    rotationDays: number | undefined;
    activity: number;
    oblateness: number;
    corona: number;
    colour: string;
    tone: string;
    look: BodyLook;
    facts: BodyFacts;
    turn: {
        degreesPerSecond: number;
        speedUp: number | undefined;
    };
    parts: readonly StarPart[];
    disclaimer: {
        en: string;
        ja: string;
    };
    key: string;
}

Members

NameTypeDescription
numbersStarNumbers

The numbers it was made from, as they were given.

namestring
temperatureKnumber
radiusSunnumber
radiusKmnumber
quality"full" | "low"

Which drawing this is: full or low (see StarLookOptions).

luminosityClass"0" | "Ia" | "Iab" | "Ib" | "II" | "III" | "IV" | "V" | "VI" | "D"
rotationDaysnumber | undefined

undefined when the numbers gave none.

activitynumber
oblatenessnumber
coronanumber
colourstring

The black-body colour of the temperature, #rrggbb.

tonestring

The colour the line drawing and a page's accents take: the bright cells of the shaded look, a little stronger than the plain black body so a star reads as coloured, #rrggbb.

lookBodyLook

The shaded look: its surface is shader code with the numbers written into it. Its id is sun, the one star among the bodies. Draw it through the element's star attribute; it is not registered under a body.

factsBodyFacts

The facts the line drawing uses: the Sun's, with this star's name, size, shape and the outlines of its cells and spots.

turn{ degreesPerSecond: number; speedUp: number | undefined; }

How it turns on a page: degrees a second (negative for backwards), and how many times faster than the star really turns that is (undefined when its rotation is not given).

partsreadonly StarPart[]

Which parts of the picture are measured, estimated, derived or illustrative.

disclaimer{ en: string; ja: string; }

The sentence for a page to show with the picture.

keystring

The same numbers give the same key: the renderer keeps one drawing for each.

Examples

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

const star = starLook({ name: "Sirius A", temperatureK: 9940, radiusSun: 1.71, luminosityClass: "V", rotationDays: 5.5 });
console.log(star.colour, star.disclaimer.en);
#cadaff Sirius A: drawn from its numbers, not a photo.

What it prints (run when this page was built)

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