Spherical geometry backend using 3D unit-sphere coordinates.
Points are unit vectors in R^3 (shape (3,)); isometries are 3x3
rotation matrices. Use :meth:SphereModel.stereographic_projection (or
:meth:Geometry.to_euclidean) to obtain a 2D image for plotting.
SphereModel
Bases: Geometry
Spherical geometry with points on the unit 2-sphere in R^3.
stereographic_projection
classmethod
stereographic_projection(pts)
Apply stereographic projection with pole at (-1, 0, 0).
Source code in pleat/geometries/spherical.py
| @classmethod
def stereographic_projection(cls, pts):
"""Apply stereographic projection with pole at (-1, 0, 0)."""
return 2 * pts[..., 1:] / (pts[..., :1] + 1)
|