Lecture 12

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Lecture 12 as PDF for free.

More details

  • Words: 785
  • Pages: 4
Shearing

Chapter 5: 2-D Geometric Transformations





Shearing, Composite Transformations, Properties of transformations

Distorts the shape such that the transformed shape appears as if the object were composed of layers that had been caused to slide over each other. Shearing is done in x-direction (shx) and in y-direction (shy).    

Shearing w.r.t a reference line

Shearing in x



Shearing w.r.t. a reference lines shears and translates an object too by a shift amount.  

 x '  1  y ' =  sh    0y  1   0

shx 1 0

0  x  0 ⋅  y  1  1 

+ive values of shx causes a shift in the object towards right. -ive values of shx causes a shift in the object towards left. +ive values of shy causes an upward shift in the object. -ive values of shy causes a downward shift in the object.

Shift = -shx.yref  for x-direction shearing. Shift = -shy.xref  for y-direction shearing.

MATRIX FOR SHEARING IN Y - ?

1

Result of shearing an object in y-direction

Result of shearing an object in xdirection w.r.t a reference line

Reference line here is xref = -1 WHAT IS A REFERENCE LINE?

2D Composite Transformations  

Sequence of transformations: composite transformation matrix Matrices listed in reverse order

  x   x  x'   y ' = M ⋅  M ⋅  y   = (M ⋅ M ) ⋅  y  2  1   2 1        1    1   1  

P' = M 2 ⋅ M 1 ⋅ P = M ⋅ P

Composite 2D Translations P ' = T (t 2 x , t 2 y ) ⋅ {T (t1 x , t1 y ) ⋅ P} = {T (t 2 x , t 2 y ) ⋅ T (t1x , t1 y )}⋅ P

1 0 t 2 x  1 0 t1 x  1 0 t1x + t 2 x  0 1 t  ⋅  0 1 t  = 0 1 t + t  2y   1y  1y 2y    0 0 1  0 0 1  0 0 1  T (t 2 x , t 2 y ) ⋅ T (t1x , t1 y ) = T (t1x + t 2 x , t1 y + t 2 y )

2

Composite 2D Rotations P ' = R (θ 2 ) ⋅ {R (θ1 ) ⋅ P} = {R (θ 2 ) ⋅ R (θ1 )}⋅ P cos θ 2  sin θ 2   0

− sin θ 2 cos θ 2 0

0 cos θ1 0 ⋅  sin θ1 1  0

− sin θ1 0 cos(θ1 + θ 2 ) − sin (θ1 + θ 2 ) 0 cos θ1 0 =  sin (θ1 + θ 2 ) cos(θ1 + θ 2 ) 0 0 1  0 0 1

R (θ 2 ) ⋅ R (θ1 ) = R (θ 2 + θ1 )

Composite 2D Scalings P ' = S ( s2 x , s2 y ) ⋅ {S ( s1x , s1 y ) ⋅ P} = {S ( s2 x , s2 y ) ⋅ S ( s1x , s1 y )}⋅ P s2 x 0   0

0 s2 y 0

0  s1x 0 ⋅  0   1  0

0 s1 y 0

0  s1x ⋅ s 2 x 0 =  0   1  0

0 s1 x ⋅ s2 y 0

0 0  1

S ( s2 x , s2 y ) ⋅ S ( s1x , s1 y ) = S ( s1x s2 x , s1 y s2 y )

General 2D Pivot-Point Rotation

R (xr , y r , θ ) = T (xr , y r ) ⋅ R (θ ) ⋅ T (− xr ,− y r )

General 2D Fixed-Point Scaling

S (x f , y f , s x , s y ) = T (x f , y f )⋅ S (s x , s y )⋅ T (− x f ,− y f )

3

Matrix Concatenation Properties 

Associative:



Not commutative:

M 3 ⋅ M 2 ⋅ M 1 = (M 3 ⋅ M 2 ) ⋅ M 1 = M 3 ⋅ (M 2 ⋅ M 1 ) M 2 ⋅ M1 ≠ M1 ⋅ M 2

Order is important!

4

Related Documents

Lecture 12
August 2019 29
Lecture 12
December 2019 20
Lecture 12
November 2019 21
Lecture 12
June 2020 6
Lecture 12
December 2019 20
Lecture 12
July 2020 5