本文へ移動

Chikyu Earth地球

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

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

目次

リファレンス · 太陽、月、惑星: 計算部分

aboveAxes関数

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

The camera of the view above a satellite: where it stands from the satellite (a unit vector, to be multiplied by the height) and the way its picture's top points. With no turn and no tip the camera is straight above the satellite, looking straight down at it, the way the satellite is going at the top of the picture. yaw turns the picture about the satellite (the top points the other way round the satellite); tilt tips the camera back (positive) or ahead of the satellite (negative), so it looks down at it from behind or in front.

インポート

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

定義

function aboveAxes(position: Vec3, velocity: Vec3, yaw: number, tilt: number): { offset: Vec3; up: Vec3; }

引数

名前型説明
positionVec3

The satellite's place from the Earth's centre.

velocityVec3

Its velocity.

yawnumber

The turn of the picture about the satellite, in radians.

tiltnumber

How far the camera is tipped back from straight above, in radians.

戻り値

{ offset: Vec3; up: Vec3; }

The unit offset of the camera from the satellite, and the unit vector at the top of its picture.

例

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

const view = aboveAxes([1.07, 0, 0], [0, 0, 1], 0, 0);
console.log(view.offset, view.up);
[ 1, 0, 0 ] [ 0, 0, 1 ]

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

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

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