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 · /meteors

placeVectorfunction

A place as a unit vector: x to longitude 90 east on the equator, y to the north pole, z to longitude 0 on the equator (the realistic Earth's own axes).

Import it

import { placeVector } from "@johnmorrisdotca/chikyu-earth/meteors";

Definition

function placeVector(point: GeoPoint): [number, number, number]

Parameters

NameTypeDescription
pointGeoPoint

Longitude and latitude, in degrees.

Returns

[number, number, number]

The unit vector from the Earth's centre to that place.

Examples

import { placeVector } from "@johnmorrisdotca/chikyu-earth/meteors";

console.log(placeVector({ lon: 0, lat: 90 }).map((n) => Math.round(n))); // [0, 1, 0]
[ 0, 1, 0 ]

What it prints (run when this page was built)

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