SlideShare a Scribd company logo
1 of 18
Download to read offline
SBE 306: Computer Graphics
Projection
Dr. Ayman Eldeib
Systems & Biomedical
Engineering Department
Spring 2019
Computer Graphics Projection
Types of Projections
Perspective
Projection
Parallel
Projection
“Orthographic ”
Computer Graphics Projection
Simple Orthographic Projection
 Project all points along the z axis to the z= 0 plane





































11000
0000
0010
0001
1
0
'
'
z
y
x
y
x
Computer Graphics Projection
Perspective Transformations
 Perspective transformations do not preserve parallelism,
i.e. Parallel lines not parallel; converge to single point
 Further objects are smaller (size, inverse distance)
B
A’
B’
Center of projection
(camera/eye location)
A
Computer Graphics Projection
Perspective Projection
 In the real world, objects exhibit perspective
foreshortening: distant objects appear smaller.
 The basic situation:
Computer Graphics Projection
 When we do 3-D graphics, we think of the screen as a 2-D
window onto the 3-D world
How tall
should
this bunny
be?
Cont.
Perspective Projection
Computer Graphics Projection
 The geometry of the situation is that of similar triangles.
View from above:
P (x, y, z)X
-Z
View
plane
d
(0,0,0) x’ = ?
 What is x’ ?
Cont.
Perspective Projection
Computer Graphics Projection
P (x, y, z)X
-Z
View
plane
d
(0,0,0) x’ = ?
z
y
d
y
z
x
d
x

'
,
'
dz
dz
y
z
yd
y
dz
x
z
xd
x 



 ',','
Cont.
Perspective Projection
Computer Graphics Projection
A Perspective Projection Matrix
z
y
d
y
z
x
d
x

'
,
'
dz
dz
y
z
yd
y
dz
x
z
xd
x 



 ',','















d
z
z
y
x
































1
1
'
'
'
d
z
yd
z
xd
z
y
x


























 10
1
00
0100
0010
0001
z
y
x
d
Perspective Matrix
Computer Graphics Projection
Example














0100
0100
0010
0001
d
M eperspectiv






































 dz
z
y
x
z
y
x
d 10100
0100
0010
0001
Cont.
A Perspective Projection Matrix
Computer Graphics Projection
P (x, y, z)X
-Z
View
plane
d
(0,0,0) x’ = ?














0100
0100
0010
0001
d
M eperspectiv
 View plane is at –d on z coordinate
 (Only) last row affected (no longer 0 0 0 1)
Cont.
A Perspective Projection Matrix
Computer Graphics Projection
 Now that we can express perspective
foreshortening as a matrix, we can composite it
onto our other matrices with the usual matrix
multiplication
 End result: can create a single matrix
encapsulating modeling, viewing, and projection
transforms
Though you recall that in practice OpenGL
separates the modelview from projection
matrix (why?)
Cont.
A Perspective Projection Matrix
Computer Graphics Projection
Defining a Viewing Region
 Most graphics API’s use two methods for defining a
viewing region
 The viewing frustum
In OpenGL glFrustum (xmin,xmax,ymin,ymax,near,far)
 The screen projection plane
This is a special case of the viewing frustum
Also called the symmetric perspective projection frustum
In OpenGL gluPerspective (theta,aspect,near,far)
Computer Graphics Projection
Viewing Frustum
 void glFrustum( GLdouble left,
GLdouble right, GLdouble
bottom, GLdouble top, GLdouble
near, GLdouble far )
 Parameters:
 left, right: Specify the
coordinates for the left and
right vertical clipping planes;
 bottom, top: Specify the
coordinates for the bottom
and top horizontal clipping
planes;
 near, far: Specify the
distances to the near and far
depth clipping planes. Both
distances must be positive.
Computer Graphics Projection
 void gluPerspective( GLdouble fovy,
GLdouble aspect, GLdouble zNear,
GLdouble zFar )
 Parameters:
 Fovy: Specifies the field of view
angle, in degrees, in the y
direction;
 Aspect: Specifies the aspect ratio
