Quaternions and Transform Matrices

Tell me if I am wrong.

I'm starting using quaternions. Using a rotation matrix 4 x 4 (as used in OpenGL), I can compute model view matrix multiplying the current model view with a rotation matrix. The rotation matrix is derived from the quaternion.

The quaternion is a direction vector (even not normalized) and a rotation angle. Resulted rotation is dependent on the direction vector module and the w quaternion component.

But why I should use quaternions instead of Euler axis/angle notation? The latter is simpler to visualize and to manage...

All information that I found could be synthetized with this beatifull article:

http://en.wikipedia.org/wiki/Rotation_representation


Why it is better to use quaternions is explained in the article.

  • More compact than the DCM representation and less susceptible to round-off errors
  • The quaternion elements vary continuously over the unit sphere in R4, (denoted by S3) as the orientation changes, avoiding discontinuous jumps (inherent to three-dimensional parameterizations), this is often referred to as gimbal lock.
  • Expression of the DCM in terms of quaternion parameters involves no trigonometric functions
  • It is simple to combine two individual rotations represented as quaternions using a quaternion product

  • 与欧拉角不同,四元数不会受到万向节锁定的影响。


    Quaternions are generally used for calculative simplicity - it's a lot easier (and faster) to do things like composing transformations when using quaternions. To quote the Wikipedia page you linked,

    Combining two successive rotations, each represented by an Euler axis and angle, is not straightforward, and in fact does not satisfy the law of vector addition, which shows that finite rotations are not really vectors at all. It is best to employ the direction cosine matrix (DCM), or tensor, or quaternion notation, calculate the product, and then convert back to Euler axis and angle.

    They also do not suffer from a problem common to axis/angle form, gimbal lock.

    链接地址: http://www.djcxy.com/p/81788.html

    上一篇: 结合旋转轴矢量

    下一篇: 四元数和变换矩阵