CSCI 420: Computer Graphics
Hao Li
http://cs420.hao-li.com
Fall 2014
3.1 Viewing and Projection
1
3.1 Viewing and Projection Hao Li http://cs420.hao-li.com 1 - - PowerPoint PPT Presentation
Fall 2014 CSCI 420: Computer Graphics 3.1 Viewing and Projection Hao Li http://cs420.hao-li.com 1 Recall: Affine Transformations [ x y z ] > Given a point [ x y z 1] > form homogeneous coordinates [ x 0 y 0 z 0 ] > The
CSCI 420: Computer Graphics
http://cs420.hao-li.com
Fall 2014
1
2
represents
3
4
= shear angle
5
6
matrix multiplication
7
rotations, scalings, and translations
form an x-shear?
8
9
negative z-direction
10
u e u e f f view plane
11
{ glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glMatrixMode (GL_MODELVIEW); glLoadIdentity();
... renderBunny();
}
12
13
view plane
14
15
view plane
16
17
18
19
20
21
22
23
to projection plane
source:Wikipedia
24
Penrose stairs
source:Wikipedia
25
projectors perpendicular to projection plane
26
27
Lascaux, France
source: Wikipedia
28
Mural from Pompeii, Italy
29
Ottonian manuscript,
30
Filippo Brunelleschi Florence, 1415
31
negative z direction
32
33
34
height ( ) angle
35
{ glViewport(0, 0, x, y);
glLoadIdentity();
}
36
37
Perspective projection is not affine:
for arbitrary
38
with
39
, ,
40
(includes clipping)
41
42