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

ridePosefunction

The camera of a body-borne view: at position, looking at the body it goes round (a Moon over the Earth, a moon over Jupiter, a spacecraft over Mars: any centre, by radius), with the way it is going at the top of the picture. look: "horizon" tips it forward until the horizon is a little above the middle. A drag looks about from there, as a head on a pivot does: yaw turns the camera to its left and tilt tips it towards the bottom of its picture, so the ground follows the pointer (right for a drag right, up for a drag up); the angle for each pixel of the drag is the field of view's, so the pace is the same at any zoom. zoom narrows the field of view.

Import it

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

Definition

function ridePose(input: RideInput): RidePose

Parameters

NameTypeDescription
inputRideInput

The camera's place, its way of travel, the radius of what it goes round, the look, and the shared controls' yaw, tilt and zoom.

Returns

RidePose

The camera's place, forward and up directions (unit vectors), its field of view, and the body's angular radius from there.

Examples

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

const pose = ridePose({ position: [1.066, 0, 0], velocity: [0, 0, -7.66], radius: 1, look: "down", yaw: 0, tilt: 0, zoom: 1 });
console.log(pose.forward.map((n) => n.toFixed(2)).join(","), pose.bodyRadiusDegrees.toFixed(0));
-1.00,0.00,0.00 70

What it prints (run when this page was built)

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