rotatepoint
Quaternion point rotation
Description
rotates the Cartesian points using the quaternion, rotationResult
= rotatepoint(quat
,cartesianPoints
)quat
. The
elements of the quaternion are normalized before use in the rotation.
Examples
Input Arguments
Output Arguments
Algorithms
Quaternion point rotation rotates a point specified in R3 according to a specified quaternion:
where q is the quaternion, * represents conjugation, and u is the point to rotate, specified as a quaternion.
For convenience, the rotatepoint
function takes in a point in R3 and returns a point in R3. Given a function call with
some arbitrary quaternion, q = a + bi +
cj + dk, and arbitrary coordinate, [x,y,z], for
example,
rereferencedPoint = rotatepoint(q,[x,y,z])
rotatepoint
function performs the following operations:
Converts point [x,y,z] to a quaternion:
Normalizes the quaternion, q:
Applies the rotation:
Converts the quaternion output, vq, back to R3
Extended Capabilities
Version History
Introduced in R2018a