inverse_rotate_vector#

Quaternion.inverse_rotate_vector(v)#

Evaluate the inverse rotation of a vector that is defined by a quaternion. It can also be the rotation of the coordinate frame with respect to the vector.

q = q0 + q’ = q0 + iq1 + jq2 + kq3 q* = q0 - q’ = q0 - iq1 - jq2 - kq3 w = q*vq

Parameters:
vtuple or List

(x, y, z) coordinates for the vector to be rotated.

Returns:
tuple

(w1, w2, w3) coordinates for the rotated vector w.

Examples

>>> from ansys.aedt.core.generic.quaternion import Quaternion
>>> q = Quaternion(0.9238795325112867, 0.0, -0.3826834323650898, 0.0)
>>> v = (1, 0, 0)
>>> q.rotate_vector(v)
(0.7071067811865475, 0.0, 0.7071067811865476)