spheres.coordinates.c_xyz

spheres.coordinates.c_xyz(c, pole='south')[source]

Stereographic projection from the extended complex plane to the unit sphere. Given coordinate \(c=x+iy\) or \(\infty\):

If \(c = \infty\), returns \((0,0,-1)\).
Otherwise, returns \((\frac{2x}{1+x^2+y^2}, \frac{2y}{1+x^2+y^2}, \frac{1-x^2-y^2}{1+x^2+y^2})\).
Parameters
  • c (complex/inf or list/np.ndarray) – Point(s) on the extended complex plane.

  • pole (str, default 'south') – Whether to project from the North or South pole.

Returns

Cartesian coordinates of point(s) on unit sphere.

Return type

np.ndarray