3Д БУМ

3Д принтеры и всё что с ними связано

Multiplying Quaternions

As you read in the first part of this chapter, some operations that are normally performed on matrices can be done much cheaper with quaternions. One of these is multiplication. Multiplying two quater­nions together has the same effect as multiplying their corresponding rotation matrices, but at a lower computational cost. Multiplying two rotation quaternions will cause the rotations to become concatenated, or strung together in a series. For example, if one rotation represents a rotation around the X axis and another rotation matrix represents a rotation around the Y axis, multiplying them together will create a matrix that represents a rotation around the X and Y axes. The for­mula for quaternion multiplication is shown in Figure 2.3.

p=[m, u] q=[n, v] qp= [mn — v u, nu+ mv+ (i/x u)]

Figure 2.3 In the quaternion multiplication formula, n and m are the scalar components of the quaternion, and u and v are the vector components.

Note: • refers to the dot product of the two vectors, whereas x refers to the cross product of two vectors.

Для любых предложений по сайту: [email protected]