Reference · Where the Sun, Moon and planets are for a date, in two scales, with the camera maths
truePositionfunction
A place in astronomical units from the Earth's centre, at true distance, in Earth radii.
Import it
import { truePosition } from "@johnmorrisdotca/wakusei-planets/space";
Definition
function truePosition(v: Vec3): Vec3
Parameters
| Name | Type | Description |
|---|---|---|
v | Vec3 | The place, in astronomical units. |
Returns
Vec3
The same direction, in Earth radii.
Examples
import { truePosition } from "@johnmorrisdotca/wakusei-planets/space";
console.log(truePosition([0.00257, 0, 0]).map(Math.round));[ 60, 0, 0 ]What it prints (run when this page was built)