that determines the field of view in
the x direction. The aspect ratio is
the ratio of x (width) to y (height);
 ZNear: Specifies the distance from
the viewer to the near clipping
plane (always positive);
 ZFar: Specifies the distance from
the viewer to the far clipping plane
(always positive)
Cont.
Viewing Frustum
Computer Graphics Projection
 The viewing frustum defines a region of 3D space
assuming that the eye is located at (0, 0, 0).
 A 4x4 perspective transformation maps the
viewing frustum to a canonical cube
 Once a canonical cube is obtained 3D points are
projected to 2D by dropping the z component
 Note perspective projection is obtained by using
a perspective transformation followed by
orthographic projection
Cont.
Viewing Frustum
Computer Graphics Projection
 OpenGL’s gluPerspective() command generates a
slightly more complicated matrix:














































2
cotwhere
0100
2
00
000
000
y
farnear
nearfar
farnear
nearfar
fov
f
ZZ
ZZ
ZZ
ZΖ
f
aspect
f
Cont.
Viewing Frustum
Thank You

More Related Content

What's hot

3 d projections
3 d projections3 d projections
3 d projectionsMohd Arif
 
Windows to viewport transformation
Windows to viewport transformationWindows to viewport transformation
Windows to viewport transformationPrashant Singh
 
Hidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-bufferHidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-bufferRaj Sikarwar
 
Task 2 displaying 3 d polygon animation
Task 2 displaying 3 d polygon animationTask 2 displaying 3 d polygon animation
Task 2 displaying 3 d polygon animationRexeh1245
 
Lecture 11 Perspective Projection
Lecture 11 Perspective ProjectionLecture 11 Perspective Projection
Lecture 11 Perspective Projectionguest0026f
 
Graphics_3D viewing
Graphics_3D viewingGraphics_3D viewing
Graphics_3D viewingRabin BK
 
theory of projection
theory of projection theory of projection
theory of projection LelisoHobicho
 
View in 3_d_asper_syllabus
View in 3_d_asper_syllabusView in 3_d_asper_syllabus
View in 3_d_asper_syllabuslokesh503
 
projections - engineering drawing
projections - engineering drawing projections - engineering drawing
projections - engineering drawing Krishna Gali
 
Projection in computer graphics
Projection in computer graphicsProjection in computer graphics
Projection in computer graphicsAbash shah
 
Visible Surface Detection
Visible Surface DetectionVisible Surface Detection
Visible Surface DetectionAmitBiswas99
 
COMPUTER GRAPHICS-"Projection"
COMPUTER GRAPHICS-"Projection"COMPUTER GRAPHICS-"Projection"
COMPUTER GRAPHICS-"Projection"Ankit Surti
 
Two dimensional viewing
Two dimensional viewingTwo dimensional viewing
Two dimensional viewingMohd Arif
 
Autodesk3 dmax.exe
Autodesk3 dmax.exeAutodesk3 dmax.exe
Autodesk3 dmax.exeDEV YADAV
 

What's hot (19)

3 d projections
3 d projections3 d projections
3 d projections
 
Windows to viewport transformation
Windows to viewport transformationWindows to viewport transformation
Windows to viewport transformation
 
Oblique parallel projection
Oblique parallel projectionOblique parallel projection
Oblique parallel projection
 
Hidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-bufferHidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-buffer
 
Task 2 displaying 3 d polygon animation
Task 2 displaying 3 d polygon animationTask 2 displaying 3 d polygon animation
Task 2 displaying 3 d polygon animation
 
Lecture 11 Perspective Projection
Lecture 11 Perspective ProjectionLecture 11 Perspective Projection
Lecture 11 Perspective Projection
 
Graphics_3D viewing
Graphics_3D viewingGraphics_3D viewing
Graphics_3D viewing
 
theory of projection
theory of projection theory of projection
theory of projection
 
View in 3_d_asper_syllabus
View in 3_d_asper_syllabusView in 3_d_asper_syllabus
View in 3_d_asper_syllabus
 
