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. |
ms | number | 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出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。