$LastChangedDate: 27-Juil-2011 $

# CL_rot_rotVect

Image of vector by a rotation defined by a quaternion

## Calling Sequence

       w = CL_rot_rotVect(q,v)

## Description

- Computes the image of a vector by a rotation defined by a quaternion.

- Notes:

  - The quaternion should have a norm equal to 1 (not checked).

  - See Conventions or CL_rot_defQuat for more details on quaternions.

## Parameters

q :

  Quaternion (that defines the rotation) (dim N or dim 1)

v :

  Vector (3xN or 3x1)

w :

  Rotated vector (3xN)

## Authors

- CNES - DCT/SB

## See also

- CL_rot_defQuat

- CL_rot_matrix2quat

- CL_rot_quat2matrix

## Examples

    q = CL_rot_eul2quat(0, 0, %pi/6) // rotation around Z
    v = [1; 0; 0] // some vector
    M = CL_rot_quat2matrix(q) // corresponding matrix
    w = CL_rot_rotVect(q, v) // rotated vector
    w = M' * v // same

    // Same with 2 quaternions
    q2 = [q, q]
    M2 = CL_rot_quat2matrix(q2) // corresponding matrix
    w = CL_rot_rotVect(q2, v) // rotated vector
    w = M2' * v // same

    // Same with 2 vectors
    v2 = [v, v]
    w = CL_rot_rotVect(q, v2) // rotated vector
    w = M' * v2 // same