projections - engineering drawing
projections - engineering drawing projections - engineering drawing
projections - engineering drawing
 
Projection in computer graphics
Projection in computer graphicsProjection in computer graphics
Projection in computer graphics
 
UNIT-III
UNIT-IIIUNIT-III
UNIT-III
 
Z buffer
Z bufferZ buffer
Z buffer
 
Visible Surface Detection
Visible Surface DetectionVisible Surface Detection
Visible Surface Detection
 
COMPUTER GRAPHICS-"Projection"
COMPUTER GRAPHICS-"Projection"COMPUTER GRAPHICS-"Projection"
COMPUTER GRAPHICS-"Projection"
 
UNIT-V
UNIT-VUNIT-V
UNIT-V
 
Two dimensional viewing
Two dimensional viewingTwo dimensional viewing
Two dimensional viewing
 
cvpr_15_poster_1200dpi
cvpr_15_poster_1200dpicvpr_15_poster_1200dpi
cvpr_15_poster_1200dpi
 
Autodesk3 dmax.exe
Autodesk3 dmax.exeAutodesk3 dmax.exe
Autodesk3 dmax.exe
 

Similar to 3 projection computer graphics

3 d graphics with opengl part 2
3 d graphics with opengl  part 23 d graphics with opengl  part 2
3 d graphics with opengl part 2Sardar Alam
 
Write a program to perform Oblique projection
Write a program to perform Oblique projectionWrite a program to perform Oblique projection
Write a program to perform Oblique projectionShobhit Saxena
 
View in 3_d_asper_syllabus
View in 3_d_asper_syllabusView in 3_d_asper_syllabus
View in 3_d_asper_syllabuslokesh503
 
CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9fungfung Chen
 
Class[4][19th jun] [three js-camera&light]
Class[4][19th jun] [three js-camera&light]Class[4][19th jun] [three js-camera&light]
Class[4][19th jun] [three js-camera&light]Saajid Akram
 
6. Perspective Projection .pdf
6. Perspective  Projection                    .pdf6. Perspective  Projection                    .pdf
6. Perspective Projection .pdfYatruHarshaHiski
 
Lect8 viewing in3d&transformation
Lect8 viewing in3d&transformationLect8 viewing in3d&transformation
Lect8 viewing in3d&transformationBCET
 
Shadow Mapping with Today's OpenGL Hardware
Shadow Mapping with Today's OpenGL HardwareShadow Mapping with Today's OpenGL Hardware
Shadow Mapping with Today's OpenGL HardwareMark Kilgard
 
Unit 3 visual realism
Unit 3 visual realismUnit 3 visual realism
Unit 3 visual realismJavith Saleem
 
Game Engine Overview
Game Engine OverviewGame Engine Overview
Game Engine OverviewSharad Mitra
 
Projection Models
Projection Models Projection Models
Projection Models Iram Toqeer
 
Cs543 15 projection
Cs543 15 projectionCs543 15 projection
Cs543 15 projectionkandyfloor
 
Unit 3
Unit 3Unit 3
Unit 3ypnrao
 
visual realism Unit iii
 visual realism Unit iii visual realism Unit iii
visual realism Unit iiiArun Prakash
 

Similar to 3 projection computer graphics (20)

3 d graphics with opengl part 2
3 d graphics with opengl  part 23 d graphics with opengl  part 2
3 d graphics with opengl part 2
 
3D Display
3D Display3D Display
3D Display
 
Notes04.pdf
Notes04.pdfNotes04.pdf
Notes04.pdf
 
Write a program to perform Oblique projection
Write a program to perform Oblique projectionWrite a program to perform Oblique projection
Write a program to perform Oblique projection
 
View in 3_d_asper_syllabus
View in 3_d_asper_syllabusView in 3_d_asper_syllabus
View in 3_d_asper_syllabus
 
CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9
 
Class[4][19th jun] [three js-camera&light]
Class[4][19th jun] [three js-camera&light]Class[4][19th jun] [three js-camera&light]
Class[4][19th jun] [three js-camera&light]
 
