Skip to the content

Chikyu Earth地球

A line-drawn globe of the world's countries that turns at the Earth's own rate, with an optional realistic Earth from space and markers for any place.

Chikyu is the Japanese word 地球 for the Earth. About the name

Contents

Reference · The Sun, Moon and planets: pure parts

outsidePosefunction

The camera of an outside ride: the pose ridePose works out for a camera at the satellite, moved to OUTSIDE_KM back along its own line of sight so the satellite is in front of it. Looking along the way it goes (look: "horizon") the satellite sits a little below the middle of the picture, so the camera is behind and above it; looking down (look: "down") it is at the middle, with the camera straight above it. Where the satellite sits in the picture does not change with the zoom. Which way the camera looks and which way is up are the pose's own, so the look-around is the same as from the satellite itself; the camera goes round the satellite as it looks about. Pure. Never nearer the ground than half the satellite's height.

Import it

import { outsidePose } from "@johnmorrisdotca/chikyu-earth/space";

Definition

function outsidePose(pose: RidePose, look: RideLook, low?: number): { pose: RidePose; distance: number; below: number; }

Parameters

NameTypeDescription
poseRidePose

The pose from ridePose for the camera at the satellite.

lookRideLook

The look the pose was made with.

low (optional)number | undefined

How far below the middle of the picture the satellite is, as a share of half its height (0 the middle, 1 the bottom edge); by default 0.8 looking along and 0 looking down.

Returns

{ pose: RidePose; distance: number; below: number; }

The pose moved back from the satellite, with how far the camera is from it in Earth radii and how many degrees below the middle of the picture the satellite is.

Examples

import { outsidePose, ridePose } from "@johnmorrisdotca/chikyu-earth/space";

const at = ridePose({ position: [1.066, 0, 0], velocity: [0, 0, -7.66], look: "horizon", yaw: 0, tilt: 0, zoom: 1 });
const out = outsidePose(at, "horizon");
console.log(out.distance.toFixed(4), out.below.toFixed(1), out.pose.position.map((n) => n.toFixed(4)).join(","));
0.0039 24.8 1.0693,0.0000,0.0021

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/chikyu-earth 0.51.1.