Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a...

23
Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates into a new set of coordinates (x’, y’). Instead of applying a transformation to every point in every line that makes up an object, the transformation is applied only to the vertices of

Transcript of Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a...

Page 1: Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.

Two-Dimensional Geometric Transformations

A two dimensional transformation is any operation on a point in space (x y) that maps

that points coordinates into a new set of coordinates (xrsquo yrsquo)

Instead of applying a transformation to every point in every line that makes up an object the transformation is applied only to the vertices of

the object and then new lines are drawn between the resulting endpoints

Two-Dimensional Geometric Transformations

bull Basic Transformations bull Translation bull Rotation bull Scaling

bull Composite Transformations

bull Other transformations bull Reflection bull Shear

Transformation include change in size shape amp orientation

Translation

bull Translation transformation

bull Translation vector or shift vector T = (tx ty)

bull Rigid-body transformationbull Moves objects without deformation

xtxx ytyy

y

xp

PrsquoT

y

x

T

Matrix Representation

Translation matrix

Row vector representation

P = (x y)T = (tx ty)P = (x y)

Prsquo= (xrsquo yrsquo) Prsquo = P + T

x lsquo = x + txyrsquo = y + ty

Rotation

Repositioning along a circular path in the xy plane y

xr

yr ө

P

Prsquo

(xr yr) is the rotation point ө is the rotation angle

Rotation

Rotation transformation

xrsquo=rcos(φ+θ)= rcos φ cos θ -rsin φ sin θ

yrsquo=rsin(φ + θ)= rcos φ sin θ +rsin φ cos θ

x=rcos φ y=rsin φ

Prsquo= R P

cossin

sincosR

xrsquo = x cos ө - y sin ө

yrsquo = x sin ө + y Cos ө rr

Φ

ө

Prsquo

P

(xrsquo yrsquo)

(x y)

(xrsquoyrsquo)

(xryr)

ө Φ

Rotation about arbitrary pivot point position

xrsquo = xr + (x - xr) cosө - (y ndash yr) sin ө

yrsquo = yr + (x - xr) sin ө - (y ndash yr) cos ө

General Pivot-Point Rotation

bull Rotations about any selected pivot point (xryr)

bull Translate-rotate-translate

General Pivot Point Rotation

To rotate about P1 (x1y1) the following sequence of the fundamental transformations are needed

1Translate the object by (-x1 -y1) 2Rotate (Oslash)3Translate the object by (x1 y1)

General Pivot-Point Rotation

100

10

01

100

0cossin

0sincos

100

10

01

r

r

r

r

y

x

y

x

100

