pytransform3d.coordinates.spherical_from_cartesian#

pytransform3d.coordinates.spherical_from_cartesian(p)[source]#

Convert Cartesian coordinates to spherical coordinates.

Parameters:
parray-like, shape (…, 3)

Cartesian coordinates (x, y, z)

Returns:
qarray, shape (…, 3)

Spherical coordinates: radial distance (rho >= 0), inclination / elevation (0 <= theta <= pi), and azimuth (-pi <= phi <= pi)