GR2 Advanced Computer Graphics AGR

Slides:



Advertisements
Similar presentations
Advanced Piloting Cruise Plot.
Advertisements

Chapter 1 The Study of Body Function Image PowerPoint
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
My Alphabet Book abcdefghijklm nopqrstuvwxyz.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
Points, Vectors, Lines, Spheres and Matrices
1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 17 Radiosity - Conclusion Non-PhotoRealistic Rendering.
1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 2 Basic Modelling.
1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 9 Adding Realism Through Texture.
1GR2-00 GR2 Advanced Computer Graphics AGR Ken Brodlie Lecture 1 - Overview.
GR2 Advanced Computer Graphics AGR
GR2 Advanced Computer Graphics AGR
GR2 Advanced Computer Graphics AGR
15.1 Si23_03 SI23 Introduction to Computer Graphics Lecture 15 – Visible Surfaces and Shadows.
GR2 Advanced Computer Graphics AGR
SI23 Introduction to Computer Graphics
GR2 Advanced Computer Graphics AGR
16.1 Si23_03 SI23 Introduction to Computer Graphics Lecture 16 – Some Special Rendering Effects.
9.1si31_2001 SI31 Advanced Computer Graphics AGR Lecture 9 Adding Realism Through Texture.
8.1si31_2001 SI31 Advanced Computer Graphics AGR Lecture 8 Polygon Rendering.
ABC Technology Project
1 Undirected Breadth First Search F A BCG DE H 2 F A BCG DE H Queue: A get Undiscovered Fringe Finished Active 0 distance from A visit(A)
VOORBLAD.
1. 2 No lecture on Wed February 8th Thursday 9 th Feb 14: :00 Thursday 9 th Feb 14: :00.
1 Breadth First Search s s Undiscovered Discovered Finished Queue: s Top of queue 2 1 Shortest path from s.
Factor P 16 8(8-5ab) 4(d² + 4) 3rs(2r – s) 15cd(1 + 2cd) 8(4a² + 3b²)
© 2012 National Heart Foundation of Australia. Slide 2.
Lets play bingo!!. Calculate: MEAN Calculate: MEDIAN
Computer Graphics Inf4/MSc 1 Computer Graphics Lecture 4 View Projection Taku Komura.
Understanding Generalist Practice, 5e, Kirst-Ashman/Hull
Addition 1’s to 20.
25 seconds left…...
Januar MDMDFSSMDMDFSSS
Week 1.
We will resume in: 25 Minutes.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
PSSA Preparation.
Transformations Ed Angel Professor Emeritus of Computer Science
Technische Universität München Computer Graphics SS 2014 Graphics Effects Rüdiger Westermann Lehrstuhl für Computer Graphik und Visualisierung.
Technische Universität München Fakultät für Informatik Computer Graphics SS 2014 Transformations Rüdiger Westermann Lehrstuhl für Computer Graphik und.
Computer Graphics Lecture 8 Arbitrary Viewing II: More Projection, Clipping and Mathematics of 3D Viewing.
Three Dimensional Viewing
3.1si31_2001 SI31 Advanced Computer Graphics AGR Lecture 3 Viewing Transformation Getting Started with OpenGL Introduction to Projections.
Viewing Transformations
4.1si31_2001 SI31 Advanced Computer Graphics AGR Lecture 4 Projection Clipping Viewport Transformation.
3D Concepts UNIT 3. 3-D Coordinate Spaces Remember what we mean by a 3-D coordinate space x axis y axis z axis P y z x Right-Hand Reference System.
1 Chapter 5 Viewing. 2 Perspective Projection 3 Parallel Projection.
12.1 Si23_03 SI23 Introduction to Computer Graphics Lecture 12 – 3D Graphics Transformation Pipeline: Projection and Clipping.
Advanced Computer Graphics Three Dimensional Viewing
Transformation & Projection Feng Yu Proseminar Computer Graphics :
CAP4730: Computational Structures in Computer Graphics 3D Transformations.
Programming 3D Applications CE Displaying Computer Graphics Week 3 Lecture 5 Bob Hobbs Faculty of Computing, Engineering and Technology Staffordshire.
12/24/2015 A.Aruna/Assistant professor/IT/SNSCE 1.
CS-321 Dr. Mark L. Hornick 1 Three-Dimensional Graphics Problem How can you effectively display 3-D information on a 2-D display?
Viewing. Classical Viewing Viewing requires three basic elements - One or more objects - A viewer with a projection surface - Projectors that go from.
Computer Graphics Projections.
Viewing Viewing and viewing space (camera space)
Rendering Pipeline Fall, 2015.
Projection Our 3-D scenes are all specified in 3-D world coordinates
3D Viewing cgvr.korea.ac.kr.
CSCE 441 Computer Graphics 3-D Viewing
Three Dimensional Viewing
Viewing (Projections)
Viewing (Projections)
Presentation transcript:

