Professional Documents
Culture Documents
2D Transformations
Matrix Composition
Homogeneous . . .
Special . . .
JJ II
J I
Full Screen
Close
Jon
c Sporring
ITU, Copenhagen
Review
2D Transformations
Special . . .
Last lecture covered Foley et al. pp. 91–99, 110–127, and 132–140
Summary
on:
Exercise 3
• Filling Polygons
• Clipping
• Antialiasing
• 2D transformations
• Matrix Composition
JJ II
J I • Homogeneous Coordinates
Full Screen
• Special Transformations
Close
Jon
c Sporring
ITU, Copenhagen
Review
2D Transformations
Special . . .
Consider the implicit surface:
Summary
Exercise 3 F (x, y) = ax + by + c
F = ax + by + c,
G = dx + ey + f.
Close
Jon
c Sporring
ITU, Copenhagen
Review
2D Transformations
ITU, Copenhagen
Review
2D Transformations
Special . . . 1. Assume you are given a set of points [xi , yi ]T , and that the
Summary centroid (mean point) is [mx , my ]. How would you rotate
Exercise 3 the points [xi , yi ]T around the centroid?
2. How would you scale points [xi , yi ]T with constants k1 along
pi/4 and k2 along 3pi/4.
3. Can
the
above be written as a single matrix transformation
a b
?
d e
JJ II
J I
Full Screen
Close
Jon
c Sporring
ITU, Copenhagen
Review
2D Transformations
Special . . .
a11 a12 b11 b12
Summary In general given two matrices, A = and B = ,
a21 a22 b21 b22
Exercise 3
the sequential operation of first multiplying by A and then by
B,
x~0 = A~x,
x~00 = Bx~0 = BA~x,
x~00 = C~x,
with
b11 a11 + b12 a21 b11 a12 + b12 a22
C=
JJ II b21 a11 + b22 a21 b21 a12 + b22 a22
J I or X
cij = bik akj
Full Screen
k
Close
Jon
c Sporring
ITU, Copenhagen
Review
2D Transformations
Special . . .
In the above, translation is treated as addition while rotation
Summary
and scaling is treated as multiplication:
Exercise 3
p~0 = ~t + p~
p~0 = S~p
p~0 = R~p
JJ II
J I
Full Screen
Close
Jon
c Sporring
ITU, Copenhagen
Review
2D Transformations
ITU, Copenhagen
Review
2D Transformations
A B
Translation Translation
Scaling Scaling
Rotation Rotation
JJ II
Rotation Scaling (s1 = s2 )
J I
Translation Centroid Rotation
Full Screen
Translation Centroid Scaling
Close
Jon
c Sporring
ITU, Copenhagen
Review
2D Transformations
Special . . .
Transformations are typically grouped by their action. Consider
Summary
the matrix,
Exercise 3
a b c
d e f ,
0 0 1
and the 2 × 2 submatrix:
a b
A= .
d e
ITU, Copenhagen
Review
2D Transformations
Scale Shear
Rotate
Rotate
Non−uniform scale
JJ II
J I
Full Screen
Close
Jon
c Sporring
ITU, Copenhagen
Review
2D Transformations
Exercise 3
JJ II
J I
Full Screen
Close
Jon
c Sporring
ITU, Copenhagen
Review
2D Transformations
Special . . .
This lecture covered Foley et al. pp. 201–213 on:
Summary
Exercise 3
• 2D Transformation
• Matrix Composition
• Homogeneous Coordinates
• Special Transformations
• 3D Transformation
JJ II • Projections
J I
• Implementation
Full Screen
• Coordinate Systems
Close
Jon
c Sporring
ITU, Copenhagen
Review
2D Transformations
Special . . .
The purpose of this exercise is to familiarize the student with 2D
Summary
matrix programming.
Exercise 3
JJ II
J I
Full Screen
Close
Jon
c Sporring
ITU, Copenhagen