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

inverse matrix t ranslation
SMART_READER_LITE
LIVE PREVIEW

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 .


slide-1
SLIDE 1

Inverse Matrix (T ranslation)

Given a matrix M, find the matrix M-1 that reverses the transformation

  • riginal 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.

slide-2
SLIDE 2

Inverse Matrix (T ranslation)

Given a translation matrix T, find the matrix T-1 that reverses the transformation

  • riginal 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 Check that T-1*T = T*T-1 = I.

T

1 dx 1 dy 1

T-1

? ? ? ? ? ? ? ? ?

slide-3
SLIDE 3

Inverse Matrix (T ranslation)

Given a translation matrix T, find the matrix T-1 that reverses the transformation

  • riginal 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 Check that T-1*T = T*T-1 = I. 1 dx 1 dy 1

T-1

1

  • dx

1

  • dy

1

T

slide-4
SLIDE 4

Inverse Matrix (Scaling)

Given a scaling matrix S, find the matrix S-1 that reverses the transformation

  • riginal 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 Check that S-1*S = S*S-1 = I.

S

sx sy 1

S-1

? ? ? ? ? ? ? ? ?

slide-5
SLIDE 5

Inverse Matrix (Scaling)

Given a scaling matrix S, find the matrix S-1 that reverses the transformation

  • riginal 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 Check that S-1*S = S*S-1 = I.

S

sx sy 1

S-1

1/sx 1/sy 1

slide-6
SLIDE 6

Inverse Matrix (Rotation)

Given a rotation matrix, R, find the matrix, R-1 that reverses the transformation

  • riginal 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 Check that R-1*R = R*R-1 = I.

R

cosφ

  • sinφ

sinφ cosφ 1

R-1

? ? ? ? ? ? ? ? ?

slide-7
SLIDE 7

Inverse Matrix (Rotation)

Given a rotation matrix, R, find the matrix, R-1 that reverses the transformation

  • riginal 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 Check that R-1*R = R*R-1 = I.

R

cosφ

  • sinφ

sinφ cosφ 1

R-1

cos-φ

  • sin-φ

sin-φ cos-φ 1

slide-8
SLIDE 8

Inverse Matrix (Rotation)

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

R

cosφ

  • sinφ

sinφ cosφ 1

R-1

cos-φ

  • sin-φ

sin-φ cos-φ 1 sinφ sin(-φ) φ

  • φ

R-1

= RT

cosφ sinφ

  • sinφ

cosφ 1

slide-9
SLIDE 9

Inverse for Special Orthogonal

The reason RT = R-1 is that the rotation matrix R is special orthogonal If each row in R is viewed as a vector then dot products of these vectors are r1 = (cosφ, -sinφ, 0) r1*r1 = r2*r2 = r3*r3 = 1, len 1 r2 = (sinφ, cosφ, 0) r1*r2 = r1*r3 = r2*r3 = 0, perp. r3 = (0, 0, 1) Thus computing R*RT involves computing dot products 1 or 0 R*RT = I

R

cosφ

  • sinφ

sinφ cosφ 1

  • every row vector is unit vector (length 1)

ri*ri = 1

  • every pair of row vectors is perpendicular

ri*rj = 0 (i≠j)

cosφ

  • sinφ

sinφ cosφ 1 cosφ sinφ

  • sinφ

cosφ 1 r1*r1=1 r1*r2=0 r1*r3=0 1 1 1

* =

slide-10
SLIDE 10

Inverse for Special Orthogonal

In general if M is special orthogonal then MT = M-1 If each row in R is viewed as a vector then dot products of these vectors are u = (u1, u2, u3) u*u = v*v = w*w = 1, len 1 v = (v1, v2, v3) u*v = u*w = v*w = 0, perp. w = (w1, w2, w3) Thus computing M*MT involves computing dot products 1 or 0 M*MT = I u1 u2 u3 v1 v2 v3 w1 w2 w3 u1 v1 w1 u2 v2 w2 u3 v3 w3

u*u=1 u*v=0 u*w=0 1 1 1

* =

M

u1 u2 u3 v1 v2 v3 w1 w2 w3

MT

u1 v1 w1 u2 v2 w2 u3 v3 w3

