本文へ移動

Chikyu Earth地球

世界の国の輪郭を線で描いた地球儀です。地球と同じ速さで回ります。宇宙から見たような地球と、好きな場所の目印も使えます。

「地球」(ちきゅう) は、私たちが住む星の名前です。 名前について(英語)

目次

リファレンス · /meteors

streakPath関数

リファレンスの説明と例は英語です。見出しと目次は日本語です。

Where one streak runs: from start to end, in Earth radii from the centre, in the Earth's own axes. It ends METEOR_HEIGHT_KM.bottom + 5 km up and comes down the line from the radiant; its true length is the drop in height divided by the sine of the radiant's height, at most 260 km, and stretch (1 or more) lengthens it for the eye.

インポート

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

定義

function streakPath(place: readonly [number, number, number], radiant: readonly [number, number, number], stretch?: number): { start: Vec3; end: Vec3; km: number; }

引数

名前型説明
placereadonly [number, number, number]

The unit vector of the place it ends over.

radiantreadonly [number, number, number]

The unit vector towards the radiant (it must stand above that place's horizon).

stretch (省略可)number

How many times longer than true to draw it; 1 is true.

戻り値

{ start: Vec3; end: Vec3; km: number; }

The two ends, and the true length in kilometres.

例

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

const place = placeVector({ lon: 0, lat: 0 });
// Straight down from overhead: it falls 25 km, from 110 km up to 85 km.
const path = streakPath(place, place, 1);
console.log(path.km.toFixed(0), ((Math.hypot(...path.start) - 1) * 6371).toFixed(0)); // "25" "110"
25 110

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/chikyu-earth 0.51.1 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。