0% found this document useful (0 votes)
23 views31 pages

Lecture 3.11 & Lecture 3.12

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views31 pages

Lecture 3.11 & Lecture 3.12

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 31

APEX INSTITUTE OF TECHNOLOGY

DEPARTMENT: CSE
Bachelor of Engineering (Computer Science & Engineering)
Introduction to Computer Graphics
Course # CSG-231 | Lecture IX & X
Yogiraj Bhale(E-10488)_

3-D Viewing DISCOVER . LEARN . EMPOWER

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

CO1 : Understand the graphics hardware used in field of


computer graphics.
After
this
CO2 : Understand the concept of graphics primitives
course,
like lines and circle based on different algorithms.
students
will be
CO3 : Apply the 2D graphics transformations, composite
able to transformation and Clipping concepts.

Mahendra Sharma
Parallel Projection View Volume
Orthographic & Oblique
• Orthographic parallel projection
• the projection is perpendicular to the view plane

• Oblique parallel projection


• The projectors are inclined with respect to the view plane
Orthographic Projections
• DOP perpendicular to 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  )

Where L1 is the inverse


of tan α , which is also
the value of L when z=1

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

Orthographic Oblique One-point Three-point


Two-point
Top
Axonometric Cabinet Other
Front
Cavalier
Side

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?

Three-point Two-point One-point


perspective perspective perspective

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

Center of Projection on the x axis Center of Projection on the y axis

 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

2-point perspectives 3-point perspectives

cgvr.korea.ac.kr
Taxonomy of Projections
Planar geometric projection

Parallel Perspective

Orthographic Oblique One-point Three-point


Two-point
Top
Axonometric Cabinet Other
Front
Cavalier
Side

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

You might also like