SlideShare a Scribd company logo
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

Shading
ShadingShading
Shading
Amit Kapoor
 
3D Transformation
3D Transformation3D Transformation
3D Transformation
SwatiHans10
 
Color models
Color modelsColor models
Color models
Haitham Ahmed
 
Ellipses drawing algo.
Ellipses drawing algo.Ellipses drawing algo.
Ellipses drawing algo.
Mohd Arif
 
Projection In Computer Graphics
Projection In Computer GraphicsProjection In Computer Graphics
Projection In Computer Graphics
Sanu Philip
 
Frame buffer
Frame bufferFrame buffer
Frame buffer
Aparna Joshi
 
Presentation on Parallel projection.pptx
Presentation on Parallel projection.pptxPresentation on Parallel projection.pptx
Presentation on Parallel projection.pptx
GoutamSharma33
 
3d transformation computer graphics
3d transformation computer graphics 3d transformation computer graphics
3d transformation computer graphics
University of Potsdam
 
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygonsLiang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
Lahiru Danushka
 
Raster animation
Raster animationRaster animation
Raster animation
abhijit754
 
Cyrus beck line clipping algorithm
Cyrus beck line clipping algorithmCyrus beck line clipping algorithm
Cyrus beck line clipping algorithm
Pooja Dixit
 
3D transformation in computer graphics
3D transformation in computer graphics3D transformation in computer graphics
3D transformation in computer graphics
SHIVANI SONI
 
Spline representations
Spline representationsSpline representations
Spline representations
Nikhil krishnan
 
2 d geometric transformations
2 d geometric transformations2 d geometric transformations
2 d geometric transformations
Mohd Arif
 
3D Graphics : Computer Graphics Fundamentals
3D Graphics : Computer Graphics Fundamentals3D Graphics : Computer Graphics Fundamentals
3D Graphics : Computer Graphics Fundamentals
Muhammed Afsal Villan
 
Bezier Curve in Computer Graphics.docx
Bezier Curve in Computer Graphics.docxBezier Curve in Computer Graphics.docx
Bezier Curve in Computer Graphics.docx
bcanawakadalcollege
 
Clipping
ClippingClipping
Clipping
AMIT VIRAMGAMI
 
Clipping computer graphics
Clipping  computer graphicsClipping  computer graphics
Clipping computer graphics
ShaishavShah8
 
Bezier curve computer graphics
Bezier curve computer graphics Bezier curve computer graphics
Bezier curve computer graphics
University of Potsdam
 
3 d viewing
3 d viewing3 d viewing
3 d viewing
Deepak Singh
 

What's hot (20)

Shading
ShadingShading
Shading
 
3D Transformation
3D Transformation3D Transformation
3D Transformation
 
Color models
Color modelsColor models
Color models
 
Ellipses drawing algo.
Ellipses drawing algo.Ellipses drawing algo.
Ellipses drawing algo.
 
Projection In Computer Graphics
Projection In Computer GraphicsProjection In Computer Graphics
Projection In Computer Graphics
 
Frame buffer
Frame bufferFrame buffer
Frame buffer
 
Presentation on Parallel projection.pptx
Presentation on Parallel projection.pptxPresentation on Parallel projection.pptx
Presentation on Parallel projection.pptx
 
3d transformation computer graphics
3d transformation computer graphics 3d transformation computer graphics
3d transformation computer graphics
 
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygonsLiang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
 
Raster animation
Raster animationRaster animation
Raster animation
 
Cyrus beck line clipping algorithm
Cyrus beck line clipping algorithmCyrus beck line clipping algorithm
Cyrus beck line clipping algorithm
 
3D transformation in computer graphics
3D transformation in computer graphics3D transformation in computer graphics
3D transformation in computer graphics
 
Spline representations
Spline representationsSpline representations
Spline representations
 
2 d geometric transformations
2 d geometric transformations2 d geometric transformations
2 d geometric transformations
 
3D Graphics : Computer Graphics Fundamentals
3D Graphics : Computer Graphics Fundamentals3D Graphics : Computer Graphics Fundamentals
3D Graphics : Computer Graphics Fundamentals
 
Bezier Curve in Computer Graphics.docx
Bezier Curve in Computer Graphics.docxBezier Curve in Computer Graphics.docx
Bezier Curve in Computer Graphics.docx
 
Clipping
ClippingClipping
Clipping
 
Clipping computer graphics
Clipping  computer graphicsClipping  computer graphics
Clipping computer graphics
 
Bezier curve computer graphics
Bezier curve computer graphics Bezier curve computer graphics
Bezier curve computer graphics
 
3 d viewing
3 d viewing3 d viewing
3 d viewing
 

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 2
Sardar Alam
 
