inverse matrix t ranslation
play

Inverse Matrix (T ranslation) Given a matrix M , find the matrix M - PowerPoint PPT Presentation

Inverse Matrix (T ranslation) Given a matrix M , find the matrix M -1 that reverses the transformation original transformation: p = M*p inverse transformation: p = M -1 *p = M -1 *(M*p) = (M -1 *M)*p = I*p Note that M -1 *M = M*M -1 = I .


  1. Inverse Matrix (T ranslation) Given a matrix M , find the matrix M -1 that reverses the transformation original transformation: p’ = M*p inverse transformation: p = M -1 *p’ = M -1 *(M*p) = (M -1 *M)*p = I*p Note that M -1 *M = M*M -1 = I .

  2. Inverse Matrix (T ranslation) Given a translation matrix T , find the matrix T -1 that reverses the transformation original transformation: p’ = T*p inverse transformation: p = T -1 *p’ = T -1 *(T*p) = (T -1 *T)*p = I*p Need a matrix T -1 such that T -1 *T = I if we translated by (dx, dy) , need to translate back by (?, ?) to cancel 1 0 dx ? ? ? T T -1 0 1 dy ? ? ? 0 0 1 ? ? ? Check that T -1 *T = T*T -1 = I .

  3. Inverse Matrix (T ranslation) Given a translation matrix T, find the matrix T -1 that reverses the transformation original transformation: p’ = T*p inverse transformation: p = T -1 *p’ = T -1 *(T*p) = (T -1 *T)*p = I*p Need a matrix T -1 such that T -1 *T = I if we translated by (dx, dy) , need to translate back by (-dx, -dy) to cancel 1 0 dx 1 0 -dx T T -1 0 1 dy 0 1 -dy 0 0 1 0 0 1 Check that T -1 *T = T*T -1 = I .

  4. Inverse Matrix (Scaling) Given a scaling matrix S , find the matrix S -1 that reverses the transformation original transformation: p’ = S*p inverse transformation: p = S -1 *p’ = S -1 *(S*p) = (S -1 *S)*p = I*p Need a matrix S -1 such that S -1 *S = I if we scaled by (sx, sy) , need to scale back by (?, ?) to cancel sx 0 0 ? ? ? S S -1 0 sy 0 ? ? ? 0 0 1 ? ? ? Check that S -1 *S = S*S -1 = I .

  5. Inverse Matrix (Scaling) Given a scaling matrix S , find the matrix S -1 that reverses the transformation original transformation: p’ = S*p inverse transformation: p = S -1 *p’ = S -1 *(S*p) = (S -1 *S)*p = I*p Need a matrix S -1 such that S -1 *S = I if we scaled by (sx, sy) , need to scale back by (1/sx, 1/sy) to cancel sx 0 0 1/sx 0 0 S S -1 0 sy 0 0 1/sy 0 0 0 1 0 0 1 Check that S -1 *S = S*S -1 = I .

  6. Inverse Matrix (Rotation) Given a rotation matrix, R , find the matrix, R -1 that reverses the transformation original transformation: p’ = R*p inverse transformation: p = R -1 *p’ = R -1 *(R*p) = (R -1 *R)*p = I*p Need a matrix R -1 such that R -1 *R = I which is easy to find if we rotated by angle φ , need to rotate back by angle ? to cancel cosφ -sinφ 0 ? ? ? R R -1 sinφ cosφ 0 ? ? ? 0 0 1 ? ? ? Check that R -1 *R = R*R -1 = I .

  7. Inverse Matrix (Rotation) Given a rotation matrix, R , find the matrix, R -1 that reverses the transformation original transformation: p’ = R*p inverse transformation: p = R -1 *p’ = R -1 *(R*p) = (R -1 *R)*p = I*p Need a matrix R -1 such that R -1 *R = I which is easy to find if we rotated by angle φ , need to rotate back by angle - φ to cancel cosφ -sinφ 0 cos-φ -sin-φ 0 R R -1 sinφ cosφ 0 sin-φ cos-φ 0 0 0 1 0 0 1 Check that R -1 *R = R*R -1 = I .

  8. Inverse Matrix (Rotation) It turns out that inverse of a rotation matrix is easier to find. So far we have cosφ -sinφ 0 cos-φ -sin-φ 0 R R -1 sinφ cosφ 0 sin-φ cos-φ 0 0 0 1 0 0 1 By the properties of sin/cos we have cosφ = cos(-φ) sinφ φ sinφ = - sin(-φ) -φ sin(-φ) cosφ sinφ 0 = R T R -1 -sinφ cosφ 0 0 0 1 Transposing the rows and columns in the original matrix R , creates the inverse R -1 .

  9. Inverse for Special Orthogonal The reason R T = R -1 is that the rotation matrix R is special orthogonal ● every row vector is unit vector (length 1) cosφ - sinφ 0 r i *r i = 1 R ● every pair of row vectors is perpendicular sinφ cosφ 0 r i *r j = 0 (i≠j) 0 0 1 If each row in R is viewed as a vector then dot products of these vectors are r 1 = (cosφ, -sinφ, 0) r 1 *r 1 = r 2 *r 2 = r 3 *r 3 = 1, len 1 r 2 = (sinφ, cosφ, 0) r 1 *r 2 = r 1 *r 3 = r 2 *r 3 = 0, perp. r 3 = (0, 0, 1) cosφ - sinφ 0 cosφ sinφ 0 1 0 0 Thus computing R*R T involves computing * = sinφ cosφ 0 -sinφ cosφ 0 0 1 0 dot products 1 or 0 0 0 1 0 0 1 0 0 1 R*R T = I r 1 * r 1 =1 r 1 * r 2 =0 r 1 * r 3 =0

  10. Inverse for Special Orthogonal In general if M is special orthogonal then M T = M -1 u 1 u 2 u 3 u 1 v 1 w 1 M M T v 1 v 2 v 3 u 2 v 2 w 2 w 1 w 2 w 3 u 3 v 3 w 3 If each row in R is viewed as a vector then dot products of these vectors are u = (u 1 , u 2 , u 3 ) u*u = v*v = w*w = 1, len 1 v = (v 1 , v 2 , v 3 ) u*v = u*w = v*w = 0, perp. w = (w 1 , w 2 , w 3 ) u 1 u 2 u 3 u 1 v 1 w 1 1 0 0 Thus computing M*M T involves computing v 1 v 2 v 3 u 2 v 2 w 2 * = 0 1 0 dot products 1 or 0 w 1 w 2 w 3 u 3 v 3 w 3 0 0 1 M*M T = I u * u=1 u*v=0 u * w=0

  11. Rotation Revisited What is the effect of a rotation matrix R on the main axes x=(1,0) and y=(0,1) cosφ -sinφ 0 1 cosφ = x=(1,0) rotated to x'=(cosφ,sinφ) * sinφ cosφ 0 0 sinφ i.e. x rotated to first column of R 0 0 1 1 1 cosφ -sinφ 0 0 -sinφ = y=(0,1) rotated to y'=(-sinφ,cosφ) * i.e. sinφ cosφ 0 1 cosφ y rotated to second column of R 0 0 1 1 1

  12. Rotation Revisited (2D) u P Given pitch u and location P what transformation will lead to target configuration

  13. Rotation Revisited (2D) u P Given pitch u and location P what transformation will lead to target configuration We should first rotate (to orient the plane) and then translate u u P

  14. Rotation Revisited (2D) We should first rotate to orient the plane u φ The angle φ can be found using the dot product (compute u*x in two ways) (assuming u is unit vector; x=(1,0) is unit) u*x = |u|*|x|*cos φ = cos φ u*x = u x *1 + u y *0 = u x (so u x = cosφ and therefore φ = ? ) But we can find the rotation matrix R without using trig. operations.

  15. Rotation Revisited (2D) We should first rotate to orient the plane u y v x We can find the rotation matrix R by noting where the axes x and y go under R x=(1,0) goes to u y=(0,1) goes to v v is perpendicular to u , so v=(-u y ,u x ) Then just place the coordinates of u and v in the columns of R (see slide 7) u x v x u x -u y 0 0 = R u y v y u y u x 0 0 0 0 1 0 0 1

  16. Rotation Revisited (2D) u P Given pitch u and location P what transformation will lead to target configuration We should first rotate (to orient the plane) and then translate p x u x -u y 1 0 0 * * p y u y u x 0 1 0 0 0 1 0 0 1 translate the plane rotate the plane

  17. Rotation Revisited (3D) u P w Given pitch u , roll w , location P what transformation will lead to target configuration

  18. Rotation Revisited (3D) u P w Given pitch u , roll w , location P what transformation will lead to target configuration We should first rotate (to orient the plane) and then translate u P u w w

  19. Rotation Revisited (3D) We should first rotate to orient the plane v v u w We can find the rotation matrix R by noting where the axes x , y , z go under R x=(1,0,0) goes to u y=(0,1,0) goes to v v perpendicular to u , w so v=w x u z=(0,0,1) goes to w Then just place the coordinates of u,v,w in the columns of R (see slide 7) u x v x w x 0 u,w given u y v y w y R 0 u z v z w z 0 v=w x u 0 0 0 1

  20. Rotation Revisited (3D) Given pitch u , roll w , location P what transformation will lead to target configuration We should first rotate (to orient the plane) and then translate u v=w x u P w u w then translate first rotate p x u x v x w x 1 0 0 0 p y 0 1 0 u y v y w y 0 * 1 * p z 0 0 1 u z v z w z 0 0 0 0 1 0 0 0

  21. Coordinate Systems Transformation Consider a special orthogonal matrix M u*u = v*v = w*w = 1 u x v x w x u*v = u*w = v*w = 0 M u y v y w y u z v z w z What is the effect of M on the main axes x=(1,0,0) y=(0,1,0) z=(0,0,1) M * x = ? u x v x w x 1 M * y = ? u y v y w y 0 M * z = ? u z v z w z 0

  22. Coordinate Systems Transformation Consider a special orthogonal matrix M u*u = v*v = w*w = 1 u x v x w x u*v = u*w = v*w = 0 M u y v y w y u z v z w z What is the effect of M on the main axes x=(1,0,0) y=(0,1,0) z=(0,0,1) M * x = (u x ,u y ,u z ) v=(vx,vy,vz) M * y = (v x ,v y ,v z ) u=(ux,uy,uz) M * z = (w x ,w y ,w z ) rotates the world, i.e. changes world to new coordinate system w=(wx,wy,wz)

  23. Coordinate Systems Transformation Consider a special orthogonal matrix M and its transpose M T u x v x w x u x u y u z u*u = v*v = w*w = 1 M T M u y v y w y v x v y v z u*v = u*w = v*w = 0 u z v z w z w x w y w z What is the effect of M T on the axes u=(u x ,u y ,u z ) v=(v x ,v y ,v z ) w=(w x ,w y ,w z ) M * u = ? u x u y u z u x M * v = ? v x v y v z u y M * w = ? w x w y w z u z

  24. Coordinate Systems Transformation Consider a special orthogonal matrix M and its transpose M T u x v x w x u x u y u z u*u = v*v = w*w = 1 M T M u y v y w y v x v y v z u*v = u*w = v*w = 0 u z v z w z w x w y w z What is the effect of M T on the axes u=(u x ,u y ,u z ) v=(v x ,v y ,v z ) w=(w x ,w y ,w z ) M T =M -1 M * u = (1,0,0) v=(vx,vy,vz) M * v = (0,1,0) M * w = (0,0,1) u=(ux,uy,uz) rotates world, aligns new coordinate system with primary (the inverse effect of M ) w=(wx,wy,wz)

  25. Rotation around arbitrary axis P'(x',y',z') A(ax,ay,az) α P(x,y,z) can reduce to rotation around z -axis by realignment of coordinate system

  26. Rotation around arbitrary axis A(ax,ay,az) P(x,y,z)

  27. Rotation around arbitrary axis compute A',A” s.t. A,A',A” perpend. A(ax,ay,az) A(ax,ay,az) P(x,y,z) P(x,y,z) A”(ax”,ay”,az”) A'(ax',ay',az')

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend