API Reference / skyProjector · function

Function: skyProjector()

function skyProjector(
   aimAzDeg, 
   aimAltDeg, 
   opts?): SkyProjector;

The projection math in vector mode: resolution-independent, refraction-free pure geometry, for consumers that draw (SVG chart figures, the derivation widget) rather than place pixels in an image prompt. Where skyPlacer fixes a lens and an image size, skyProjector takes a radialScale shape and a field of view, and returns normalized coordinates: magnitude 1 at hfov/2 from the aim, aspect left to the consumer. Directions can be given as (azimuth, true altitude) or as unit vectors in the local horizontal frame (x east, y north, z up), so interpolated positions project the same way as real ones. Observers modeling the apparent sky apply refractTrueToApparent to altitudes first.

Parameters

ParameterType
aimAzDegnumber
aimAltDegnumber
opts{ hfovDeg?: number; shape?: number; }
opts.hfovDeg?number
opts.shape?number

Returns

SkyProjector

Start building

Quickstart →