sin)cos1(cossin

sin)cos1(sincos

rr

rr

xy

yx

)()()()( rrrrrr yxRyxTRyxT

Scaling

Alters the size of an object Scaling an object is implemented by

scaling the X and Y coordinates of each vertex in the object

Scaling

Scaling transformation

Scaling factors sx and sy

Uniform scaling if sx = sy

xsxx

ysyy

y

x

s

s

y

x

y

x

0

0

PSP

x

y

x

y2xs1ys

Matrix Representations and Homogeneous Coordinates- allow all transformations as matrix

multiplications

bull Homogeneous Coordinates

bull Matrix representations bull Translation

)()( hyxyx hh h

xx h

h

yy h

1100

10

01

1

y

x

t

t

y

x

y

x

h =1 for 2 D transformations

Matrix Representations

Matrix representations Scaling

Rotation

1100

00

00

1

y

x

s

s

y

x

y

x

1100

0cossin

0sincos

1

y

x

y

x

Composite Transformations-sequence of transformations

Translations

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

)()( 1122 PttTttTP yxyx

PttTttT yxyx )()( 1122

)()()( 21211122 yyxxyxyx ttttTttTttT

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

Composite Transformations

Scaling

100

00

00

100

00

00

100

00

00

21

21

1

1

2

2

yy

xx

y

x

y

x

ss

ss

s

s

s

s

)()()( 21211122 yyxxyxyx ssssSssSssS

Composite Transformations

Rotations )()( 12 PRRP

PRR )()( 12

)()()( 2112 RRR

100

0)cos()sin(

0)sin()cos(

100

0cossin

0sincos

100

0cossin

0sincos

2121

2121

11

11

22

22

General Scaling Directions

Scaling factors sx and sy scale objects along the x and y directions

We scale an object in other directions with scaling factors s1 and s2

General Scaling Directions

Concatenation Properties

Matrix multiplication is associative

AmiddotB middotC = (AmiddotB )middotC = Amiddot(B middotC) Transformation products may not be commutative

Be careful about the order in which the composite matrix is evaluated

Except for some special cases Two successive rotations Two successive translations Two successive scaling rotation and uniform scaling

Concatenation Properties

Reversing the order A sequence of transformations is performed may affect

the transformed position of an object

Reflection

A transformation produces a mirror image of an object Axis of reflection

A line in the xy plane A line perpendicular to the xy plane The mirror image is obtained by rotating the object

1800 about the reflection axis Rotation path

Axis in xy plane in a plane perpendicular to the xy plane

Axis perpendicular to xy plane in the xy plane

Page 2: Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.

Two-Dimensional Geometric Transformations

bull Basic Transformations bull Translation bull Rotation bull Scaling

bull Composite Transformations

bull Other transformations bull Reflection bull Shear

Transformation include change in size shape amp orientation

Translation

bull Translation transformation

bull Translation vector or shift vector T = (tx ty)

bull Rigid-body transformationbull Moves objects without deformation

xtxx ytyy

y

xp

PrsquoT

y

x

T

Matrix Representation

Translation matrix

Row vector representation

P = (x y)T = (tx ty)P = (x y)

Prsquo= (xrsquo yrsquo) Prsquo = P + T

x lsquo = x + txyrsquo = y + ty

Rotation

Repositioning along a circular path in the xy plane y

xr

yr ө

P

Prsquo

(xr yr) is the rotation point ө is the rotation angle

Rotation

Rotation transformation

xrsquo=rcos(φ+θ)= rcos φ cos θ -rsin φ sin θ

yrsquo=rsin(φ + θ)= rcos φ sin θ +rsin φ cos θ

x=rcos φ y=rsin φ

Prsquo= R P

cossin

sincosR

xrsquo = x cos ө - y sin ө

yrsquo = x sin ө + y Cos ө rr

Φ

ө

Prsquo

P

(xrsquo yrsquo)

(x y)

(xrsquoyrsquo)

(xryr)

ө Φ

Rotation about arbitrary pivot point position

xrsquo = xr + (x - xr) cosө - (y ndash yr) sin ө

yrsquo = yr + (x - xr) sin ө - (y ndash yr) cos ө

General Pivot-Point Rotation

bull Rotations about any selected pivot point (xryr)

bull Translate-rotate-translate

General Pivot Point Rotation

To rotate about P1 (x1y1) the following sequence of the fundamental transformations are needed

1Translate the object by (-x1 -y1) 2Rotate (Oslash)3Translate the object by (x1 y1)

General Pivot-Point Rotation

100

10

01

100

0cossin

0sincos

100

10

01

r

r

r

r

y

x

y

x

100

sin)cos1(cossin

sin)cos1(sincos

rr

rr

xy

yx

)()()()( rrrrrr yxRyxTRyxT

Scaling

Alters the size of an object Scaling an object is implemented by

scaling the X and Y coordinates of each vertex in the object

Scaling

Scaling transformation

Scaling factors sx and sy

Uniform scaling if sx = sy

xsxx

ysyy

y

x

s

s

y

x

y

x

0

0

PSP

x

y

x

y2xs1ys

Matrix Representations and Homogeneous Coordinates- allow all transformations as matrix

multiplications

bull Homogeneous Coordinates

bull Matrix representations bull Translation

)()( hyxyx hh h

xx h

h

yy h

1100

10

01

1

y

x

t

t

y

x

y

x

h =1 for 2 D transformations

Matrix Representations

Matrix representations Scaling

Rotation

1100

00

00

1

y

x

s

s

y

x

y

x

1100

0cossin

0sincos

1

y

x

y

x

Composite Transformations-sequence of transformations

Translations

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

)()( 1122 PttTttTP yxyx

PttTttT yxyx )()( 1122

)()()( 21211122 yyxxyxyx ttttTttTttT

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

Composite Transformations

Scaling

100

00

00

100

00

00

100

00

00

21

21

1

1

2

2

yy

xx

y

x

y

x

ss

ss

s

s

s

s

)()()( 21211122 yyxxyxyx ssssSssSssS

Composite Transformations

Rotations )()( 12 PRRP

PRR )()( 12

)()()( 2112 RRR

100

0)cos()sin(

0)sin()cos(

100

0cossin

0sincos

100

0cossin

0sincos

2121

2121

11

11

22

22

General Scaling Directions

Scaling factors sx and sy scale objects along the x and y directions

We scale an object in other directions with scaling factors s1 and s2

General Scaling Directions

Concatenation Properties

Matrix multiplication is associative

AmiddotB middotC = (AmiddotB )middotC = Amiddot(B middotC) Transformation products may not be commutative

Be careful about the order in which the composite matrix is evaluated

Except for some special cases Two successive rotations Two successive translations Two successive scaling rotation and uniform scaling

Concatenation Properties

Reversing the order A sequence of transformations is performed may affect

the transformed position of an object

Reflection

A transformation produces a mirror image of an object Axis of reflection

A line in the xy plane A line perpendicular to the xy plane The mirror image is obtained by rotating the object

1800 about the reflection axis Rotation path

Axis in xy plane in a plane perpendicular to the xy plane

Axis perpendicular to xy plane in the xy plane

Page 3: Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.

Translation

bull Translation transformation

bull Translation vector or shift vector T = (tx ty)

bull Rigid-body transformationbull Moves objects without deformation

xtxx ytyy

y

xp

PrsquoT

y

x

T

Matrix Representation

Translation matrix

Row vector representation

P = (x y)T = (tx ty)P = (x y)

Prsquo= (xrsquo yrsquo) Prsquo = P + T

x lsquo = x + txyrsquo = y + ty

Rotation

Repositioning along a circular path in the xy plane y

xr

yr ө

P

Prsquo

(xr yr) is the rotation point ө is the rotation angle

Rotation

Rotation transformation

xrsquo=rcos(φ+θ)= rcos φ cos θ -rsin φ sin θ

yrsquo=rsin(φ + θ)= rcos φ sin θ +rsin φ cos θ

x=rcos φ y=rsin φ

Prsquo= R P

cossin

sincosR

xrsquo = x cos ө - y sin ө

yrsquo = x sin ө + y Cos ө rr

Φ

ө

Prsquo

P

(xrsquo yrsquo)

(x y)

(xrsquoyrsquo)

(xryr)

ө Φ

Rotation about arbitrary pivot point position

xrsquo = xr + (x - xr) cosө - (y ndash yr) sin ө

yrsquo = yr + (x - xr) sin ө - (y ndash yr) cos ө

General Pivot-Point Rotation

bull Rotations about any selected pivot point (xryr)

bull Translate-rotate-translate

General Pivot Point Rotation

To rotate about P1 (x1y1) the following sequence of the fundamental transformations are needed

1Translate the object by (-x1 -y1) 2Rotate (Oslash)3Translate the object by (x1 y1)

General Pivot-Point Rotation

100

10

01

100

0cossin

0sincos

100

10

01

r

r

r

r

y

x

y

x

100

sin)cos1(cossin

sin)cos1(sincos

rr

rr

xy

yx

)()()()( rrrrrr yxRyxTRyxT

Scaling

Alters the size of an object Scaling an object is implemented by

scaling the X and Y coordinates of each vertex in the object

Scaling

Scaling transformation

Scaling factors sx and sy

Uniform scaling if sx = sy

xsxx

ysyy

y

x

s

s

y

x

y

x

0

0

PSP

x

y

x

y2xs1ys

Matrix Representations and Homogeneous Coordinates- allow all transformations as matrix

multiplications

bull Homogeneous Coordinates

bull Matrix representations bull Translation

)()( hyxyx hh h

xx h

h

yy h

1100

10

01

1

y

x

t

t

y

x

y

x

h =1 for 2 D transformations

Matrix Representations

Matrix representations Scaling

Rotation

1100

00

00

1

y

x

s

s

y

x

y

x

1100

0cossin

0sincos

1

y

x

y

x

Composite Transformations-sequence of transformations

Translations

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

)()( 1122 PttTttTP yxyx

PttTttT yxyx )()( 1122

)()()( 21211122 yyxxyxyx ttttTttTttT

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

Composite Transformations

Scaling

100

00

00

100

00

00

100

00

00

21

21

1

1

2

2

yy

xx

y

x

y

x

ss

ss

s

s

s

s

)()()( 21211122 yyxxyxyx ssssSssSssS

Composite Transformations

Rotations )()( 12 PRRP

PRR )()( 12

)()()( 2112 RRR

100

0)cos()sin(

0)sin()cos(

100

0cossin

0sincos

100

0cossin

0sincos

2121

2121

11

11

22

22

General Scaling Directions

Scaling factors sx and sy scale objects along the x and y directions

We scale an object in other directions with scaling factors s1 and s2

General Scaling Directions

Concatenation Properties

Matrix multiplication is associative

AmiddotB middotC = (AmiddotB )middotC = Amiddot(B middotC) Transformation products may not be commutative

Be careful about the order in which the composite matrix is evaluated

Except for some special cases Two successive rotations Two successive translations Two successive scaling rotation and uniform scaling

Concatenation Properties

Reversing the order A sequence of transformations is performed may affect

the transformed position of an object

Reflection

A transformation produces a mirror image of an object Axis of reflection

A line in the xy plane A line perpendicular to the xy plane The mirror image is obtained by rotating the object

1800 about the reflection axis Rotation path

Axis in xy plane in a plane perpendicular to the xy plane

Axis perpendicular to xy plane in the xy plane

Page 4: Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.

Matrix Representation

Translation matrix

Row vector representation

P = (x y)T = (tx ty)P = (x y)

Prsquo= (xrsquo yrsquo) Prsquo = P + T

x lsquo = x + txyrsquo = y + ty

Rotation

Repositioning along a circular path in the xy plane y

xr

yr ө

P

Prsquo

(xr yr) is the rotation point ө is the rotation angle

Rotation

Rotation transformation

xrsquo=rcos(φ+θ)= rcos φ cos θ -rsin φ sin θ

yrsquo=rsin(φ + θ)= rcos φ sin θ +rsin φ cos θ

x=rcos φ y=rsin φ

Prsquo= R P

cossin

sincosR

xrsquo = x cos ө - y sin ө

yrsquo = x sin ө + y Cos ө rr

Φ

ө

Prsquo

P

(xrsquo yrsquo)

(x y)

(xrsquoyrsquo)

(xryr)

ө Φ

Rotation about arbitrary pivot point position

xrsquo = xr + (x - xr) cosө - (y ndash yr) sin ө

yrsquo = yr + (x - xr) sin ө - (y ndash yr) cos ө

General Pivot-Point Rotation

bull Rotations about any selected pivot point (xryr)

bull Translate-rotate-translate

General Pivot Point Rotation

To rotate about P1 (x1y1) the following sequence of the fundamental transformations are needed

1Translate the object by (-x1 -y1) 2Rotate (Oslash)3Translate the object by (x1 y1)

General Pivot-Point Rotation

100

10

01

100

0cossin

0sincos

100

10

01

r

r

r

r

y

x

y

x

100

sin)cos1(cossin

sin)cos1(sincos

rr

rr

xy

yx

)()()()( rrrrrr yxRyxTRyxT

Scaling

Alters the size of an object Scaling an object is implemented by

scaling the X and Y coordinates of each vertex in the object

Scaling

Scaling transformation

Scaling factors sx and sy

Uniform scaling if sx = sy

xsxx

ysyy

y

x

s

s

y

x

y

x

0

0

PSP

x

y

x

y2xs1ys

Matrix Representations and Homogeneous Coordinates- allow all transformations as matrix

multiplications

bull Homogeneous Coordinates

bull Matrix representations bull Translation

)()( hyxyx hh h

xx h

h

yy h

1100

10

01

1

y

x

t

t

y

x

y

x

h =1 for 2 D transformations

Matrix Representations

Matrix representations Scaling

Rotation

1100

00

00

1

y

x

s

s

y

x

y

x

1100

0cossin

0sincos

1

y

x

y

x

Composite Transformations-sequence of transformations

Translations

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

)()( 1122 PttTttTP yxyx

PttTttT yxyx )()( 1122

)()()( 21211122 yyxxyxyx ttttTttTttT

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

Composite Transformations

Scaling

100

00

00

100

00

00

100

00

00

21

21

1

1

2

2

yy

xx

y

x

y

x

ss

ss

s

s

s

s

)()()( 21211122 yyxxyxyx ssssSssSssS

Composite Transformations

Rotations )()( 12 PRRP

PRR )()( 12

)()()( 2112 RRR

100

0)cos()sin(

0)sin()cos(

100

0cossin

0sincos

100

0cossin

0sincos

2121

2121

11

11

22

22

General Scaling Directions

Scaling factors sx and sy scale objects along the x and y directions

We scale an object in other directions with scaling factors s1 and s2

General Scaling Directions

Concatenation Properties

Matrix multiplication is associative

AmiddotB middotC = (AmiddotB )middotC = Amiddot(B middotC) Transformation products may not be commutative

Be careful about the order in which the composite matrix is evaluated

Except for some special cases Two successive rotations Two successive translations Two successive scaling rotation and uniform scaling

Concatenation Properties

Reversing the order A sequence of transformations is performed may affect

the transformed position of an object

Reflection

A transformation produces a mirror image of an object Axis of reflection

A line in the xy plane A line perpendicular to the xy plane The mirror image is obtained by rotating the object

1800 about the reflection axis Rotation path

Axis in xy plane in a plane perpendicular to the xy plane

Axis perpendicular to xy plane in the xy plane

Page 5: Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.

Rotation

Repositioning along a circular path in the xy plane y

xr

yr ө

P

Prsquo

(xr yr) is the rotation point ө is the rotation angle

Rotation

Rotation transformation

xrsquo=rcos(φ+θ)= rcos φ cos θ -rsin φ sin θ

yrsquo=rsin(φ + θ)= rcos φ sin θ +rsin φ cos θ

x=rcos φ y=rsin φ

Prsquo= R P

cossin

sincosR

xrsquo = x cos ө - y sin ө

yrsquo = x sin ө + y Cos ө rr

Φ

ө

Prsquo

P

(xrsquo yrsquo)

(x y)

(xrsquoyrsquo)

(xryr)

ө Φ

Rotation about arbitrary pivot point position

xrsquo = xr + (x - xr) cosө - (y ndash yr) sin ө

yrsquo = yr + (x - xr) sin ө - (y ndash yr) cos ө

General Pivot-Point Rotation

bull Rotations about any selected pivot point (xryr)

bull Translate-rotate-translate

General Pivot Point Rotation

To rotate about P1 (x1y1) the following sequence of the fundamental transformations are needed

1Translate the object by (-x1 -y1) 2Rotate (Oslash)3Translate the object by (x1 y1)

General Pivot-Point Rotation

100

10

01

100

0cossin

0sincos

100

10

01

r

r

r

r

y

x

y

x

100

sin)cos1(cossin

sin)cos1(sincos

rr

rr

xy

yx

)()()()( rrrrrr yxRyxTRyxT

Scaling

Alters the size of an object Scaling an object is implemented by

scaling the X and Y coordinates of each vertex in the object

Scaling

Scaling transformation

Scaling factors sx and sy

Uniform scaling if sx = sy

xsxx

ysyy

y

x

s

s

y

x

y

x

0

0

PSP

x

y

x

y2xs1ys

Matrix Representations and Homogeneous Coordinates- allow all transformations as matrix

multiplications

bull Homogeneous Coordinates

bull Matrix representations bull Translation

)()( hyxyx hh h

xx h

h

yy h

1100

10

01

1

y

x

t

t

y

x

y

x

h =1 for 2 D transformations

Matrix Representations

Matrix representations Scaling

Rotation

1100

00

00

1

y

x

s

s

y

x

y

x

1100

0cossin

0sincos

1

y

x

y

x

Composite Transformations-sequence of transformations

Translations

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

)()( 1122 PttTttTP yxyx

PttTttT yxyx )()( 1122

)()()( 21211122 yyxxyxyx ttttTttTttT

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

Composite Transformations

Scaling

100

00

00

100

00

00

100

00

00

21

21

1

1

2

2

yy

xx

y

x

y

x

ss

ss

s

s

s

s

)()()( 21211122 yyxxyxyx ssssSssSssS

Composite Transformations

Rotations )()( 12 PRRP

PRR )()( 12

)()()( 2112 RRR

100

0)cos()sin(

0)sin()cos(

100

0cossin

0sincos

100

0cossin

0sincos

2121

2121

11

11

22

22

General Scaling Directions

Scaling factors sx and sy scale objects along the x and y directions

We scale an object in other directions with scaling factors s1 and s2

General Scaling Directions

Concatenation Properties

Matrix multiplication is associative

AmiddotB middotC = (AmiddotB )middotC = Amiddot(B middotC) Transformation products may not be commutative

Be careful about the order in which the composite matrix is evaluated

Except for some special cases Two successive rotations Two successive translations Two successive scaling rotation and uniform scaling

Concatenation Properties

Reversing the order A sequence of transformations is performed may affect

the transformed position of an object

Reflection

A transformation produces a mirror image of an object Axis of reflection

A line in the xy plane A line perpendicular to the xy plane The mirror image is obtained by rotating the object

1800 about the reflection axis Rotation path

Axis in xy plane in a plane perpendicular to the xy plane

Axis perpendicular to xy plane in the xy plane

Page 6: Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.

Rotation

Rotation transformation

xrsquo=rcos(φ+θ)= rcos φ cos θ -rsin φ sin θ

yrsquo=rsin(φ + θ)= rcos φ sin θ +rsin φ cos θ

x=rcos φ y=rsin φ

Prsquo= R P

cossin

sincosR

xrsquo = x cos ө - y sin ө

yrsquo = x sin ө + y Cos ө rr

Φ

ө

Prsquo

P

(xrsquo yrsquo)

(x y)

(xrsquoyrsquo)

(xryr)

ө Φ

Rotation about arbitrary pivot point position

xrsquo = xr + (x - xr) cosө - (y ndash yr) sin ө

yrsquo = yr + (x - xr) sin ө - (y ndash yr) cos ө

General Pivot-Point Rotation

bull Rotations about any selected pivot point (xryr)

bull Translate-rotate-translate

General Pivot Point Rotation

To rotate about P1 (x1y1) the following sequence of the fundamental transformations are needed

1Translate the object by (-x1 -y1) 2Rotate (Oslash)3Translate the object by (x1 y1)

General Pivot-Point Rotation

100

10

01

100

0cossin

0sincos

100

10

01

r

r

r

r

y

x

y

x

100

sin)cos1(cossin

sin)cos1(sincos

rr

rr

xy

yx

)()()()( rrrrrr yxRyxTRyxT

Scaling

Alters the size of an object Scaling an object is implemented by

scaling the X and Y coordinates of each vertex in the object

Scaling

Scaling transformation

Scaling factors sx and sy

Uniform scaling if sx = sy

xsxx

ysyy

y

x

s

s

y

x

y

x

0

0

PSP

x

y

x

y2xs1ys

Matrix Representations and Homogeneous Coordinates- allow all transformations as matrix

multiplications

bull Homogeneous Coordinates

bull Matrix representations bull Translation

)()( hyxyx hh h

xx h

h

yy h

1100

10

01

1

y

x

t

t

y

x

y

x

h =1 for 2 D transformations

Matrix Representations

Matrix representations Scaling

Rotation

1100

00

00

1

y

x

s

s

y

x

y

x

1100

0cossin

0sincos

1

y

x

y

x

Composite Transformations-sequence of transformations

Translations

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

)()( 1122 PttTttTP yxyx

PttTttT yxyx )()( 1122

)()()( 21211122 yyxxyxyx ttttTttTttT

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

Composite Transformations

Scaling

100

00

00

100

00

00

100

00

00

21

21

1

1

2

2

yy

xx

y

x

y

x

ss

ss

s

s

s

s

)()()( 21211122 yyxxyxyx ssssSssSssS

Composite Transformations

Rotations )()( 12 PRRP

PRR )()( 12

)()()( 2112 RRR

100

0)cos()sin(

0)sin()cos(

100

0cossin

0sincos

100

0cossin

0sincos

2121

2121

11

11

22

22

General Scaling Directions

Scaling factors sx and sy scale objects along the x and y directions

We scale an object in other directions with scaling factors s1 and s2

General Scaling Directions

Concatenation Properties

Matrix multiplication is associative

AmiddotB middotC = (AmiddotB )middotC = Amiddot(B middotC) Transformation products may not be commutative

Be careful about the order in which the composite matrix is evaluated

Except for some special cases Two successive rotations Two successive translations Two successive scaling rotation and uniform scaling

Concatenation Properties

Reversing the order A sequence of transformations is performed may affect

the transformed position of an object

Reflection

A transformation produces a mirror image of an object Axis of reflection

A line in the xy plane A line perpendicular to the xy plane The mirror image is obtained by rotating the object

1800 about the reflection axis Rotation path

Axis in xy plane in a plane perpendicular to the xy plane

Axis perpendicular to xy plane in the xy plane

Page 7: Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.

(xrsquoyrsquo)

(xryr)

ө Φ

Rotation about arbitrary pivot point position

xrsquo = xr + (x - xr) cosө - (y ndash yr) sin ө

yrsquo = yr + (x - xr) sin ө - (y ndash yr) cos ө

General Pivot-Point Rotation

bull Rotations about any selected pivot point (xryr)

bull Translate-rotate-translate

General Pivot Point Rotation

To rotate about P1 (x1y1) the following sequence of the fundamental transformations are needed

1Translate the object by (-x1 -y1) 2Rotate (Oslash)3Translate the object by (x1 y1)

General Pivot-Point Rotation

100

10

01

100

0cossin

0sincos

100

10

01

r

r

r

r

y

x

y

x

100

sin)cos1(cossin

sin)cos1(sincos

rr

rr

xy

yx

)()()()( rrrrrr yxRyxTRyxT

Scaling

Alters the size of an object Scaling an object is implemented by

scaling the X and Y coordinates of each vertex in the object

Scaling

Scaling transformation

Scaling factors sx and sy

Uniform scaling if sx = sy

xsxx

ysyy

y

x

s

s

y

x

y

x

0

0

PSP

x

y

x

y2xs1ys

Matrix Representations and Homogeneous Coordinates- allow all transformations as matrix

multiplications

bull Homogeneous Coordinates

bull Matrix representations bull Translation

)()( hyxyx hh h

xx h

h

yy h

1100

10

01

1

y

x

t

t

y

x

y

x

h =1 for 2 D transformations

Matrix Representations

Matrix representations Scaling

Rotation

1100

00

00

1

y

x

s

s

y

x

y

x

1100

0cossin

0sincos

1

y

x

y

x

Composite Transformations-sequence of transformations

Translations

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

)()( 1122 PttTttTP yxyx

PttTttT yxyx )()( 1122

)()()( 21211122 yyxxyxyx ttttTttTttT

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

Composite Transformations

Scaling

100

00

00

100

00

00

100

00

00

21

21

1

1

2

2

yy

xx

y

x

y

x

ss

ss

s

s

s

s

)()()( 21211122 yyxxyxyx ssssSssSssS

Composite Transformations

Rotations )()( 12 PRRP

PRR )()( 12

)()()( 2112 RRR

100

0)cos()sin(

0)sin()cos(

100

0cossin

0sincos

100

0cossin

0sincos

2121

2121

11

11

22

22

General Scaling Directions

Scaling factors sx and sy scale objects along the x and y directions

We scale an object in other directions with scaling factors s1 and s2

General Scaling Directions

Concatenation Properties

Matrix multiplication is associative

AmiddotB middotC = (AmiddotB )middotC = Amiddot(B middotC) Transformation products may not be commutative

Be careful about the order in which the composite matrix is evaluated

Except for some special cases Two successive rotations Two successive translations Two successive scaling rotation and uniform scaling

Concatenation Properties

Reversing the order A sequence of transformations is performed may affect

the transformed position of an object

Reflection

A transformation produces a mirror image of an object Axis of reflection

A line in the xy plane A line perpendicular to the xy plane The mirror image is obtained by rotating the object

1800 about the reflection axis Rotation path

Axis in xy plane in a plane perpendicular to the xy plane

Axis perpendicular to xy plane in the xy plane

Page 8: Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.

General Pivot-Point Rotation

bull Rotations about any selected pivot point (xryr)

bull Translate-rotate-translate

General Pivot Point Rotation

To rotate about P1 (x1y1) the following sequence of the fundamental transformations are needed

1Translate the object by (-x1 -y1) 2Rotate (Oslash)3Translate the object by (x1 y1)

General Pivot-Point Rotation

100

10

01

100

0cossin

0sincos

100

10

01

r

r

r

r

y

x

y

x

100

sin)cos1(cossin

sin)cos1(sincos

rr

rr

xy

yx

)()()()( rrrrrr yxRyxTRyxT

Scaling

Alters the size of an object Scaling an object is implemented by

scaling the X and Y coordinates of each vertex in the object

Scaling

Scaling transformation

Scaling factors sx and sy

Uniform scaling if sx = sy

xsxx

ysyy

y

x

s

s

y

x

y

x

0

0

PSP

x

y

x

y2xs1ys

Matrix Representations and Homogeneous Coordinates- allow all transformations as matrix

multiplications

bull Homogeneous Coordinates

bull Matrix representations bull Translation

)()( hyxyx hh h

xx h

h

yy h

1100

10

01

1

y

x

t

t

y

x

y

x

h =1 for 2 D transformations

Matrix Representations

Matrix representations Scaling

Rotation

1100

00

00

1

y

x

s

s

y

x

y

x

1100

0cossin

0sincos

1

y

x

y

x

Composite Transformations-sequence of transformations

Translations

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

)()( 1122 PttTttTP yxyx

PttTttT yxyx )()( 1122

)()()( 21211122 yyxxyxyx ttttTttTttT

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

Composite Transformations

Scaling

100

00

00

100

00

00

100

00

00

21

21

1

1

2

2

yy

xx

y

x

y

x

ss

ss

s

s

s

s

)()()( 21211122 yyxxyxyx ssssSssSssS

Composite Transformations

Rotations )()( 12 PRRP

PRR )()( 12

)()()( 2112 RRR

100

0)cos()sin(

0)sin()cos(

100

0cossin

0sincos

100

0cossin

0sincos

2121

2121

11

11

22

22

General Scaling Directions

Scaling factors sx and sy scale objects along the x and y directions

We scale an object in other directions with scaling factors s1 and s2

General Scaling Directions

Concatenation Properties

Matrix multiplication is associative

AmiddotB middotC = (AmiddotB )middotC = Amiddot(B middotC) Transformation products may not be commutative

Be careful about the order in which the composite matrix is evaluated

Except for some special cases Two successive rotations Two successive translations Two successive scaling rotation and uniform scaling

Concatenation Properties

Reversing the order A sequence of transformations is performed may affect

the transformed position of an object

Reflection

A transformation produces a mirror image of an object Axis of reflection

A line in the xy plane A line perpendicular to the xy plane The mirror image is obtained by rotating the object

1800 about the reflection axis Rotation path

Axis in xy plane in a plane perpendicular to the xy plane

Axis perpendicular to xy plane in the xy plane

Page 9: Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.

General Pivot Point Rotation

To rotate about P1 (x1y1) the following sequence of the fundamental transformations are needed

1Translate the object by (-x1 -y1) 2Rotate (Oslash)3Translate the object by (x1 y1)

General Pivot-Point Rotation

100

10

01

100

0cossin

0sincos

100

10

01

r

r

r

r

y

x

y

x

100

sin)cos1(cossin

sin)cos1(sincos

rr

rr

xy

yx

)()()()( rrrrrr yxRyxTRyxT

Scaling

Alters the size of an object Scaling an object is implemented by

scaling the X and Y coordinates of each vertex in the object

Scaling

Scaling transformation

Scaling factors sx and sy

Uniform scaling if sx = sy

xsxx

ysyy

y

x

s

s

y

x

y

x

0

0

PSP

x

y

x

y2xs1ys

Matrix Representations and Homogeneous Coordinates- allow all transformations as matrix

multiplications

bull Homogeneous Coordinates

bull Matrix representations bull Translation

)()( hyxyx hh h

xx h

h

yy h

1100

10

01

1

y

x

t

t

y

x

y

x

h =1 for 2 D transformations

Matrix Representations

Matrix representations Scaling

Rotation

1100

00

00

1

y

x

s

s

y

x

y

x

1100

0cossin

0sincos

1

y

x

y

x

Composite Transformations-sequence of transformations

Translations

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

)()( 1122 PttTttTP yxyx

PttTttT yxyx )()( 1122

)()()( 21211122 yyxxyxyx ttttTttTttT

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

Composite Transformations

Scaling

100

00

00

100

00

00

100

00

00

21

21

1

1

2

2

yy

xx

y

x

y

x

ss

ss

s

s

s

s

)()()( 21211122 yyxxyxyx ssssSssSssS

Composite Transformations

Rotations )()( 12 PRRP

PRR )()( 12

)()()( 2112 RRR

100

0)cos()sin(

0)sin()cos(

100

0cossin

0sincos

100

0cossin

0sincos

2121

2121

11

11

22

22

General Scaling Directions

Scaling factors sx and sy scale objects along the x and y directions

We scale an object in other directions with scaling factors s1 and s2

General Scaling Directions

Concatenation Properties

Matrix multiplication is associative

AmiddotB middotC = (AmiddotB )middotC = Amiddot(B middotC) Transformation products may not be commutative

Be careful about the order in which the composite matrix is evaluated

Except for some special cases Two successive rotations Two successive translations Two successive scaling rotation and uniform scaling

Concatenation Properties

Reversing the order A sequence of transformations is performed may affect

the transformed position of an object

Reflection

A transformation produces a mirror image of an object Axis of reflection

A line in the xy plane A line perpendicular to the xy plane The mirror image is obtained by rotating the object

1800 about the reflection axis Rotation path

Axis in xy plane in a plane perpendicular to the xy plane

Axis perpendicular to xy plane in the xy plane

Page 10: Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.

To rotate about P1 (x1y1) the following sequence of the fundamental transformations are needed

1Translate the object by (-x1 -y1) 2Rotate (Oslash)3Translate the object by (x1 y1)

General Pivot-Point Rotation

100

10

01

100

0cossin

0sincos

100

10

01

r

r

r

r

y

x

y

x

100

sin)cos1(cossin

sin)cos1(sincos

rr

rr

xy

yx

)()()()( rrrrrr yxRyxTRyxT

Scaling

Alters the size of an object Scaling an object is implemented by

scaling the X and Y coordinates of each vertex in the object

Scaling

Scaling transformation

Scaling factors sx and sy

Uniform scaling if sx = sy

xsxx

ysyy

y

x

s

s

y

x

y

x

0

0

PSP

x

y

x

y2xs1ys

Matrix Representations and Homogeneous Coordinates- allow all transformations as matrix

multiplications

bull Homogeneous Coordinates

bull Matrix representations bull Translation

)()( hyxyx hh h

xx h

h

yy h

1100

10

01

1

y

x

t

t

y

x

y

x

h =1 for 2 D transformations

Matrix Representations

Matrix representations Scaling

Rotation

1100

00

00

1

y

x

s

s

y

x

y

x

1100

0cossin

0sincos

1

y

x

y

x

Composite Transformations-sequence of transformations

Translations

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

)()( 1122 PttTttTP yxyx

PttTttT yxyx )()( 1122

)()()( 21211122 yyxxyxyx ttttTttTttT

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

Composite Transformations

Scaling

100

00

00

100

00

00

100

00

00

21

21

1

1

2

2

yy

xx

y

x

y

x

ss

ss

s

s

s

s

)()()( 21211122 yyxxyxyx ssssSssSssS

Composite Transformations

Rotations )()( 12 PRRP

PRR )()( 12

)()()( 2112 RRR

100

0)cos()sin(

0)sin()cos(

100

0cossin

0sincos

100

0cossin

0sincos

2121

2121

11

11

22

22

General Scaling Directions

Scaling factors sx and sy scale objects along the x and y directions

We scale an object in other directions with scaling factors s1 and s2

General Scaling Directions

Concatenation Properties

Matrix multiplication is associative

AmiddotB middotC = (AmiddotB )middotC = Amiddot(B middotC) Transformation products may not be commutative

Be careful about the order in which the composite matrix is evaluated

Except for some special cases Two successive rotations Two successive translations Two successive scaling rotation and uniform scaling

Concatenation Properties

Reversing the order A sequence of transformations is performed may affect

the transformed position of an object

Reflection

A transformation produces a mirror image of an object Axis of reflection

A line in the xy plane A line perpendicular to the xy plane The mirror image is obtained by rotating the object

1800 about the reflection axis Rotation path

Axis in xy plane in a plane perpendicular to the xy plane

Axis perpendicular to xy plane in the xy plane

Page 11: Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.

General Pivot-Point Rotation

100

10

01

100

0cossin

0sincos

100

10

01

r

r

r

r

y

x

y

x

100

sin)cos1(cossin

sin)cos1(sincos

rr

rr

xy

yx

)()()()( rrrrrr yxRyxTRyxT

Scaling

Alters the size of an object Scaling an object is implemented by

scaling the X and Y coordinates of each vertex in the object

Scaling

Scaling transformation

Scaling factors sx and sy

Uniform scaling if sx = sy

xsxx

ysyy

y

x

s

s

y

x

y

x

0

0

PSP

x

y

x

y2xs1ys

Matrix Representations and Homogeneous Coordinates- allow all transformations as matrix

multiplications

bull Homogeneous Coordinates

bull Matrix representations bull Translation

)()( hyxyx hh h

xx h

h

yy h

1100

10

01

1

y

x

t

t

y

x

y

x

h =1 for 2 D transformations

Matrix Representations

Matrix representations Scaling

Rotation

1100

00

00

1

y

x

s

s

y

x

y

x

1100

0cossin

0sincos

1

y

x

y

x

Composite Transformations-sequence of transformations

Translations

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

)()( 1122 PttTttTP yxyx

PttTttT yxyx )()( 1122

)()()( 21211122 yyxxyxyx ttttTttTttT

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

Composite Transformations

Scaling

100

00

00

100

00

00

100

00

00

21

21

1

1

2

2

yy

xx

y

x

y

x

ss

ss

s

s

s

s

)()()( 21211122 yyxxyxyx ssssSssSssS

Composite Transformations

Rotations )()( 12 PRRP

PRR )()( 12

)()()( 2112 RRR

100

0)cos()sin(

0)sin()cos(

100

0cossin

0sincos

100

0cossin

0sincos

2121

2121

11

11

22

22

General Scaling Directions

Scaling factors sx and sy scale objects along the x and y directions

We scale an object in other directions with scaling factors s1 and s2

General Scaling Directions

Concatenation Properties

Matrix multiplication is associative

AmiddotB middotC = (AmiddotB )middotC = Amiddot(B middotC) Transformation products may not be commutative

Be careful about the order in which the composite matrix is evaluated

Except for some special cases Two successive rotations Two successive translations Two successive scaling rotation and uniform scaling

Concatenation Properties

Reversing the order A sequence of transformations is performed may affect

the transformed position of an object

Reflection

A transformation produces a mirror image of an object Axis of reflection

A line in the xy plane A line perpendicular to the xy plane The mirror image is obtained by rotating the object

1800 about the reflection axis Rotation path

Axis in xy plane in a plane perpendicular to the xy plane

Axis perpendicular to xy plane in the xy plane

Page 12: Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.

Scaling

Alters the size of an object Scaling an object is implemented by

scaling the X and Y coordinates of each vertex in the object

Scaling

Scaling transformation

Scaling factors sx and sy

Uniform scaling if sx = sy

xsxx

ysyy

y

x

s

s

y

x

y

x

0

0

PSP

x

y

x

y2xs1ys

Matrix Representations and Homogeneous Coordinates- allow all transformations as matrix

multiplications

bull Homogeneous Coordinates

bull Matrix representations bull Translation

)()( hyxyx hh h

xx h

h

yy h

1100

10

01

1

y

x

t

t

y

x

y

x

h =1 for 2 D transformations

Matrix Representations

Matrix representations Scaling

Rotation

1100

00

00

1

y

x

s

s

y

x

y

x

1100

0cossin

0sincos

1

y

x

y

x

Composite Transformations-sequence of transformations

Translations

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

)()( 1122 PttTttTP yxyx

PttTttT yxyx )()( 1122

)()()( 21211122 yyxxyxyx ttttTttTttT

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

Composite Transformations

Scaling

100

00

00

100

00

00

100

00

00

21

21

1

1

2

2

yy

xx

y

x

y

x

ss

ss

s

s

s

s

)()()( 21211122 yyxxyxyx ssssSssSssS

Composite Transformations

Rotations )()( 12 PRRP

PRR )()( 12

)()()( 2112 RRR

100

0)cos()sin(

0)sin()cos(

100

0cossin

0sincos

100

0cossin

0sincos

2121

2121

11

11

22

22

General Scaling Directions

Scaling factors sx and sy scale objects along the x and y directions

We scale an object in other directions with scaling factors s1 and s2

General Scaling Directions

Concatenation Properties

Matrix multiplication is associative

AmiddotB middotC = (AmiddotB )middotC = Amiddot(B middotC) Transformation products may not be commutative

Be careful about the order in which the composite matrix is evaluated

Except for some special cases Two successive rotations Two successive translations Two successive scaling rotation and uniform scaling

Concatenation Properties

Reversing the order A sequence of transformations is performed may affect

the transformed position of an object

Reflection

A transformation produces a mirror image of an object Axis of reflection

A line in the xy plane A line perpendicular to the xy plane The mirror image is obtained by rotating the object

1800 about the reflection axis Rotation path

Axis in xy plane in a plane perpendicular to the xy plane

Axis perpendicular to xy plane in the xy plane

Page 13: Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.

Scaling

Scaling transformation

Scaling factors sx and sy

Uniform scaling if sx = sy

xsxx

ysyy

y

x

s

s

y

x

y

x

0

0

PSP

x

y

x

y2xs1ys

Matrix Representations and Homogeneous Coordinates- allow all transformations as matrix

multiplications

bull Homogeneous Coordinates

bull Matrix representations bull Translation

)()( hyxyx hh h

xx h

h

yy h

1100

10

01

1

y

x

t

t

y

x

y

x

h =1 for 2 D transformations

Matrix Representations

Matrix representations Scaling

Rotation

1100

00

00

1

y

x

s

s

y

x

y

x

1100

0cossin

0sincos

1

y

x

y

x

Composite Transformations-sequence of transformations

Translations

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

)()( 1122 PttTttTP yxyx

PttTttT yxyx )()( 1122

)()()( 21211122 yyxxyxyx ttttTttTttT

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

Composite Transformations

Scaling

100

00

00

100

00

00

100

00

00

21

21

1

1

2

2

yy

xx

y

x

y

x

ss

ss

s

s

s

s

)()()( 21211122 yyxxyxyx ssssSssSssS

Composite Transformations

Rotations )()( 12 PRRP

PRR )()( 12

)()()( 2112 RRR

100

0)cos()sin(

0)sin()cos(

100

0cossin

0sincos

100

0cossin

0sincos

2121

2121

11

11

22

22

General Scaling Directions

Scaling factors sx and sy scale objects along the x and y directions

We scale an object in other directions with scaling factors s1 and s2

General Scaling Directions

Concatenation Properties

Matrix multiplication is associative

AmiddotB middotC = (AmiddotB )middotC = Amiddot(B middotC) Transformation products may not be commutative

Be careful about the order in which the composite matrix is evaluated

Except for some special cases Two successive rotations Two successive translations Two successive scaling rotation and uniform scaling

Concatenation Properties

Reversing the order A sequence of transformations is performed may affect

the transformed position of an object

Reflection

A transformation produces a mirror image of an object Axis of reflection

A line in the xy plane A line perpendicular to the xy plane The mirror image is obtained by rotating the object

1800 about the reflection axis Rotation path

Axis in xy plane in a plane perpendicular to the xy plane

Axis perpendicular to xy plane in the xy plane

Page 14: Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.

Matrix Representations and Homogeneous Coordinates- allow all transformations as matrix

multiplications

bull Homogeneous Coordinates

bull Matrix representations bull Translation

)()( hyxyx hh h

xx h

h

yy h

1100

10

01

1

y

x

t

t

y

x

y

x

h =1 for 2 D transformations

Matrix Representations

Matrix representations Scaling

Rotation

1100

00

00

1

y

x

s

s

y

x

y

x

1100

0cossin

0sincos

1

y

x

y

x

Composite Transformations-sequence of transformations

Translations

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

)()( 1122 PttTttTP yxyx

PttTttT yxyx )()( 1122

)()()( 21211122 yyxxyxyx ttttTttTttT

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

Composite Transformations

Scaling

100

00

00

100

00

00

100

00

00

21

21

1

1

2

2

yy

xx

y

x

y

x

ss

ss

s

s

s

s

)()()( 21211122 yyxxyxyx ssssSssSssS

Composite Transformations

Rotations )()( 12 PRRP

PRR )()( 12

)()()( 2112 RRR

100

0)cos()sin(

0)sin()cos(

100

0cossin

0sincos

100

0cossin

0sincos

2121

2121

11

11

22

22

General Scaling Directions

Scaling factors sx and sy scale objects along the x and y directions

We scale an object in other directions with scaling factors s1 and s2

General Scaling Directions

Concatenation Properties

Matrix multiplication is associative

AmiddotB middotC = (AmiddotB )middotC = Amiddot(B middotC) Transformation products may not be commutative

Be careful about the order in which the composite matrix is evaluated

Except for some special cases Two successive rotations Two successive translations Two successive scaling rotation and uniform scaling

Concatenation Properties

Reversing the order A sequence of transformations is performed may affect

the transformed position of an object

Reflection

A transformation produces a mirror image of an object Axis of reflection

A line in the xy plane A line perpendicular to the xy plane The mirror image is obtained by rotating the object

1800 about the reflection axis Rotation path

Axis in xy plane in a plane perpendicular to the xy plane

Axis perpendicular to xy plane in the xy plane

Page 15: Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.

Matrix Representations

Matrix representations Scaling

Rotation

1100

00

00

1

y

x

s

s

y

x

y

x

1100

0cossin

0sincos

1

y

x

y

x

Composite Transformations-sequence of transformations

Translations

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

)()( 1122 PttTttTP yxyx

PttTttT yxyx )()( 1122

)()()( 21211122 yyxxyxyx ttttTttTttT

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

Composite Transformations

Scaling

100

00

00

100

00

00

100

00

00

21

21

1

1

2

2

yy

xx

y

x

y

x

ss

ss

s

s

s

s

)()()( 21211122 yyxxyxyx ssssSssSssS

Composite Transformations

Rotations )()( 12 PRRP

PRR )()( 12

)()()( 2112 RRR

100

0)cos()sin(

0)sin()cos(

100

0cossin

0sincos

100

0cossin

0sincos

2121

2121

11

11

22

22

General Scaling Directions

Scaling factors sx and sy scale objects along the x and y directions

We scale an object in other directions with scaling factors s1 and s2

General Scaling Directions

Concatenation Properties

Matrix multiplication is associative

AmiddotB middotC = (AmiddotB )middotC = Amiddot(B middotC) Transformation products may not be commutative

Be careful about the order in which the composite matrix is evaluated

Except for some special cases Two successive rotations Two successive translations Two successive scaling rotation and uniform scaling

Concatenation Properties

Reversing the order A sequence of transformations is performed may affect

the transformed position of an object

Reflection

A transformation produces a mirror image of an object Axis of reflection

A line in the xy plane A line perpendicular to the xy plane The mirror image is obtained by rotating the object

1800 about the reflection axis Rotation path

Axis in xy plane in a plane perpendicular to the xy plane

Axis perpendicular to xy plane in the xy plane

Page 16: Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.

Composite Transformations-sequence of transformations

Translations

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

)()( 1122 PttTttTP yxyx

PttTttT yxyx )()( 1122

)()()( 21211122 yyxxyxyx ttttTttTttT

100

10

01

100

10

01

100

10

01

21

21

1

1

2

2

yy

xx

y

x

y

x

tt

tt

t

t

t

t

Composite Transformations

Scaling

100

00

00

100

00

00

100

00

00

21

21

1

1

2

2

yy

xx

y

x

y

x

ss

ss

s

s

s

s

)()()( 21211122 yyxxyxyx ssssSssSssS

Composite Transformations

Rotations )()( 12 PRRP

PRR )()( 12

)()()( 2112 RRR

100

0)cos()sin(

0)sin()cos(

100

0cossin

0sincos

100

0cossin

0sincos

2121

2121

11

11

22

22

General Scaling Directions

Scaling factors sx and sy scale objects along the x and y directions

We scale an object in other directions with scaling factors s1 and s2

General Scaling Directions

Concatenation Properties

Matrix multiplication is associative

AmiddotB middotC = (AmiddotB )middotC = Amiddot(B middotC) Transformation products may not be commutative

Be careful about the order in which the composite matrix is evaluated

Except for some special cases Two successive rotations Two successive translations Two successive scaling rotation and uniform scaling

Concatenation Properties

Reversing the order A sequence of transformations is performed may affect

the transformed position of an object

Reflection

A transformation produces a mirror image of an object Axis of reflection

A line in the xy plane A line perpendicular to the xy plane The mirror image is obtained by rotating the object

1800 about the reflection axis Rotation path

Axis in xy plane in a plane perpendicular to the xy plane

Axis perpendicular to xy plane in the xy plane

Page 17: Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.

Composite Transformations

Scaling

100

00

00

100

00

00

100

00

00

21

21

1

1

2

2

yy

xx

y

x

y

x

ss

ss

s

s

s

s

)()()( 21211122 yyxxyxyx ssssSssSssS

Composite Transformations

Rotations )()( 12 PRRP

PRR )()( 12

)()()( 2112 RRR

100

0)cos()sin(

0)sin()cos(

100

0cossin

0sincos

100

0cossin

0sincos

2121

2121

11

11

22

22

General Scaling Directions

Scaling factors sx and sy scale objects along the x and y directions

We scale an object in other directions with scaling factors s1 and s2

General Scaling Directions

Concatenation Properties

Matrix multiplication is associative

AmiddotB middotC = (AmiddotB )middotC = Amiddot(B middotC) Transformation products may not be commutative

Be careful about the order in which the composite matrix is evaluated

Except for some special cases Two successive rotations Two successive translations Two successive scaling rotation and uniform scaling

Concatenation Properties

Reversing the order A sequence of transformations is performed may affect

the transformed position of an object

Reflection

A transformation produces a mirror image of an object Axis of reflection

A line in the xy plane A line perpendicular to the xy plane The mirror image is obtained by rotating the object

1800 about the reflection axis Rotation path

Axis in xy plane in a plane perpendicular to the xy plane

Axis perpendicular to xy plane in the xy plane

Page 18: Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.

Composite Transformations

Rotations )()( 12 PRRP

PRR )()( 12

)()()( 2112 RRR

100

0)cos()sin(

0)sin()cos(

100

0cossin

0sincos

100

0cossin

0sincos

2121

2121

11

11

22

22

General Scaling Directions

Scaling factors sx and sy scale objects along the x and y directions

We scale an object in other directions with scaling factors s1 and s2

General Scaling Directions

Concatenation Properties

Matrix multiplication is associative

AmiddotB middotC = (AmiddotB )middotC = Amiddot(B middotC) Transformation products may not be commutative

Be careful about the order in which the composite matrix is evaluated

Except for some special cases Two successive rotations Two successive translations Two successive scaling rotation and uniform scaling

Concatenation Properties

Reversing the order A sequence of transformations is performed may affect

the transformed position of an object

Reflection

A transformation produces a mirror image of an object Axis of reflection

A line in the xy plane A line perpendicular to the xy plane The mirror image is obtained by rotating the object

1800 about the reflection axis Rotation path

Axis in xy plane in a plane perpendicular to the xy plane

Axis perpendicular to xy plane in the xy plane

Page 19: Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.

General Scaling Directions

Scaling factors sx and sy scale objects along the x and y directions

We scale an object in other directions with scaling factors s1 and s2

General Scaling Directions

Concatenation Properties

Matrix multiplication is associative

AmiddotB middotC = (AmiddotB )middotC = Amiddot(B middotC) Transformation products may not be commutative

Be careful about the order in which the composite matrix is evaluated

Except for some special cases Two successive rotations Two successive translations Two successive scaling rotation and uniform scaling

Concatenation Properties

Reversing the order A sequence of transformations is performed may affect

the transformed position of an object

Reflection

A transformation produces a mirror image of an object Axis of reflection

A line in the xy plane A line perpendicular to the xy plane The mirror image is obtained by rotating the object

1800 about the reflection axis Rotation path

Axis in xy plane in a plane perpendicular to the xy plane

Axis perpendicular to xy plane in the xy plane

Page 20: Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.

General Scaling Directions

Concatenation Properties

Matrix multiplication is associative

AmiddotB middotC = (AmiddotB )middotC = Amiddot(B middotC) Transformation products may not be commutative

Be careful about the order in which the composite matrix is evaluated

Except for some special cases Two successive rotations Two successive translations Two successive scaling rotation and uniform scaling

Concatenation Properties

Reversing the order A sequence of transformations is performed may affect

the transformed position of an object

Reflection

A transformation produces a mirror image of an object Axis of reflection

A line in the xy plane A line perpendicular to the xy plane The mirror image is obtained by rotating the object

1800 about the reflection axis Rotation path

Axis in xy plane in a plane perpendicular to the xy plane

Axis perpendicular to xy plane in the xy plane

Page 21: Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.

Concatenation Properties

Matrix multiplication is associative

AmiddotB middotC = (AmiddotB )middotC = Amiddot(B middotC) Transformation products may not be commutative

Be careful about the order in which the composite matrix is evaluated

Except for some special cases Two successive rotations Two successive translations Two successive scaling rotation and uniform scaling

Concatenation Properties

Reversing the order A sequence of transformations is performed may affect

the transformed position of an object

Reflection

A transformation produces a mirror image of an object Axis of reflection

A line in the xy plane A line perpendicular to the xy plane The mirror image is obtained by rotating the object

1800 about the reflection axis Rotation path

Axis in xy plane in a plane perpendicular to the xy plane

Axis perpendicular to xy plane in the xy plane

Page 22: Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.

Concatenation Properties

Reversing the order A sequence of transformations is performed may affect

the transformed position of an object

Reflection

A transformation produces a mirror image of an object Axis of reflection

A line in the xy plane A line perpendicular to the xy plane The mirror image is obtained by rotating the object

1800 about the reflection axis Rotation path

Axis in xy plane in a plane perpendicular to the xy plane

Axis perpendicular to xy plane in the xy plane

Page 23: Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.

Reflection

A transformation produces a mirror image of an object Axis of reflection

A line in the xy plane A line perpendicular to the xy plane The mirror image is obtained by rotating the object

1800 about the reflection axis Rotation path

Axis in xy plane in a plane perpendicular to the xy plane

Axis perpendicular to xy plane in the xy plane