mindscience.e3nn.o3.angles_to_xyz

mindscience.e3nn.o3.angles_to_xyz(alpha, beta)[source]

Convert the two spherical angles (\((\alpha, \beta)\)) into Cartesian coordinates \((x, y, z)\) on the unit sphere.

Parameters
  • alpha (Union[Tensor[float32], list[float], tuple[float], ndarray[np.float32], float]) – The alpha Euler angles. The shape of Tensor is \((...)\).

  • beta (Union[Tensor[float32], list[float], tuple[float], ndarray[np.float32], float]) – The beta Euler angles. The shape of Tensor is \((...)\).

Returns

Tensor, the point \((x, y, z)\) on the sphere. The shape of Tensor is \((..., 3)\)

Examples
>>> import mindspore as ms
>>> from mindscience.e3nn.o3 import angles_to_xyz
>>> print(angles_to_xyz(ms.Tensor(1.7), ms.Tensor(0.0)).abs())
[0., 1., 0.]