xy2vector#

InverseStereographicProjection.xy2vector(x: float | ndarray, y: float | ndarray) Vector3d[source]#

Return 3D unit vectors from stereographic coordinates (X, Y).

Parameters:
x

X coordinates.

y

Y coordinates.

Returns:
vector

Unit vectors corresponding to the stereographic coordinates. Whether the upper or lower hemisphere points are returned is controlled by pole (-1 = upper, 1 = lower).

Notes

The 3D unit vectors \((x, y, z)\) are calculated from the stereographic coordinates \((X, Y)\) as

\[(x, y, z) = \left( \frac{2x}{1 + x^2 + y^2}, \frac{2y}{1 + x^2 + y^2}, \frac{-p(1 - x^2 - y^2)}{1 + x^2 + y^2} \right),\]

where \(p\) is either 1 (north pole as projection point) or -1 (south pole as projection point).