Download presentation
Presentation is loading. Please wait.
1
Math for CSTutorial 11 Matrix Multiplication Rule Matrices make linear transformations of vectors
2
Math for CSTutorial 12 Translation, Scaling, Rotation of Vectors
3
Math for CSTutorial 13 Translation Now, we can write the translation as the multiplication by specially designed matrix: Translation in Homogeneous coordinates
4
Math for CSTutorial 14 Two translations We can check that the matrix representing two sequential translations can be written as the multiplication of their matrices. Sequential Translations in Homogeneous Coordinates
5
Math for CSTutorial 15 Scaling in Homogeneous coordinates Scaling Scaling matrix looks similar to what it was for ordinary coordinates: What is the Matrix for Scaling 0.1x 1 and 10x 2 ?
6
Math for CSTutorial 16 Two scalings The matrix of two successful scalings is the multiplication of two scaling matrices: Several Scalings in Homogeneous coordinates What is the Matrix for Scaling 0.1x 1 and 10x 2 and then 20x 1 and 0.1x 2 ?
7
Math for CSTutorial 17 Rotation Two Rotations Easy to check, that clock-wise rotation on angle θ is given by: Two successful rotations can be represented by multiplication of their matrices: Rotation in Homogeneous coordinates
8
Math for CSTutorial 18 Homogeneous coordinates scaled by a constant, represent the same point. x2x2 x1x1 W2W3 W1 Scaling of Homogeneous coordinates
9
Math for CSTutorial 19 Scaling of Homogeneous coordinates
10
Math for CSTutorial 110 Rotation How to write the rotation around a point ? Bring p back Bring p to the origin Scaling Bring p back Bring p to the origin Bring the point p to the origin; make a rotation, bring it back: … the same procedure for scaling: Rotation around arbitrary point
11
Math for CSTutorial 111 1). Write down the matrix for: Rotation θ=90° around p=(2,5), translation (-2,2), scaling (x2) around p=(-1,1). Translation Rotation Scaling ( T(-1,1)·S(2,2)·T(1,-1) ) ·T(-2,2) ·( T(2,5) ·R(90) ·T(-2,-5) ) Example 1. Series of transformations
12
Math for CSTutorial 112 PointTranslation Scaling The translation and scaling are very similar in 3D: Homogeneous coordinates in 3D
13
Math for CSTutorial 113 The Rotation in 3D can be done around arbitrary axis. Euler angles representation. Any rotation is the composition of three basic rotation, a rotation around the axis x of an angle , a rotation around the axis y of an angle and a rotation around the angle z of an angle are called Euler angles In right hand coordinated these rotations are defined as follows Simple representation Order-dependent: Not suitable for animation, because the interpolation between the angles of rotation leads to false locations Rotation in 3D: Axis needed
14
Math for CSTutorial 114 2). Rotation θ=90° around x followed by rotation θ=90° around y. find the axis of rotation. R=R1·R2; If c – rotation axis, then: Rc=c; Solve v.r.t c; c=(a,a,-a,1) 3). Prove that rotation is not commutative: Rx(θ1)·Ry(θ2)≠ Ry(θ2) ·Rx(θ1) Examples 2,3. Rotations in 3D
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.