vector2xy#
- StereographicProjection.vector2xy(v: Vector3d) Tuple[ndarray, ndarray] [source]#
Return stereographic coordinates (X, Y) of 3D unit vectors.
- Parameters:
- v
If it is not a unit vector, it will be made into one.
- Returns:
x
Stereographic coordinate X of shape same shape as the input vector shape. Only the vectors with
z
coordinate positive (pole
= -1) or negative (pole
= 1) are returned.y
Stereographic coordinate Y of shape same shape as the input vector shape. Only the vectors with \(z\) coordinate positive (pole = -1) or negative (pole = 1) are returned.
Notes
The stereographic coordinates \((X, Y)\) are calculated from the unit vectors’ cartesian coordinates \((x, y, z)\) as
\[(X, Y) = \left(\frac{-px}{z - p}, \frac{-py}{z - p}\right),\]where \(p\) is either 1 (north pole as projection point) or -1 (south pole as projection point).