mindsponge.common.rigids_mul_vecs

mindsponge.common.rigids_mul_vecs(rigids, v)[source]

Transform vector \(\vec v\) to rigid’ local coordinate system.

Multiply vector \(\vec v\) and the rotations of rigid together and add the translations of rigid. The result is the output vector.

\[v = r_rv+r_t\]
Parameters
  • rigids (tuple) – rigid.

  • v (tuple) – vector \(\vec v\) , length is 3. Data type is constant or Tensor with same shape.

Returns

tuple, changed vector, length is 3. Data type is constant or Tensor with same shape.

Supported Platforms:

Ascend GPU

Examples

>>> import mindsponge
>>> a = ((1, 2, 3, 4, 5, 6, 7, 8, 9), (3, 4, 5))
>>> b = (1, 2, 3)
>>> b1 = mindsponge.common.rigids_mul_vecs(a,b)
>>> print(b1)
(17, 36, 55)