mindscience.e3nn.o3.compose_angles
- mindscience.e3nn.o3.compose_angles(a1, b1, c1, a2, b2, c2)[source]
Compute the Euler angles that result from composing two rotations.
Given two rotations represented by Euler angles (a1, b1, c1) and (a2, b2, c2), this function returns the Euler angles (a, b, c) of the combined rotation
\[R(a, b, c) = R(a_1, b_1, c_1) \circ R(a_2, b_2, c_2)\]Note
The second set of Euler angles 'a2, b2, c2' are applied first, while the first set of Euler angles a2, b2, c2' are applied Second. The elements of Euler angles should be one of the following types: float, float32, np.float32.
- Parameters
a1 (Union[Tensor[float32], list[float], tuple[float], ndarray[np.float32], float]) – The second applied alpha Euler angles.
b1 (Union[Tensor[float32], list[float], tuple[float], ndarray[np.float32], float]) – The second applied beta Euler angles.
c1 (Union[Tensor[float32], list[float], tuple[float], ndarray[np.float32], float]) – The second applied gamma Euler angles.
a2 (Union[Tensor[float32], list[float], tuple[float], ndarray[np.float32], float]) – The first applied alpha Euler angles.
b2 (Union[Tensor[float32], list[float], tuple[float], ndarray[np.float32], float]) – The first applied beta Euler angles.
c2 (Union[Tensor[float32], list[float], tuple[float], ndarray[np.float32], float]) – The first applied gamma Euler angles.
- Returns
tuple[Tensor]. A tuple of \(alpha\), \(beta\), \(gamma\) Tensors.
Examples
>>> from mindscience.e3nn.o3 import compose_angles >>> m = compose_angles(0.4, 0.5, 0.6, 0.7, 0.8, 0.9) >>> print(m) (Tensor(shape=[], dtype=Float32, value= 1.34227), Tensor(shape=[], dtype=Float32, value= 1.02462), Tensor(shape=[], dtype=Float32, value= 1.47115))