**Unformatted text preview: **rst, things work out correctly!
• However it is possible to invert the vertical ! Graphics Lecture 2: Slide 13 ! Transformations verticals
Transformations and and verticals ! Graphics Lecture 2: Slide 14 !
13 / 45 Rotation about a general line !
• Special effects, such as rotating a scene about a general
line can be achieved by multiple transformations !
• The transformation is formed by: !
– Making the line of rotation one of the Cartesian axes!
– Doing the rotation (about the chosen axis)!
– Restoring the line to its original place! Graphics Lecture 2: Slide 15 ! Rotation about a general line !
• The ﬁrst part is achieved using the same matrices that we derived
for the ﬂying sequences !
CBA
• This rotates the general line so it is aligned with the z-axis.!
• We then carry out the rotation about the z-axis then follow this by the
inversion of the initial matrices.!
• So the full matrix T of the combined transformation is!
T = A−1B−1C−1RzCBA
Graphics Lecture 2: Slide 16 ! Other effects !
• Similar effects can be created using this approach !
• e.g. to make an object shrink (and stay in place) !
1. Move the object to the origin!
2. Apply a scaling matrix!
3. Move the object back to where it was ! Graphics Lecture 2: Slide 17 ! Projection by matrix multiplication !
• Usually projection and drawing of a scene comes after
the transformation(s). !
• It is therefore convenient to combine the projection with
the other parts of the transformation !
• So it is useful to have matrices for the projection
operation ! Graphics Lecture 2: Slide 18 ! Orthographic Projection Matrix Orthographic projection matrix !
For For (canonical) orthographic projection, wedrop the drop
• (canonical) orthographic projection, we simply simply z
the z-coordinate: !
coordinate: ! Graphics Lecture 2: Slide 19 ! 0 1
1000
B0 1 0 0C
C
Mo = B
@0 0 0 0A
0001
01 01
x
x
By C By C
Mo B C = B C
@z A @0A
1
1 Perspective Projection Matrix Perspective projection matrix !
• Perspective projection of homogenous coor...

View
Full Document