GR2 Advanced Computer Graphics AGR Lecture 3 Viewing - Projections 1

Viewing Graphics display devices are 2D rectangular screens Hence we need to understand how to transform our 3D world to a 2D surface This involves: selecting the observer position (or camera position) selecting the view plane (or camera film plane) selecting the type of projection 2

Perspective Projections There are two types of projection: perspective and parallel In a perspective projection, object positions are projected onto the view plane along lines which converge at the observer P1 P1’ camera P2 P2’ view plane 3

Parallel Projection In a parallel projection, the observer position is at an infinite distance, so the projection lines are parallel P1 P2 view plane 4

Perspective and Parallel Projection Parallel projection preserves the relative proportions of objects, but does not give a realistic view Perspective projection gives realistic views, but does not preserve proportions Projections of distant objects are smaller than projections of objects of the same size which are closer to the view plane 5

Perspective and Parallel Projection

Puzzle

Another Example

Viewing Coordinate System Viewing is easier if we work in a viewing co-ordinate system, where the observer or camera position is on the z-axis, looking along the negative z-direction xV yV zV Camera is positioned at: (0 , 0, zC) 6

View Plane We assume the view plane is perpendicular to the viewing direction xv yv zv The view plane is positioned at: (0, 0, zVP) Let d = zC - zVP be the distance between the camera and the plane 7

Perspective Projection Calculation xv yv zv zV view plane Q camera yV zQ zVP zC looking along x-axis 8

Perspective Projection Calculation zV view plane Q camera yV P zQ zVP zC By similar triangles, yP / yQ = (zC - zVP) / (zC - zQ) and so yP = yQ * (zC - zVP) / (zC - zQ) or yP = yQ * d / (zC - zQ) xP likewise 9

Using Matrices and Homogeneous Coordinates We can express the perspective transformation in matrix form Point Q in homogeneous coordinates is (xQ, yQ, zQ, 1) We shall generate a point H in homogeneous coordinates (xH, yH, zH, wH), where wH is not 1 But the point (xH/wH, yH/wH, zH/wH, 1) is the same as H in homogeneous space This gives us the point P in 3D space, ie xP = xH/wH, sim’ly for yP 10

Transformation Matrix for Perspective xQ yQ zQ 1 xH yH zH wH = 1 0 0 0 0 1 0 0 0 0 -zVP/d zVPzC/d 0 0 -1/d zC/d Then xP = xH / wH ie xP = xH / ( (zC - zQ) / d ) xP = xQ / ( (zC - zQ) / d ) yP likewise 11

Exercises There are two special cases which you can now derive: camera at the origin (zC = 0) view plane at the origin (zVP = 0) Follow through the operations just described for these two cases, and write down the transformation matrices 12

Note for Later The original z co-ordinate of points is retained we need relative depth in the scene in order to sort out which faces are visible to the camera

Vanishing Points When a 3D object is projected onto a view plane using perspective, parallel lines in object NOT parallel to the view plane converge to a vanishing point vanishing point one-point perspective projection of cube view plane 13

One- and Two-Point Perspective Drawing

One-point Perspective This is: Trinity with the Virgin, St John and Donors, by Mastaccio in 1427 Said to be the first painting in perspective

Two-point Perspective Edward Hopper Lighthouse at Two Lights -see www.postershop.com

Parallel Projection - Two types Orthographic parallel projection has view plane perpendicular to direction of projection Oblique parallel projection has view plane at an oblique angle to direction of projection P1 P1 P2 P2 view plane view plane We shall only consider orthographic projection 14

Parallel Projection Calculation xv yv zv zV view plane Q yV zQ zVP looking along x-axis 15

Parallel Projection Calculation zV view plane Q yV P yP = yQ and similarly xP = xQ 16

Parallel Projection Calculation So this is much easier than perspective! xP = xQ yP = yQ zP = zVP The transformation matrix is simply 1 0 0 0 0 1 0 0 0 0 zVP/zQ 0 0 0 0 1 17

View Volumes - View Window Type of lens in a camera is one factor which determines how much of the view is captured wide angle lens captures more than regular lens Analogy in computer graphics is the view window, a rectangle in the view plane view window xv yv zv 18

View Volume - Front and Back Planes We will also typically want to limit the view in the zV direction We define two planes, each parallel to the view plane, to achieve this front plane (or near plane) back plane (or far plane) zV back plane front plane 19

View Frustum - Perspective Projection back plane view frustum view window camera front plane zV 20

View Volume - Parallel Projection back plane view volume view window front plane zV 21

View Volume The front and back planes act as important clipping planes Can be used to select part of a scene we want to view Front plane important in perspective to remove near objects which will swamp picture 22