slide-11
SLIDE 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φ

sinφ cosφ 1 1 1

* =

cosφ sinφ 1 cosφ

  • sinφ

sinφ cosφ 1 1 1

* =

  • sinφ

cosφ 1

x=(1,0) rotated to x'=(cosφ,sinφ) i.e. x rotated to first column of R y=(0,1) rotated to y'=(-sinφ,cosφ) i.e. y rotated to second column of R

slide-12
SLIDE 12

Rotation Revisited (2D)

u P Given pitch u and location P what transformation will lead to target configuration

slide-13
SLIDE 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 P u

slide-14
SLIDE 14

Rotation Revisited (2D)

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

slide-15
SLIDE 15

Rotation Revisited (2D)

We should first rotate to orient the plane 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=(-uy,ux) Then just place the coordinates of u and v in the columns of R (see slide 7) u ux vx uy vy

1

R

ux

  • uy

uy ux

1

=

v x y

slide-16
SLIDE 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

1

px

1

py

1

ux

  • uy

uy ux

1

* *

rotate the plane translate the plane

slide-17
SLIDE 17

Rotation Revisited (3D)

Given pitch u , roll w , location P what transformation will lead to target configuration u P w

slide-18
SLIDE 18

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 P w u w u P w

slide-19
SLIDE 19

Rotation Revisited (3D)

We should first rotate to orient the plane 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=wxu z=(0,0,1) goes to w Then just place the coordinates of u,v,w in the columns of R (see slide 7) ux vx wx uy vy wy uz vz wz 1

R

u w u,w given v=wxu v v

slide-20
SLIDE 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 1 px 1 py 1 pz 1 ux vx wx uy vy wy uz vz wz 1 *

*

u w u P w then translate first rotate v=wxu

slide-21
SLIDE 21

Consider a special orthogonal matrix M What is the effect of M on the main axes x=(1,0,0) y=(0,1,0) z=(0,0,1)

Coordinate Systems Transformation

M

ux vx wx uy vy wy uz vz wz u*u = v*v = w*w = 1 u*v = u*w = v*w = 0 ux vx wx uy vy wy uz vz wz

1

M * x = ? M * y = ? M * z = ?

slide-22
SLIDE 22

Consider a special orthogonal matrix M What is the effect of M on the main axes x=(1,0,0) y=(0,1,0) z=(0,0,1)

Coordinate Systems Transformation

M

ux vx wx uy vy wy uz vz wz u*u = v*v = w*w = 1 u*v = u*w = v*w = 0

v=(vx,vy,vz) w=(wx,wy,wz) u=(ux,uy,uz)

rotates the world, i.e. changes world to new coordinate system M * x = (ux,uy,uz) M * y = (vx,vy,vz) M * z = (wx,wy,wz)

slide-23
SLIDE 23

Consider a special orthogonal matrix M and its transpose MT What is the effect of MT on the axes u=(ux,uy,uz) v=(vx,vy,vz) w=(wx,wy,wz)

Coordinate Systems Transformation

M

ux vx wx uy vy wy uz vz wz

MT

ux uy uz vx vy vz wx wy wz u*u = v*v = w*w = 1 u*v = u*w = v*w = 0 ux uy uz vx vy vz wx wy wz ux uy uz M * u = ? M * v = ? M * w = ?

slide-24
SLIDE 24

Consider a special orthogonal matrix M and its transpose MT What is the effect of MT on the axes u=(ux,uy,uz) v=(vx,vy,vz) w=(wx,wy,wz)

Coordinate Systems Transformation

M

ux vx wx uy vy wy uz vz wz

MT

ux uy uz vx vy vz wx wy wz u*u = v*v = w*w = 1 u*v = u*w = v*w = 0

v=(vx,vy,vz) w=(wx,wy,wz) u=(ux,uy,uz)

rotates world, aligns new coordinate system with primary (the inverse effect of M) M * u = (1,0,0) M * v = (0,1,0) M * w = (0,0,1)

MT=M-1

slide-25
SLIDE 25

Rotation around arbitrary axis

P(x,y,z) α P'(x',y',z') A(ax,ay,az)

can reduce to rotation around z-axis by realignment of coordinate system

slide-26
SLIDE 26

