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

layoutPortraitfunction

Where every body is and how big, and the camera that holds them. A manual scene gives what it stores. An automatic one works it out (a row, an arc or a grid, a planet's moons round it in orbit order) and fits the camera, so its units are the camera's half-height.

Import it

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

Definition

function layoutPortrait(scene: Portrait): Resolved

Parameters

NameTypeDescription
scenePortrait

The scene.

Returns

Resolved

Every body placed, back to front, and the camera.

Examples

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

const { placed } = layoutPortrait(addBody(addBody(defaultPortrait(), "earth"), "moon"));
console.log(placed.map((item) => `${item.body} ${item.x.toFixed(2)}`).join(", "));
earth -0.65, moon 0.92

What it prints (run when this page was built)

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