Download presentation
Presentation is loading. Please wait.
Published byJanel Cooper Modified over 8 years ago
1
Composite 3D Transformations
2
Example of Composite 3D Transformations Try to transform the line segments P 1 P 2 and P 1 P 3 from their start position in (a) to their ending position in (b). The first solution is to compose the primitive transformations T, R x, R y, and R z. This approach is easier to illustrate and does offer help on building an understanding. The 2 nd, more abstract approach is to use the properties of special orthogonal matrices. y x z y x z P1P1 P2P2 P3P3 P1P1 P2P2 P3P3 (a) (b)
3
Composition of 3D Transformations Breaking a difficult problem into simpler sub-problems: 1.Translate P 1 to the origin. 2. Rotate about the y axis such that P 1 P 2 lies in the (y, z) plane. 3. Rotate about the x axis such that P 1 P 2 lies on the z axis. 4. Rotate about the z axis such that P 1 P 3 lies in the (y, z) plane. y x z y x z y x z P1P1 P2P2 P3P3 P1P1 P2P2 P3P3 y x z P1P1 P2P2 P3P3 y x z P1P1 P2P2 P3P3 P3P3 P2P2 P1P1 1 2 34
4
Composition of 3D Transformations 1. 2. y x z P1P1 P2P2 P3P3 D1D1
5
Composition of 3D Transformations 3 4. y x z P 1 P 2 D2D2 y x z P 1 P 2 D3D3 P 3 Finally, we have the composite matrix:
6
Vector Rotation x y x y Rotate the vector u The unit vector along the x axis is [1, 0] T. After rotating about the origin by , the resulting vector is
7
x Vector Rotation (cont.) y Rotate the vector x y v The above results states that if we try to rotate a vector, originally pointing the direction of the x (or y) axis, toward a new direction, u (or v), the rotation matrix, R, could be simply written as [u | v] without the need of any explicit knowledge of , the actual rotation angle. Similarly, the unit vector along the y axis is [0, 1] T. After rotating about the origin by , the resulting vector is
8
Vector Rotation (cont.) The reversed operation of the above rotation is to rotate a vector that is not originally pointing the x (or y) direction into the direction of the positive x or y axis. The rotation matrix in this case is R(- ), expressed by R -1 ( ) where T denotes the transpose. x x y y Rotate the vector u u
9
Example what is the rotation matrix if one wants the vector T in the left figure to be rotated to the direction of u. T (2, 3) u If, on the other hand, one wants the vector u to be rotated to the direction of the positive x axis, the rotation matrix should be
10
Rotation Matrices Rotation matrix is orthonormal: Each row is a unit vector Each row is perpendicular to the other, i.e. their dot product is zero. Each vector will be rotated by R( ) to lie on the positive x and y axes, respectively. The two column vectors are those into which vectors along the positive x and y axes are rotated. For orthonormal matrices, we have
11
Cross Product The cross product or vector product of two vectors, v 1 and v 2, is another vector: The cross product of two vectors is orthogonal to both Right-hand rule dictates direction of cross product. v1v1 v2v2 v1 v2v1 v2
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.