Documentation / @interstellar-tools/maps / orthographic
Function: orthographic()
ts
function orthographic(
phi: Radians,
lambda: Radians,
R: number,
options?: AzimuthalOptionsInterface
): ProjectedPointInterface;Defined in: projections/orthographic.ts:58
Project a point on a sphere with the orthographic projection: the globe as it looks from infinitely far away, above the map's centre.
Where:
and are the point's latitude and longitude (rad) and are the map's centre (rad) is the sphere's radius (m)
Units
- Inputs: angles in radians,
Rin m. - Output:
{ x, y }in m.
Notes
- The near hemisphere fills a disc of radius
: a point at angular distance from the centre is from it, in its true direction. It keeps neither areas nor angles; shapes are squashed towards the edge, as on a photograph of a planet. - Only the near hemisphere can be shown. A point on the far side, with
, throws a RangeError; to draw a globe, skip the points whereis negative. Points on the horizon, , are shown, allowing for rounding.
Parameters
| Parameter | Type | Description |
|---|---|---|
phi | Radians | Latitude |
lambda | Radians | Longitude |
R | number | Radius |
options? | AzimuthalOptionsInterface | phi0 and lambda0, the map's centre (radians, both default to 0). |
Returns
The point on the map, { x, y } in m.
Throws
- If any input is not a finite number.
- If
phiorphi0is outside [−π/2, π/2],R <= 0, or the point is on the far side.
Example
ts
// Mars seen from far above 0° N, 0° E: a point at 30° N, 60° E
orthographic(toRad(30), toRad(60), 3_389_500);
// ≈ { x: 2 542 125, y: 1 694 750 } mSee
- inverseOrthographic
- lambertAzimuthalEqualArea
- stereographic
- https://doi.org/10.3133/pp1395 Snyder (1987), Map projections: a working manual, ch. 20