mindsponge.common.rigids_mul_rots

View Source On Gitee
mindsponge.common.rigids_mul_rots(x, y)[source]

Numpy version of getting results rigid \(x\) multiply rotations \(\vec y\) .

Multiply rotations of rigid \(x[0]\) with rotations \(\vec y\), the result is rigids new rotations. Translations of rigid will not changed.

\[(r, t) = (x_ry, x_t)\]
Parameters
  • x (tuple) – rigid \(x\) . Length is 2. Include rots \(x_r = (xx, xy, xz, yx, yy, yz, zx, zy, zz)\) and trans \(x_t = (x, y, z)\) . Data type is constant or Tensor with same shape.

  • y (tuple) – rotations \(\vec y\) , length is 9. Data type is constant or Tensor with same shape.

Returns

tuple(rots, trans), length is 2, rigid whose rotations are changed.

Supported Platforms:

Ascend GPU

Examples

>>> import mindsponge
>>> a = ((1, 2, 3, 4, 5, 6, 7, 8, 9), (3, 4, 5))
>>> b = (2, 3, 4, 1, 5, 6, 3, 8, 7)
>>> b1 = mindsponge.common.rigids_mul_rots(a,b)
>>> print(b1)
((13, 37, 37, 31, 85, 88, 49, 133, 139), (3, 4, 5))