6. Perspective Projection .pdf
6. Perspective  Projection                    .pdf6. Perspective  Projection                    .pdf
6. Perspective Projection .pdf
 
Lect8 viewing in3d&transformation
Lect8 viewing in3d&transformationLect8 viewing in3d&transformation
Lect8 viewing in3d&transformation
 
Shadow Mapping with Today's OpenGL Hardware
Shadow Mapping with Today's OpenGL HardwareShadow Mapping with Today's OpenGL Hardware
Shadow Mapping with Today's OpenGL Hardware
 
Unit 3 visual realism
Unit 3 visual realismUnit 3 visual realism
Unit 3 visual realism
 
Game Engine Overview
Game Engine OverviewGame Engine Overview
Game Engine Overview
 
Projection Models
Projection Models Projection Models
Projection Models
 
Drawing Tools
Drawing ToolsDrawing Tools
Drawing Tools
 
Cs543 15 projection
Cs543 15 projectionCs543 15 projection
Cs543 15 projection
 
Unit 3
Unit 3Unit 3
Unit 3
 
visual realism Unit iii
 visual realism Unit iii visual realism Unit iii
visual realism Unit iii
 
Normal Mapping / Computer Graphics - IK
Normal Mapping / Computer Graphics - IKNormal Mapping / Computer Graphics - IK
Normal Mapping / Computer Graphics - IK
 
Stereo vision
Stereo visionStereo vision
Stereo vision
 
3 d modeling part 1
3 d modeling part 13 d modeling part 1
3 d modeling part 1
 

More from cairo university

Tocci chapter 13 applications of programmable logic devices extended
Tocci chapter 13 applications of programmable logic devices extendedTocci chapter 13 applications of programmable logic devices extended
Tocci chapter 13 applications of programmable logic devices extendedcairo university
 
Tocci chapter 12 memory devices
Tocci chapter 12 memory devicesTocci chapter 12 memory devices
Tocci chapter 12 memory devicescairo university
 
Tocci ch 9 msi logic circuits
Tocci ch 9 msi logic circuitsTocci ch 9 msi logic circuits
Tocci ch 9 msi logic circuitscairo university
 
Tocci ch 7 counters and registers modified x
Tocci ch 7 counters and registers modified xTocci ch 7 counters and registers modified x
Tocci ch 7 counters and registers modified xcairo university
 
Tocci ch 6 digital arithmetic operations and circuits
Tocci ch 6 digital arithmetic operations and circuitsTocci ch 6 digital arithmetic operations and circuits
Tocci ch 6 digital arithmetic operations and circuitscairo university
 
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...cairo university
 
A15 sedra ch 15 memory circuits
A15  sedra ch 15 memory circuitsA15  sedra ch 15 memory circuits
A15 sedra ch 15 memory circuitscairo university
 
A14 sedra ch 14 advanced mos and bipolar logic circuits
A14  sedra ch 14 advanced mos and bipolar logic circuitsA14  sedra ch 14 advanced mos and bipolar logic circuits
A14 sedra ch 14 advanced mos and bipolar logic circuitscairo university
 
A13 sedra ch 13 cmos digital logic circuits
A13  sedra ch 13 cmos digital logic circuitsA13  sedra ch 13 cmos digital logic circuits
A13 sedra ch 13 cmos digital logic circuitscairo university
 
A09 sedra ch 9 frequency response
A09  sedra ch 9 frequency responseA09  sedra ch 9 frequency response
A09 sedra ch 9 frequency responsecairo university
 
5 sedra ch 05 mosfet revision
5  sedra ch 05  mosfet revision5  sedra ch 05  mosfet revision
5 sedra ch 05 mosfet revisioncairo university
 
Lecture 2 (system overview of c8051 f020) rv01
Lecture 2 (system overview of c8051 f020) rv01Lecture 2 (system overview of c8051 f020) rv01
Lecture 2 (system overview of c8051 f020) rv01cairo university
 
