Skip to content

Commit

Permalink
Explain quaternion operations
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderFabisch committed Oct 6, 2024
1 parent 74c7a2a commit b212747
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions doc/source/user_guide/rotations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,21 @@ functions :func:`~pytransform3d.rotations.quaternion_wxyz_from_xyzw` and
This must be considered during operations like interpolation, distance
calculation, or (approximate) equality checks.

The quaternion product
(:func:`~pytransform3d.rotations.concatenate_quaternions`) can be used to
concatenate rotations like the matrix product can be used to concatenate
rotations represented by rotation matrices.

The inverse of the rotation represented by the unit quaternion
:math:`\boldsymbol{q}` is represented by the conjugate
:math:`\boldsymbol{q}^*` (:func:`~pytransform3d.rotations.q_conj`).

We can rotate a vector by representing it as a pure quaternion (i.e., with
a scalar part of 0) and then left-multiplying the quaternion and
right-multiplying its conjugate
:math:`\boldsymbol{q}\boldsymbol{v}\boldsymbol{q}^*`
with the quaternion product (:func:`~pytransform3d.rotations.q_prod_vector`).

**Pros**

* More compact than the matrix representation and less susceptible to
Expand Down

0 comments on commit b212747

Please sign in to comment.