Rotation around arbitrary axis

P(x,y,z) A(ax,ay,az)

slide-27
SLIDE 27

Rotation around arbitrary axis

P(x,y,z) A(ax,ay,az) P(x,y,z) A(ax,ay,az) A'(ax',ay',az') A”(ax”,ay”,az”)

compute A',A” s.t. A,A',A” perpend.

slide-28
SLIDE 28

Rotation around arbitrary axis

P(x,y,z) A(ax,ay,az) P(x,y,z) A(ax,ay,az) A'(ax',ay',az') A”(ax”,ay”,az”) P(x,y,z) A(ax,ay,az) A'(ax',ay',az') A”(ax”,ay”,az”)

compute A',A” s.t. A,A',A” perpend. align A',A”,A with main axes X,Y,Z

? ? ? ? ? ? ? ? ? 1

M

slide-29
SLIDE 29

Rotation around arbitrary axis

P(x,y,z) A(ax,ay,az) P(x,y,z) A(ax,ay,az) A'(ax',ay',az') A”(ax”,ay”,az”) P(x,y,z) A(ax,ay,az) A'(ax',ay',az') A”(ax”,ay”,az”)

compute A',A” s.t. A,A',A” perpend. align A',A”,A with main axes X,Y,Z

ax' ay' az' ax” ay” az” ax ay az 1

M

slide-30
SLIDE 30

Rotation around arbitrary axis

P(x,y,z) A(ax,ay,az) P(x,y,z) A(ax,ay,az) A'(ax',ay',az') A”(ax”,ay”,az”) P(x,y,z) P'(x',y',z') A(ax,ay,az) A'(ax',ay',az') A”(ax”,ay”,az”) α

compute A',A” s.t. A,A',A” perpend. align A',A”,A with main axes X,Y,Z rotate around z

? ? ? ? ? ? ? ? ? 1

R

ax' ay' az' ax” ay” az” ax ay az 1

M

slide-31
SLIDE 31

Rotation around arbitrary axis

P(x,y,z) A(ax,ay,az) P(x,y,z) A(ax,ay,az) A'(ax',ay',az') A”(ax”,ay”,az”) P(x,y,z) P'(x',y',z') A(ax,ay,az) A'(ax',ay',az') A”(ax”,ay”,az”) α

compute A',A” s.t. A,A',A” perpend. align A',A”,A with main axes X,Y,Z rotate around z

ax' ay' az' ax” ay” az” ax ay az 1

M

ca

  • sa

sa ca 1 1

R

slide-32
SLIDE 32

Rotation around arbitrary axis

P(x,y,z) α P'(x',y',z') A(ax,ay,az) P(x,y,z) A(ax,ay,az) A'(ax',ay',az') A”(ax”,ay”,az”) P(x,y,z) P'(x',y',z') A(ax,ay,az) A'(ax',ay',az') A”(ax”,ay”,az”) α

compute A',A” s.t. A,A',A” perpend. align A',A”,A with main axes X,Y,Z r e s t

  • r

e a l i g n m e n t rotate around z

ax' ay' az' ax” ay” az” ax ay az 1

M

? ? ? ? ? ? ? ? ? 1

M'

ca

  • sa

sa ca 1 1

R

slide-33
SLIDE 33

Rotation around arbitrary axis

P(x,y,z) α P'(x',y',z') A(ax,ay,az) P(x,y,z) A(ax,ay,az) A'(ax',ay',az') A”(ax”,ay”,az”) P(x,y,z) P'(x',y',z') A(ax,ay,az) A'(ax',ay',az') A”(ax”,ay”,az”) α

compute A',A” s.t. A,A',A” perpend. align A',A”,A with main axes X,Y,Z r e s t

  • r

e a l i g n m e n t rotate around z

ax' ay' az' ax” ay” az” ax ay az 1

M

ax' ax” ax ay' ay” ay az' az” az 1

M'

ca

  • sa

sa ca 1 1

R

slide-34
SLIDE 34

Rotation around arbitrary axis

P(x,y,z) α P'(x',y',z') A(ax,ay,az)

can reduce to rotation around Z-axis by realignment of coordinate system R = M' * Rz * M multiply top of stack by R