Lecture 1 (course overview and 8051 architecture) rv01
Lecture 1 (course overview and 8051 architecture) rv01Lecture 1 (course overview and 8051 architecture) rv01
Lecture 1 (course overview and 8051 architecture) rv01cairo university
 

More from cairo university (20)

Tocci chapter 13 applications of programmable logic devices extended
Tocci chapter 13 applications of programmable logic devices extendedTocci chapter 13 applications of programmable logic devices extended
Tocci chapter 13 applications of programmable logic devices extended
 
Tocci chapter 12 memory devices
Tocci chapter 12 memory devicesTocci chapter 12 memory devices
Tocci chapter 12 memory devices
 
Tocci ch 9 msi logic circuits
Tocci ch 9 msi logic circuitsTocci ch 9 msi logic circuits
Tocci ch 9 msi logic circuits
 
Tocci ch 7 counters and registers modified x
Tocci ch 7 counters and registers modified xTocci ch 7 counters and registers modified x
Tocci ch 7 counters and registers modified x
 
Tocci ch 6 digital arithmetic operations and circuits
Tocci ch 6 digital arithmetic operations and circuitsTocci ch 6 digital arithmetic operations and circuits
Tocci ch 6 digital arithmetic operations and circuits
 
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...
Tocci ch 3 5 boolean algebra, logic gates, combinational circuits, f fs, - re...
 
A15 sedra ch 15 memory circuits
A15  sedra ch 15 memory circuitsA15  sedra ch 15 memory circuits
A15 sedra ch 15 memory circuits
 
A14 sedra ch 14 advanced mos and bipolar logic circuits
A14  sedra ch 14 advanced mos and bipolar logic circuitsA14  sedra ch 14 advanced mos and bipolar logic circuits
A14 sedra ch 14 advanced mos and bipolar logic circuits
 
A13 sedra ch 13 cmos digital logic circuits
A13  sedra ch 13 cmos digital logic circuitsA13  sedra ch 13 cmos digital logic circuits
A13 sedra ch 13 cmos digital logic circuits
 
A09 sedra ch 9 frequency response
A09  sedra ch 9 frequency responseA09  sedra ch 9 frequency response
A09 sedra ch 9 frequency response
 
5 sedra ch 05 mosfet.ppsx
5  sedra ch 05  mosfet.ppsx5  sedra ch 05  mosfet.ppsx
5 sedra ch 05 mosfet.ppsx
 
5 sedra ch 05 mosfet
5  sedra ch 05  mosfet5  sedra ch 05  mosfet
5 sedra ch 05 mosfet
 
5 sedra ch 05 mosfet revision
5  sedra ch 05  mosfet revision5  sedra ch 05  mosfet revision
5 sedra ch 05 mosfet revision
 
Fields Lec 2
Fields Lec 2Fields Lec 2
Fields Lec 2
 
Fields Lec 1
Fields Lec 1Fields Lec 1
Fields Lec 1
 
Fields Lec 5&6
Fields Lec 5&6Fields Lec 5&6
Fields Lec 5&6
 
Fields Lec 4
Fields Lec 4Fields Lec 4
Fields Lec 4
 
Fields Lec 3
Fields Lec 3Fields Lec 3
Fields Lec 3
 
Lecture 2 (system overview of c8051 f020) rv01
Lecture 2 (system overview of c8051 f020) rv01Lecture 2 (system overview of c8051 f020) rv01
Lecture 2 (system overview of c8051 f020) rv01
 
Lecture 1 (course overview and 8051 architecture) rv01
Lecture 1 (course overview and 8051 architecture) rv01Lecture 1 (course overview and 8051 architecture) rv01
Lecture 1 (course overview and 8051 architecture) rv01
 

Recently uploaded

CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 

Recently uploaded (20)

CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 

