Professional Documents
Culture Documents
Lecture 3.11 & Lecture 3.12
Lecture 3.11 & Lecture 3.12
DEPARTMENT: CSE
Bachelor of Engineering (Computer Science & Engineering)
Introduction to Computer Graphics
Course # CSG-231 | Lecture IX & X
Yogiraj Bhale(E-10488)_
Mahendra Sharma
Course Objectives
• To understand growing
COB1 importance of graphics in
computer field. .
• To gain familiarity with basic
COB2 algorithms and techniques of
computer graphics.
• To prepare students to design
COB3 graphics systems and application
programs .
Mahendra Sharma
Pre-requisites
• Basic understanding of C programming language:
• Good working knowledge of data structures
• Basic Knowledge of Geometric Algebra
Mahendra Sharma
Course Outcome
Mahendra Sharma
Parallel Projection View Volume
Orthographic & Oblique
• Orthographic parallel projection
• the projection is perpendicular to the view plane
cgvr.korea.ac.kr
Orthographic Projections
• DOP perpendicular to view plane
Front
Top Side
cgvr.korea.ac.kr
Orthographic Coordinates
x p x, yp y
cgvr.korea.ac.kr
Oblique Projections
• DOP not perpendicular to view plane
Cavalier Cabinet
(DOP at 45 ) (DOP at 63.4 )
cgvr.korea.ac.kr
Oblique Projections
• DOP not perpendicular to view plane
• Cavalier projection
tan 1, 45
• Cabinet projection
tan 2 , 63.4
cgvr.korea.ac.kr
Parallel Projection Matrix
• General parallel projection transformation
x p x L cos , y p y L sin
z z
tan , L zL1
L tan
x p x z ( L1 cos )
y p y z ( L1 sin )
cgvr.korea.ac.kr
Parallel Projection Matrix
• General parallel projection transformation
x p 1 0 L1 cos 0 x
y
p 0 1 L1 sin 0 y
z p 0 0 0 0 z
w p 0 0 0 1 1
cgvr.korea.ac.kr
Parallel Projection Matrix
1 0 L1 cos 0
0 1 L1 sin 0
M parallel
0 0 0 0
0 0 0 1
cgvr.korea.ac.kr
Taxonomy of Projections
Planar geometric projection
Parallel Perspective
cgvr.korea.ac.kr
Perspective Projection
• Map points onto “view plane” along “projectors” emanating from
“center of projection”(cop)
r s
c to
oje
Pr
Center of
View Plane
Projection
cgvr.korea.ac.kr
Perspective Projection
• How many vanishing point?
cgvr.korea.ac.kr
Perspective Projection
• How many vanishing point?
Three-point
perspective
cgvr.korea.ac.kr
Perspective Projection
• How many vanishing point?
Three-point Two-point
perspective perspective
cgvr.korea.ac.kr
Perspective Projection
• How many vanishing point?
cgvr.korea.ac.kr
Perspective Projection View Volume
cgvr.korea.ac.kr
Perspective Projection
• Compute 2D coordinates from 3D coordinates with similar triangles
cgvr.korea.ac.kr
Perspective Projection
• Compute 2D coordinates from 3D coordinates with similar triangles
cgvr.korea.ac.kr
Perspective Projection Matrix
• 4x4 matrix representation?
x p xD z x' x
y p yD z y' y
zp D z' z
wp 1 wp z D
x p ? ? ? ? x
y
p ? ? ? ? y
z p ? ? ? ? z
w p ? ? ? ? 1
cgvr.korea.ac.kr
Perspective Projection Matrix
• 4x4 matrix representation?
x p xD z x' x
y p yD z y' y
zp D z' z
wp 1 wp z D
x p 1 0 0 x
0
y
p 0 1 0 0 y
z p 0 0 1 0 z
w p 0 0 1 D 0 1
cgvr.korea.ac.kr
Perspective Projection Matrix
1 0 0 0 1 0 0 0 1 0 0 0
0 1 0 0 0 1 0 0
0 1 0 0
M PER 0 0 0
0 0 0 0 0 0 0 1 0
1 0 1
0 0 1 0 0 0 1 0 1
D D
Perspective Orthographic Perspective
projection projection transformation
1 0 0 0 1 0 0 0
0 0 0
1 0 1 0 0
M PER 0 0 0 0 M PER 0 0 0 0
1 1
D 0 0 1 0 0 1
x Dy
cgvr.korea.ac.kr
Perspective Projection Matrix
1 0 0 0 1 0 0 0 1 0 0 0
0 1 0 0 0 1 0 0 0 1 0 0
or
0 0 0 0 0 0 0 0 0 0 0 0
r s 0 1 0 s t 1 r s t 1
cgvr.korea.ac.kr
Taxonomy of Projections
Planar geometric projection
Parallel Perspective
cgvr.korea.ac.kr
Perspective vs. Parallel
• Perspective projection
+ Size varies inversely with distance – looks realistic
– Distance and angles are not(in general) preserved
– Parallel line do not (in general) remain parallel
• Parallel projection
+ Good for exact measurements
+ Parallel lines remain parallel
– Angles are not (in general) preserved
– Less realistic looking
cgvr.korea.ac.kr
Classical Viewing
cgvr.korea.ac.kr
Mahendra Sharma