import { type Vec3 } from "./ephemeris.ts"; /** * The scale the space view is drawn in: `compressed` squeezes the distances so the Moon, the Sun and Neptune fit one view, and `true` keeps the real ones. * * @example * ```ts * import { placeMoon, type ScaleMode } from "@johnmorrisdotca/chikyu-earth/space"; * * const mode: ScaleMode = "compressed"; * console.log(placeMoon(mode, [0.00257, 0, 0])); * ``` */ export type ScaleMode = "compressed" | "true"; /** * The Moon's distance in a compressed view, in Earth radii (the true one is about 60). * * @example * ```ts * import { MOON_COMPRESSED } from "@johnmorrisdotca/chikyu-earth/space"; * * console.log(MOON_COMPRESSED); * ``` */ export declare const MOON_COMPRESSED = 10; /** * The Sun's distance from the Earth in a compressed view, in Earth radii (the true one is about 23,500). One astronomical unit is this long there. * * @example * ```ts * import { SUN_COMPRESSED } from "@johnmorrisdotca/chikyu-earth/space"; * * console.log(SUN_COMPRESSED); * ``` */ export declare const SUN_COMPRESSED = 44; /** * A place in astronomical units from the Earth's centre, at true distance, in Earth radii. * * @param v - The place, in astronomical units. * @returns The same direction, in Earth radii. * * @example * ```ts * import { truePosition } from "@johnmorrisdotca/chikyu-earth/space"; * * console.log(truePosition([0.00257, 0, 0]).map(Math.round)); * ``` */ export declare const truePosition: (v: Vec3) => Vec3; /** * The same direction at a compressed distance from the Earth: the Moon is 10 Earth radii away, and a body k times further than the Moon is k^0.25 times as far here. * * @param v - The place, in astronomical units from the Earth's centre. * @returns The place in Earth radii, compressed; the centre stays at the centre. * * @example * ```ts * import { compress } from "@johnmorrisdotca/chikyu-earth/space"; * * console.log(compress([0.00257, 0, 0]), compress([0, 0, 0])); * ``` */ export declare function compress(v: Vec3): Vec3; /** * The Moon, from the Earth's centre. * * @param mode - The scale. * @param geo - The Moon's place in astronomical units from the Earth's centre. * @returns Where to draw it, in Earth radii. * * @example * ```ts * import { placeMoon } from "@johnmorrisdotca/chikyu-earth/space"; * * console.log(placeMoon("true", [0.00257, 0, 0]).map(Math.round)); * ``` */ export declare const placeMoon: (mode: ScaleMode, geo: Vec3) => Vec3; /** * The Sun, from the Earth's centre: in a compressed view always 44 Earth radii away, in its real direction. * * @param mode - The scale. * @param geo - The Sun's place in astronomical units from the Earth's centre. * @returns Where to draw it, in Earth radii. * * @example * ```ts * import { placeSun } from "@johnmorrisdotca/chikyu-earth/space"; * * console.log(placeSun("compressed", [1, 0, 0])); * ``` */ export declare function placeSun(mode: ScaleMode, geo: Vec3): Vec3; /** * A place `helio` astronomical units from the Sun (a planet, or a point on its orbit), round the Sun at `sun`. True: as it is. Compressed: the same direction from * the Sun, at 44 Earth radii times its distance in astronomical units to the power 0.45, so the Earth's own orbit is the 44 and Neptune's is about 200 (30 times as far, really). * * @param mode - The scale. * @param sun - Where the Sun is drawn, in Earth radii. * @param helio - The place in astronomical units from the Sun. * @returns Where to draw the place, in Earth radii from the Earth's centre. * * @example * ```ts * import { placeAround } from "@johnmorrisdotca/chikyu-earth/space"; * * console.log(placeAround("compressed", [44, 0, 0], [1, 0, 0])); * ``` */ export declare function placeAround(mode: ScaleMode, sun: Vec3, helio: Vec3): Vec3; /** * Radii in Earth radii: the real ones, and ones large enough to see in a compressed view. * * @example * ```ts * import { RADIUS } from "@johnmorrisdotca/chikyu-earth/space"; * * console.log(RADIUS["Moon"]); * ``` */ export declare const RADIUS: Record;