3 projection computer graphics

  • 1. SBE 306: Computer Graphics Projection Dr. Ayman Eldeib Systems & Biomedical Engineering Department Spring 2019
  • 2. Computer Graphics Projection Types of Projections Perspective Projection Parallel Projection “Orthographic ”
  • 3. Computer Graphics Projection Simple Orthographic Projection  Project all points along the z axis to the z= 0 plane                                      11000 0000 0010 0001 1 0 ' ' z y x y x
  • 4. Computer Graphics Projection Perspective Transformations  Perspective transformations do not preserve parallelism, i.e. Parallel lines not parallel; converge to single point  Further objects are smaller (size, inverse distance) B A’ B’ Center of projection (camera/eye location) A
  • 5. Computer Graphics Projection Perspective Projection  In the real world, objects exhibit perspective foreshortening: distant objects appear smaller.  The basic situation:
  • 6. Computer Graphics Projection  When we do 3-D graphics, we think of the screen as a 2-D window onto the 3-D world How tall should this bunny be? Cont. Perspective Projection
  • 7. Computer Graphics Projection  The geometry of the situation is that of similar triangles. View from above: P (x, y, z)X -Z View plane d (0,0,0) x’ = ?  What is x’ ? Cont. Perspective Projection
  • 8. Computer Graphics Projection P (x, y, z)X -Z View plane d (0,0,0) x’ = ? z y d y z x d x  ' , ' dz dz y z yd y dz x z xd x      ',',' Cont. Perspective Projection
  • 9. Computer Graphics Projection A Perspective Projection Matrix z y d y z x d x  ' , ' dz dz y z yd y dz x z xd x      ',','                d z z y x                                 1 1 ' ' ' d z yd z xd z y x                            10 1 00 0100 0010 0001 z y x d Perspective Matrix
  • 10. Computer Graphics Projection Example               0100 0100 0010 0001 d M eperspectiv                                        dz z y x z y x d 10100 0100 0010 0001 Cont. A Perspective Projection Matrix
  • 11. Computer Graphics Projection P (x, y, z)X -Z View plane d (0,0,0) x’ = ?               0100 0100 0010 0001 d M eperspectiv  View plane is at –d on z coordinate  (Only) last row affected (no longer 0 0 0 1) Cont. A Perspective Projection Matrix
  • 12. Computer Graphics Projection  Now that we can express perspective foreshortening as a matrix, we can composite it onto our other matrices with the usual matrix multiplication  End result: can create a single matrix encapsulating modeling, viewing, and projection transforms Though you recall that in practice OpenGL separates the modelview from projection matrix (why?) Cont. A Perspective Projection Matrix
  • 13. Computer Graphics Projection Defining a Viewing Region  Most graphics API’s use two methods for defining a viewing region  The viewing frustum In OpenGL glFrustum (xmin,xmax,ymin,ymax,near,far)  The screen projection plane This is a special case of the viewing frustum Also called the symmetric perspective projection frustum In OpenGL gluPerspective (theta,aspect,near,far)
  • 14. Computer Graphics Projection Viewing Frustum  void glFrustum( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far )  Parameters:  left, right: Specify the coordinates for the left and right vertical clipping planes;  bottom, top: Specify the coordinates for the bottom and top horizontal clipping planes;  near, far: Specify the distances to the near and far depth clipping planes. Both distances must be positive.
  • 15. Computer Graphics Projection  void gluPerspective( GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar )  Parameters:  Fovy: Specifies the field of view angle, in degrees, in the y direction;  Aspect: Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height);  ZNear: Specifies the distance from the viewer to the near clipping plane (always positive);  ZFar: Specifies the distance from the viewer to the far clipping plane (always positive) Cont. Viewing Frustum
  • 16. Computer Graphics Projection  The viewing frustum defines a region of 3D space assuming that the eye is located at (0, 0, 0).  A 4x4 perspective transformation maps the viewing frustum to a canonical cube  Once a canonical cube is obtained 3D points are projected to 2D by dropping the z component  Note perspective projection is obtained by using a perspective transformation followed by orthographic projection Cont. Viewing Frustum
  • 17. Computer Graphics Projection  OpenGL’s gluPerspective() command generates a slightly more complicated matrix:                                               2 cotwhere 0100 2 00 000 000 y farnear nearfar farnear nearfar fov f ZZ ZZ ZZ ZΖ f aspect f Cont. Viewing Frustum