本文へ移動

Chikyu Earth地球

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

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

目次

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

orbitPath関数

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

The path a planet takes round the Sun, as count points around the orbit that starts where the planet is at ms, relative to the Sun (scene axes, AU).

インポート

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

定義

function orbitPath(name: PlanetName, ms: number, count?: number): Vec3[]

引数

名前型説明
name"Mercury" | "Venus" | "Mars" | "Jupiter" | "Saturn" | "Uranus" | "Neptune" | "Pluto"

The planet.

msnumber

The moment the orbit starts at, in milliseconds since the Unix epoch.

count (省略可)number

How many segments to cut the orbit into.

戻り値

Vec3[]

count + 1 points, the last on the first.

例

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

const points = orbitPath("Jupiter", Date.UTC(2026, 10, 2), 12);
console.log(points.length);
13

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

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

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