computer graphics
computer graphicscomputer graphics
computer graphics
Megabi Mamo
 
Windows and viewport
Windows and viewportWindows and viewport
Windows and viewport
Technology & Education
 
3D Display
3D Display3D Display
3D Display
Toushik Paul
 
Notes04.pdf
Notes04.pdfNotes04.pdf
Notes04.pdf
MukeshKumar605825
 
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
Shobhit Saxena
 
View in 3_d_asper_syllabus
View in 3_d_asper_syllabusView in 3_d_asper_syllabus
View in 3_d_asper_syllabus
lokesh503
 
View in 3_d_asper_syllabus
View in 3_d_asper_syllabusView in 3_d_asper_syllabus
View in 3_d_asper_syllabus
lokesh503
 
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
fungfung 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 .pdf
YatruHarshaHiski
 
Lect8 viewing in3d&transformation
Lect8 viewing in3d&transformationLect8 viewing in3d&transformation
Lect8 viewing in3d&transformation
BCET
 
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
Mark Kilgard
 
Unit 3 visual realism
Unit 3 visual realismUnit 3 visual realism
Unit 3 visual realism
Javith Saleem
 
Trytten computergraphics(1)
Trytten computergraphics(1)Trytten computergraphics(1)
Trytten computergraphics(1)
nriaz469
 
Game Engine Overview
Game Engine OverviewGame Engine Overview
Game Engine Overview
Sharad Mitra
 
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
Rexeh1245
 
Projection Models
Projection Models Projection Models
Projection Models
Iram Toqeer
 
Drawing Tools
Drawing ToolsDrawing Tools
Drawing Tools
Ghaffar Khan
 
Hidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-bufferHidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-buffer
Raj Sikarwar
 

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
 
computer graphics
computer graphicscomputer graphics
computer graphics
 
Windows and viewport
Windows and viewportWindows and viewport
Windows and viewport
 
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
 
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
 
Trytten computergraphics(1)
Trytten computergraphics(1)Trytten computergraphics(1)
Trytten computergraphics(1)
 
Game Engine Overview
Game Engine OverviewGame Engine Overview
Game Engine Overview
 
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
 
Projection Models
Projection Models Projection Models
Projection Models
 
Drawing Tools
Drawing ToolsDrawing Tools
Drawing Tools
 
Hidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-bufferHidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-buffer
 

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 extended
cairo university
 
Tocci chapter 12 memory devices
Tocci chapter 12 memory devicesTocci chapter 12 memory devices
Tocci chapter 12 memory devices
cairo university
 
Tocci ch 9 msi logic circuits
Tocci ch 9 msi logic circuitsTocci ch 9 msi logic circuits
Tocci ch 9 msi logic circuits
cairo 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 x
cairo 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 circuits
cairo 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 circuits
cairo 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 circuits
cairo 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 circuits
cairo university
 
A09 sedra ch 9 frequency response
A09  sedra ch 9 frequency responseA09  sedra ch 9 frequency response
A09 sedra ch 9 frequency response
cairo university
 
5 sedra ch 05 mosfet.ppsx
5  sedra ch 05  mosfet.ppsx5  sedra ch 05  mosfet.ppsx
5 sedra ch 05 mosfet.ppsx
cairo university
 
5 sedra ch 05 mosfet
5  sedra ch 05  mosfet5  sedra ch 05  mosfet
5 sedra ch 05 mosfet
cairo university
 
5 sedra ch 05 mosfet revision
5  sedra ch 05  mosfet revision5  sedra ch 05  mosfet revision
5 sedra ch 05 mosfet revision
cairo university
 
Fields Lec 2
Fields Lec 2Fields Lec 2
Fields Lec 2
cairo university
 
Fields Lec 1
Fields Lec 1Fields Lec 1
Fields Lec 1
cairo university
 
Fields Lec 5&6
Fields Lec 5&6Fields Lec 5&6
Fields Lec 5&6
cairo university
 
Fields Lec 4
Fields Lec 4Fields Lec 4
Fields Lec 4
cairo university
 
Fields Lec 3
Fields Lec 3Fields Lec 3
Fields Lec 3
cairo 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) rv01
cairo 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) rv01
cairo 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

International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdf
LAXMAREDDY22
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
architagupta876
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
Anant Corporation
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
AjmalKhan50578
 
CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
PKavitha10
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
Software Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.pptSoftware Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.ppt
TaghreedAltamimi
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
IJECEIAES
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
Prakhyath Rai
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Sinan KOZAK
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
artificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptxartificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptx
GauravCar
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
abbyasa1014
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
gowrishankartb2005
 

Recently uploaded (20)

International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdf
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
 
CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
Software Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.pptSoftware Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.ppt
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
artificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptxartificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptx
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
 

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