kaolin.ops.coords

API

kaolin.ops.coords.cartesian2spherical(x, y, z)

Convert cartersian coordinates to spherical in radians.

Assuming X toward camera, Z-up and Y-right.

Parameters
Returns

azimuth, elevation, distance, of same shape and dtype than inputs.

Return type

(torch.Tensor, torch.Tensor, torch.Tensor)

kaolin.ops.coords.spherical2cartesian(azimuth, elevation, distance=None)

Convert spherical coordinates to cartesian.

Assuming X toward camera, Z-up and Y-right.

Parameters
Returns

x, y, z, of same shape and dtype than inputs.

Return type

(torch.Tensor, torch.Tensor, torch.Tensor)