This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ical form for Perspective Projection WeWe look along theaxis and the the yy axis is ‘up’!
look along the z z axis and the the axis is
Graphics Lecture 2: Slide 6 ! 5 / 45 Transformation of viewpoint Transformation of viewpoint! Coordinate system for for deﬁnition
Coordinate system deﬁnition Coordinate system for viewing!
Coordinate system for viewing !
Graphics Lecture 2: Slide 7 !
6 / 45 Flying Sequences!
• The required transformation is in three parts:!
1. Translation of the origin!
2. Rotate about yaxis!
3. Rotate about xaxis ! • The two rotations are to line up the zaxis with the view
direction ! Graphics Lecture 2: Slide 8 ! 1. Translation of the Origin 1. Translation of the Origin ! 0
1
B0
A=B
@0
0 0
1
0
0 0
0
1
0 1 Cx
Cy C
C
Cz A
1 Graphics Lecture 2: Slide 9 !
8 / 45 2. Rotate about y until until in thein z plane1plane !
2. Rotate about y d is d is y the yz 0
cos ✓
B0
B=B
@ sin ✓
0 0
1
0
0 sin ✓
0
cos ✓
0 1 0 0
dz /v
0C B 0
C=B
0A @dx /v
1
0 = dx /v 0
1
0
0 Graphics Lecture 2: Slide 10 !
1 = sin ✓ = cos ✓ kvk = v q correct this if you have an earlier version of the slides. dx /v
0
dz /v
0 1 0
0C
C
0A
1 d2 + d2
x
z dz /v 3. Rotate about x until d points along the z axis 3. Rotate about x until d points along the zaxis! v cos 0 1
0
B0 cos
C=B
@0 sin
0
0 0
sin
cos
0 = sin = = q d2 + d2
x
z v/d dy /d 10
0
1
0
0C B0 v/d
C=B
0A @0 dy /d
1
0
0 1
0
0
dy /d 0C
C
v/d
0A
0
1 Graphics Lecture 2: Slide 11 !
10 / 45 Combining the matrices !
• A single matrix that transforms the scene can be
obtained from the matrices A, B and C by multiplication !
!
T = CBA
• And for every point P of the scene, we calculate !
Pt = T P
• The view is now in ‘canonical’ form and we can apply the
standard perspective or orthographic projection. !
Graphics Lecture 2: Slide 12 ! Verticals!
• So far we have not looked at verticals !
• Usually, the y direction is treated as vertical, and by
doing the Ry transformation...
View
Full
Document
 Spring '14

Click to edit the document details