v3d.math.carthesian_to_spherical#
- visu3d.math.carthesian_to_spherical(point3d: etils.enp.array_types.typing.FloatArray, *, xnp: Any = Ellipsis) visu3d.math.coord_utils._SphericalCoords [source]#
Convert (x, y, z) to (r, theta, phi).
Follow https://mathworld.wolfram.com/SphericalCoordinates.html conventions.
- Parameters:
point3d – 3d carthesian coordinates
xnp – Numpy module
- Returns:
radial theta: azimuth / longitude in range (0, tau) elevation: polar / elevation / colatitude in range (0, tau/2)
- Return type:
r