Lecture 4: Viewing. Topics:

Size: px
Start display at page:

Download "Lecture 4: Viewing. Topics:"

Transcription

1 Lecture 4: Viewing Topics: 1. Classical viewing 2. Positioning the camera 3. Perspective and orthogonal projections 4. Perspective and orthogonal projections in OpenGL 5. Perspective and orthogonal projection matrices Chapter 5, Sections 5.1, 5.2, 5.3, 5.4, 5.7,

2 Classical and computer viewing Both kinds of viewing involve: objects, a viewer, projectors, and a projection plane. The projectors meet at the centre of projection (COP. The COP is the centre of the lens or ee, or in computer graphics the origin of the camera frame. In both classical and computer viewing the viewer can be an infinite distance from the objects. As we move the COP to infinit the projectors become parallel and in the limit, the COP can be replaced b a direction of projection (DOP. Views with a finite COP are called perspective views while those with a COP at infinit are called parallel views. Projector Object Object COP Projection plane DOP Projector Projection plane 2

3 Classical viewing Front elevation Elevation oblique Plan oblique Isometric One-point perspective Three-point perspective In classical viewing there is an underling notion of a principal face. This is tpical in architecture where objects are often buildings having planar faces: front, back, top, bottom, right and left faces. Such objects have three orthogonal directions associated with them. 3

4 Parallel viewing An orthogonal projection is one in which the projectors are not onl parallel but also perpendicular to the projection plane. The classical orthographic projection is an orthogonal projection in which the projection plane is placed parallel to one of the principal faces of the object. A more general orthogonal projection is the aonometric projection, in which the projection plane can have an arbitrar orientation. Dimetric Trimetric Isometric 4

5 Oblique projections are parallel views in which the projection plane is not orthogonal to the projectors. The projection plane is skew. Projection plane Projection plane Projection plane (a (b (c (a construction (b top view (c side view 5

6 Perspective viewing In perspective viewing, the image of an object gets smaller when it is moved awa from the viewer. Therefore perspective views look more natural. However the cannot be used to make measurements, as with parallel views. (a (b (c (a Three-point perspective: three vanishing points (b Two-point perspective: two vanishing points (c One-point perspective: one vanishing point 6

7 Positioning the camera How do we position the camera with respect to the objects? There are two points of view: (1 we move the camera with respect to the objects or (2 we move objects relative to a fied camera. The two reciprocal movements will result in the same image. These movements are controlled b the model-view matri which represents a transformation between the world frame and the camera frame. Initiall (b default the model-view matri is set to the identit, in which case both frames are the same. The camera is at the origin pointing down the negative ais. 7

8 Eample 1. Objects are tpicall placed near the origin. So to view them, we need to move the camera back along the ais. The correct transformation is therefore glmatrimode(gl_modelview; glloadidentit(; gltranslatef(0,0, 0.0, -d; for some positive number d., c c, c c, c c (a (b We can think of this transformation either as a translation of the objects through the vector (0, 0, d or as a translation of the camera through the vector (0, 0, d. 8

9 Eample 2. We now wish to view the objects (which are again centred around the origin from the positive ais. To achieve this we need first to move the camera backwards along the positive ais, a distance d, and then rotate the camera around the ais b 90 degrees: glmatrimode(gl_modelview; glloadidentit(; gltranslatef(0,0, 0.0, -d; glrotate(-90.0, 0.0, 1.0, 0.0; The equivalent viewpoint is to think of the model-view matri being applied to the objects: the are first rotated through 90 degrees around the ais, and then translated through (0, 0, d. The model-view matri has the form M = T R, and M is applied to each object verte p, moving it to Mp. T R 9

10 Eample 3. To achieve more complicated orientations of the camera we can concatenate rotation matrices. However, it is easier to use a function provided in GLU: glulookat(ee, ee, ee, at, at, at, up, up, up; (at, at, at (up, up, up (ee, ee, ee This function sets the origin of the camera to be the eepoint e and sets the camera frame aes u,v,n (plaing the role of,, according to the point at and the vector up. It first sets n = e at, the normal to the projection plane. The vector v is then computed as the projection of up onto this plane. Finall u is taken to be the cross product of v and n. 10

11 Perspective projections Suppose the camera is at its default position at the origin, pointing along the negative ais. How do we compute a perspective projection? For simplicit, suppose the projection plane is parallel to the - plane, i.e., = d, for some negative number d. Each point (,, in space is projected towards the origin. Therefore the point where the projector hits the projection plane is ( p, p, p, where p = d/, p = d/, p = d. (,, ( p, d (, = d ( p, d (, ( p, p, p = d (a (b (c The perspective transformation (,, ( p, p, p is clearl non-affine. So how can we represent it using a 4 4 matri? 11

12 The answer is to etend the notion of homogeneous coordinates. Recall that the point (,, has the homogeneous representation (,,, 1. We can etend this representation b agreeing that the same point can be represented b the vector (w, w, w, w, for an w 0. To recover the representation (,,, 1, we have onl to divide the coordinates b w. With this etended homogeneous representation of points, we can represent our perspective transformation b the matri M = /d 0 The matri M transforms the point p = (,,, 1 T into the point q = (,,, /d T, and after division b the last coordinate, /d, we arrive at q = ( p, p, p, 1. This latter division is called perspective division, and can be made part of the pipeline: model-view projection perspective division 12

13 Orthogonal projections Orthogonal projections can be viewed as the limiting case of perspective projections as the COP goes to infinit. However, in practice it is much simpler to derive the projection equation directl. We can assume that the projection plane is = 0, in which case the point (,, is mapped to ( p, p, p where p =, p =, p = 0. ( p, p, 0 = 0 (,, In homogeneous coordinates, the transformation is p p =. p Here no perspective division is necessar, but in hardware implementations we can use the same pipeline for both perspective and orthogonal projections. 13

14 Perspective projections in OpenGL In addition to the projections themselves, we need to specif a clipping volume or view volume, b specifing front and back clipping frames. For perspective projections, the viewing volume becomes a frustum, a truncated pramid. View volume View plane Front clipping plane Back clipping plane COP 14

15 In OpenGL, we can specif a perspective view b constructing and loading the matri ourselves, or b using one of two special functions. The first is glfrustum(min, ma, min, ma, near, far which sets the frustum shown in the following figure. = ma = min ( ma, ma, min ( min, min, min Here, min = near and ma = far in the figure. The near and far distances must be positive, and so min and ma are alwas negative. Note that min, ma, min, ma are the coordinates of the front clipping plane. 15

16 The second function for specifing a perspective projection with a clipping volume is gluperspective(fov, aspect, near, far. This function uses the angle of view fov in the direction and the aspect ratio width divided b height together with the near and far planes to completel determine the desired frustum. w h fov 16

17 Orthogonal projections in OpenGL To specif an orthogonal projection in OpenGL there is just one function: glortho(min, ma, min, ma, near, far whose arguments are identical to those of glfrustum. The view volume is now a parallelepiped. We have set min = near and ma = far again in the figure. ( ma, ma, ma = ma View volume = min ( min, min, min Unlike with perspective projections, the arguments near and far no longer have to be positive. The onl restriction is that near < far. 17

18 Orthogonal projection matrices The projection matrices used in OpenGL must also take account of the clipping volume. We begin with the projection matri for the function glortho(min, ma, min, ma, near, far Set min = near, ma = far. All OpenGL needs to do is to map the chosen view volume into the canonical one: = ±1, = ±1, = ±1. ( ma, ma, ma (1,1,1 ( min, min, min (-1,-1,-1 This can be achieved b concatenating a translation and a scaling: ( T ( min + ma /2, ( min + ma /2, ( min + ma /2, ( S 2/( ma min, 2/( ma min, 2/( ma min, giving the projection matri P = ST = 2 ma min 0 0 min+ ma ma min 0 2 ma min 0 min+ ma ma min ma min min+ ma ma min

19 Perspective projection matrices We now find the projection matri in OpenGL specified b the function gluperspective(fov, aspect, near, far. Again set min = near, ma = far. Assume for simplicit that fov = 90 and aspect = 1: (-1, -1, -1 (1, 1, -1 From our previous discussion, the simple matri M = provides the correct perspective projectors but sends all points into the plane = 1. 19

20 We need a more general matri, N =, 0 0 α β in order to transform the front clipping plane = min into the canonical plane = 1 and the back clipping plane = ma into = 1. The matri N clearl maps the point (,,, 1 to the point (,,, w where =, =, = α + β, w =. After dividing b w, we get = /, = /, = (α + β/, which means that the planes = ± and = ± are transformed into the planes = ±1 and = ±1, for an α, β. On the other hand, the planes = min and = ma are mapped respectivel into the planes = (α + β/ min, = (α + β/ ma. So we have to solve the simultaneous equations (α + β/ min = 1, (α + β/ ma = 1, for α, β, in order to map the front clipping plane = min into the canonical plane = 1 and the back clipping plane = ma into = 1. The solution is α = ma + min ma min, β = 2 ma min ma min. 20

CSE528 Computer Graphics: Theory, Algorithms, and Applications

CSE528 Computer Graphics: Theory, Algorithms, and Applications CSE528 Computer Graphics: Theor, Algorithms, and Applications Hong Qin State Universit of New York at Ston Brook (Ston Brook Universit) Ston Brook, New York 794--44 Tel: (63)632-845; Fa: (63)632-8334 qin@cs.sunsb.edu

More information

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo Computer Graphics Bing-Yu Chen National Taiwan Universit The Universit of Toko Viewing in 3D 3D Viewing Process Classical Viewing and Projections 3D Snthetic Camera Model Parallel Projection Perspective

More information

Chap 7, 2009 Spring Yeong Gil Shin

Chap 7, 2009 Spring Yeong Gil Shin Three-Dimensional i Viewingi Chap 7, 29 Spring Yeong Gil Shin Viewing i Pipeline H d fi i d? How to define a window? How to project onto the window? Rendering "Create a picture (in a snthetic camera) Specification

More information

CS 4731/543: Computer Graphics Lecture 5 (Part I): Projection. Emmanuel Agu

CS 4731/543: Computer Graphics Lecture 5 (Part I): Projection. Emmanuel Agu CS 4731/543: Computer Graphics Lecture 5 (Part I): Projection Emmanuel Agu 3D Viewing and View Volume Recall: 3D viewing set up Projection Transformation View volume can have different shapes (different

More information

Realtime 3D Computer Graphics & Virtual Reality. Viewing

Realtime 3D Computer Graphics & Virtual Reality. Viewing Realtime 3D Computer Graphics & Virtual Realit Viewing Transformation Pol. Per Verte Pipeline CPU DL Piel Teture Raster Frag FB v e r t e object ee clip normalied device Modelview Matri Projection Matri

More information

CS 428: Fall Introduction to. Viewing and projective transformations. Andrew Nealen, Rutgers, /23/2009 1

CS 428: Fall Introduction to. Viewing and projective transformations. Andrew Nealen, Rutgers, /23/2009 1 CS 428: Fall 29 Introduction to Computer Graphics Viewing and projective transformations Andrew Nealen, Rutgers, 29 9/23/29 Modeling and viewing transformations Canonical viewing volume Viewport transformation

More information

Computer Graphics. Jeng-Sheng Yeh 葉正聖 Ming Chuan University (modified from Bing-Yu Chen s slides)

Computer Graphics. Jeng-Sheng Yeh 葉正聖 Ming Chuan University (modified from Bing-Yu Chen s slides) Computer Graphics Jeng-Sheng Yeh 葉正聖 Ming Chuan Universit (modified from Bing-Yu Chen s slides) Viewing in 3D 3D Viewing Process Specification of an Arbitrar 3D View Orthographic Parallel Projection Perspective

More information

5.8.3 Oblique Projections

5.8.3 Oblique Projections 278 Chapter 5 Viewing y (, y, ) ( p, y p, p ) Figure 537 Oblique projection P = 2 left right 0 0 left+right left right 0 2 top bottom 0 top+bottom top bottom far+near far near 0 0 far near 2 0 0 0 1 Because

More information

Computer Graphics. Viewing. Fundamental Types of Viewing. Perspective views. Parallel views. October 12, finite COP (center of projection)

Computer Graphics. Viewing. Fundamental Types of Viewing. Perspective views. Parallel views. October 12, finite COP (center of projection) Comuter Grahics Viewing October 2, 25 htt://www.hallm.ac.kr/~sunkim/teach/25/cga Funamental Tes of Viewing Persective views finite COP (center of rojection) Parallel views COP at infinit DOP (irection

More information

Overview. Viewing and perspectives. Planar Geometric Projections. Classical Viewing. Classical views Computer viewing Perspective normalization

Overview. Viewing and perspectives. Planar Geometric Projections. Classical Viewing. Classical views Computer viewing Perspective normalization Overview Viewing and perspectives Classical views Computer viewing Perspective normalization Classical Viewing Viewing requires three basic elements One or more objects A viewer with a projection surface

More information

COMP Computer Graphics and Image Processing. a6: Projections. In part 2 of our study of Viewing, we ll look at. COMP27112 Toby Howard

COMP Computer Graphics and Image Processing. a6: Projections. In part 2 of our study of Viewing, we ll look at. COMP27112 Toby Howard Computer Graphics and Image Processing a6: Projections Tob.Howard@manchester.ac.uk Introduction In part 2 of our stud of Viewing, we ll look at The theor of geometrical planar projections Classes of projections

More information

Projection: Mapping 3-D to 2-D. Orthographic Projection. The Canonical Camera Configuration. Perspective Projection

Projection: Mapping 3-D to 2-D. Orthographic Projection. The Canonical Camera Configuration. Perspective Projection Projection: Mapping 3-D to 2-D Our scene models are in 3-D space and images are 2-D so we need some wa of projecting 3-D to 2-D The fundamental approach: planar projection first, we define a plane in 3-D

More information

One or more objects A viewer with a projection surface Projectors that go from the object(s) to the projection surface

One or more objects A viewer with a projection surface Projectors that go from the object(s) to the projection surface Classical Viewing Viewing requires three basic elements One or more objects A viewer with a projection surface Projectors that go from the object(s) to the projection surface Classical views are based

More information

Chap 7, 2008 Spring Yeong Gil Shin

Chap 7, 2008 Spring Yeong Gil Shin Three-Dimensional i Viewingi Chap 7, 28 Spring Yeong Gil Shin Viewing i Pipeline H d fi i d? How to define a window? How to project onto the window? Rendering "Create a picture (in a synthetic camera)

More information

Viewing with Computers (OpenGL)

Viewing with Computers (OpenGL) We can now return to three-dimension?', graphics from a computer perspective. Because viewing in computer graphics is based on the synthetic-camera model, we should be able to construct any of the classical

More information

3D Viewing. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

3D Viewing. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller 3D Viewing CMPT 361 Introduction to Computer Graphics Torsten Möller Reading Chapter 4 of Angel Chapter 6 of Foley, van Dam, 2 Objectives What kind of camera we use? (pinhole) What projections make sense

More information

Three-Dimensional Graphics III. Guoying Zhao 1 / 67

Three-Dimensional Graphics III. Guoying Zhao 1 / 67 Computer Graphics Three-Dimensional Graphics III Guoying Zhao 1 / 67 Classical Viewing Guoying Zhao 2 / 67 Objectives Introduce the classical views Compare and contrast image formation by computer with

More information

Fundamental Types of Viewing

Fundamental Types of Viewing Viewings Fundamental Types of Viewing Perspective views finite COP (center of projection) Parallel views COP at infinity DOP (direction of projection) perspective view parallel view Classical Viewing Specific

More information

Motivation. What we ve seen so far. Demo (Projection Tutorial) Outline. Projections. Foundations of Computer Graphics

Motivation. What we ve seen so far. Demo (Projection Tutorial) Outline. Projections. Foundations of Computer Graphics Foundations of Computer Graphics Online Lecture 5: Viewing Orthographic Projection Ravi Ramamoorthi Motivation We have seen transforms (between coord sstems) But all that is in 3D We still need to make

More information

Classical and Computer Viewing. Adapted From: Ed Angel Professor of Emeritus of Computer Science University of New Mexico

Classical and Computer Viewing. Adapted From: Ed Angel Professor of Emeritus of Computer Science University of New Mexico Classical and Computer Viewing Adapted From: Ed Angel Professor of Emeritus of Computer Science University of New Mexico Planar Geometric Projections Standard projections project onto a plane Projectors

More information

3D Viewing. Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

3D Viewing. Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller 3D Viewing Introduction to Computer Graphics Torsten Möller Machiraju/Zhang/Möller Reading Chapter 4 of Angel Chapter 13 of Hughes, van Dam, Chapter 7 of Shirley+Marschner Machiraju/Zhang/Möller 2 Objectives

More information

3-Dimensional Viewing

3-Dimensional Viewing CHAPTER 6 3-Dimensional Vieing Vieing and projection Objects in orld coordinates are projected on to the vie plane, hich is defined perpendicular to the vieing direction along the v -ais. The to main tpes

More information

Overview of Projections: From a 3D world to a 2D screen.

Overview of Projections: From a 3D world to a 2D screen. Overview of Projections: From a 3D world to a 2D screen. Lecturer: Dr Dan Cornford d.cornford@aston.ac.uk http://wiki.aston.ac.uk/dancornford CS2150, Computer Graphics, Aston University, Birmingham, UK

More information

CITSTUDENTS.IN VIEWING. Computer Graphics and Visualization. Classical and computer viewing. Viewing with a computer. Positioning of the camera

CITSTUDENTS.IN VIEWING. Computer Graphics and Visualization. Classical and computer viewing. Viewing with a computer. Positioning of the camera UNIT - 6 7 hrs VIEWING Classical and computer viewing Viewing with a computer Positioning of the camera Simple projections Projections in OpenGL Hiddensurface removal Interactive mesh displays Parallelprojection

More information

To Do. Demo (Projection Tutorial) Motivation. What we ve seen so far. Outline. Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 5: Viewing

To Do. Demo (Projection Tutorial) Motivation. What we ve seen so far. Outline. Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 5: Viewing Foundations of Computer Graphics (Fall 0) CS 84, Lecture 5: Viewing http://inst.eecs.berkele.edu/~cs84 To Do Questions/concerns about assignment? Remember it is due Sep. Ask me or TAs re problems Motivation

More information

Viewing and Projection

Viewing and Projection Viewing and Projection Sheelagh Carpendale Camera metaphor. choose camera position 2. set up and organie objects 3. choose a lens 4. take the picture View Volumes what gets into the scene perspective view

More information

Viewing. Reading: Angel Ch.5

Viewing. Reading: Angel Ch.5 Viewing Reading: Angel Ch.5 What is Viewing? Viewing transform projects the 3D model to a 2D image plane 3D Objects (world frame) Model-view (camera frame) View transform (projection frame) 2D image View

More information

To Do. Motivation. Demo (Projection Tutorial) What we ve seen so far. Computer Graphics. Summary: The Whole Viewing Pipeline

To Do. Motivation. Demo (Projection Tutorial) What we ve seen so far. Computer Graphics. Summary: The Whole Viewing Pipeline Computer Graphics CSE 67 [Win 9], Lecture 5: Viewing Ravi Ramamoorthi http://viscomp.ucsd.edu/classes/cse67/wi9 To Do Questions/concerns about assignment? Remember it is due tomorrow! (Jan 6). Ask me or

More information

Transforms II. Overview. Homogeneous Coordinates 3-D Transforms Viewing Projections. Homogeneous Coordinates. x y z w

Transforms II. Overview. Homogeneous Coordinates 3-D Transforms Viewing Projections. Homogeneous Coordinates. x y z w Transforms II Overvie Homogeneous Coordinates 3- Transforms Vieing Projections 2 Homogeneous Coordinates Allos translations to be included into matri transform. Allos us to distinguish beteen a vector

More information

Introduction to Computer Graphics 4. Viewing in 3D

Introduction to Computer Graphics 4. Viewing in 3D Introduction to Computer Graphics 4. Viewing in 3D National Chiao Tung Univ, Taiwan By: I-Chen Lin, Assistant Professor Textbook: E.Angel, Interactive Computer Graphics, 5 th Ed., Addison Wesley Ref: Hearn

More information

3D Viewing and Projec5on. Taking Pictures with a Real Camera. Steps: Graphics does the same thing for rendering an image for 3D geometric objects

3D Viewing and Projec5on. Taking Pictures with a Real Camera. Steps: Graphics does the same thing for rendering an image for 3D geometric objects 3D Vieing and Projec5on Taking Pictures ith a Real Camera Steps: Iden5 interes5ng objects Rotate and translate the camera to desired viepoint Adjust camera seings such as ocal length Choose desired resolu5on

More information

Three-Dimensional Viewing Hearn & Baker Chapter 7

Three-Dimensional Viewing Hearn & Baker Chapter 7 Three-Dimensional Viewing Hearn & Baker Chapter 7 Overview 3D viewing involves some tasks that are not present in 2D viewing: Projection, Visibility checks, Lighting effects, etc. Overview First, set up

More information

Computer Graphics. P05 Viewing in 3D. Part 1. Aleksandra Pizurica Ghent University

Computer Graphics. P05 Viewing in 3D. Part 1. Aleksandra Pizurica Ghent University Computer Graphics P05 Viewing in 3D Part 1 Aleksandra Pizurica Ghent University Telecommunications and Information Processing Image Processing and Interpretation Group Viewing in 3D: context Create views

More information

Viewing. Cliff Lindsay, Ph.D. WPI

Viewing. Cliff Lindsay, Ph.D. WPI Viewing Cliff Lindsa, Ph.D. WPI Building Virtual Camera Pipeline l Used To View Virtual Scene l First Half of Rendering Pipeline Related To Camera l Takes Geometr From ApplicaHon To RasteriaHon Stages

More information

Computer Viewing Computer Graphics I, Fall 2008

Computer Viewing Computer Graphics I, Fall 2008 Computer Viewing 1 Objectives Introduce mathematics of projection Introduce OpenGL viewing functions Look at alternate viewing APIs 2 Computer Viewing Three aspects of viewing process All implemented in

More information

Evening s Goals. Mathematical Transformations. Discuss the mathematical transformations that are utilized for computer graphics

Evening s Goals. Mathematical Transformations. Discuss the mathematical transformations that are utilized for computer graphics Evening s Goals Discuss the mathematical transformations that are utilized for computer graphics projection viewing modeling Describe aspect ratio and its importance Provide a motivation for homogenous

More information

3D Viewing. With acknowledge to: Ed Angel. Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

3D Viewing. With acknowledge to: Ed Angel. Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 3D Viewing With acknowledge to: Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 1 Classical Viewing Viewing plane projectors Classical

More information

CPSC 314, Midterm Exam 1. 9 Feb 2007

CPSC 314, Midterm Exam 1. 9 Feb 2007 CPSC, Midterm Eam 9 Feb 007 Closed book, no calculators or other electronic devices. Cell phones must be turned off. Place our photo ID face up on our desk. One single-sided sheet of handwritten notes

More information

Computer Viewing. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

Computer Viewing. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science Computer Viewing CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science 1 Objectives Introduce the mathematics of projection Introduce OpenGL viewing functions Look at

More information

CS 543: Computer Graphics. Projection

CS 543: Computer Graphics. Projection CS 543: Computer Graphics Projection Robert W. Lindeman Associate Professor Interactive Media & Game Development Department of Computer Science Worcester Poltechnic Institute gogo@wpi.edu with lots of

More information

Viewing/Projection IV. Week 4, Fri Jan 29

Viewing/Projection IV. Week 4, Fri Jan 29 Universit of British Columbia CPSC 314 Computer Graphics Jan-Apr 2010 Tamara Munner Viewing/Projection IV Week 4, Fri Jan 29 http://www.ugrad.cs.ubc.ca/~cs314/vjan2010 News etra TA office hours in lab

More information

Viewing/Projections III. Week 4, Wed Jan 31

Viewing/Projections III. Week 4, Wed Jan 31 Universit of British Columbia CPSC 34 Computer Graphics Jan-Apr 27 Tamara Munner Viewing/Projections III Week 4, Wed Jan 3 http://www.ugrad.cs.ubc.ca/~cs34/vjan27 News etra TA coverage in lab to answer

More information

Projections. Brian Curless CSE 457 Spring Reading. Shrinking the pinhole. The pinhole camera. Required:

Projections. Brian Curless CSE 457 Spring Reading. Shrinking the pinhole. The pinhole camera. Required: Reading Required: Projections Brian Curless CSE 457 Spring 2013 Angel, 5.1-5.6 Further reading: Fole, et al, Chapter 5.6 and Chapter 6 David F. Rogers and J. Alan Adams, Mathematical Elements for Computer

More information

Viewing in 3D (Chapt. 6 in FVD, Chapt. 12 in Hearn & Baker)

Viewing in 3D (Chapt. 6 in FVD, Chapt. 12 in Hearn & Baker) Viewing in 3D (Chapt. 6 in FVD, Chapt. 2 in Hearn & Baker) Viewing in 3D s. 2D 2D 2D world Camera world 2D 3D Transformation Pipe-Line Modeling transformation world Bod Sstem Viewing transformation Front-

More information

Viewing/Projections IV. Week 4, Fri Feb 1

Viewing/Projections IV. Week 4, Fri Feb 1 Universit of British Columbia CPSC 314 Computer Graphics Jan-Apr 2008 Tamara Munzner Viewing/Projections IV Week 4, Fri Feb 1 http://www.ugrad.cs.ubc.ca/~cs314/vjan2008 News extra TA office hours in lab

More information

Chapter 8 Three-Dimensional Viewing Operations

Chapter 8 Three-Dimensional Viewing Operations Projections Chapter 8 Three-Dimensional Viewing Operations Figure 8.1 Classification of planar geometric projections Figure 8.2 Planar projection Figure 8.3 Parallel-oblique projection Figure 8.4 Orthographic

More information

Announcements. Submitting Programs Upload source and executable(s) (Windows or Mac) to digital dropbox on Blackboard

Announcements. Submitting Programs Upload source and executable(s) (Windows or Mac) to digital dropbox on Blackboard Now Playing: Vertex Processing: Viewing Coulibaly Amadou & Mariam from Dimanche a Bamako Released August 2, 2005 Rick Skarbez, Instructor COMP 575 September 27, 2007 Announcements Programming Assignment

More information

GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner

GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner GLOBAL EDITION Interactive Computer Graphics A Top-Down Approach with WebGL SEVENTH EDITION Edward Angel Dave Shreiner This page is intentionall left blank. 4.10 Concatenation of Transformations 219 in

More information

p =(x,y,d) y (0,0) d z Projection plane, z=d

p =(x,y,d) y (0,0) d z Projection plane, z=d Projections ffl Mapping from d dimensional space to d 1 dimensional subspace ffl Range of an projection P : R! R called a projection plane ffl P maps lines to points ffl The image of an point p under P

More information

What does OpenGL do?

What does OpenGL do? Theor behind Geometrical Transform What does OpenGL do? So the user specifies a lot of information Ee Center Up Near, far, UP EE Left, right top, bottom, etc. f b CENTER left right top bottom What does

More information

Computer Viewing and Projection. Overview. Computer Viewing. David Carr Fundamentals of Computer Graphics Spring 2004 Based on Slides by E.

Computer Viewing and Projection. Overview. Computer Viewing. David Carr Fundamentals of Computer Graphics Spring 2004 Based on Slides by E. INSTITUTIONEN FÖR SYSTEMTEKNIK LULEÅ TEKNISKA UNIVERSITET Computer Viewing and Projection David Carr Fundamentals of Computer Graphics Spring 24 Based on Slides by E. Angel Projection 1 L Overview Computer

More information

CS 475 / CS 675 Computer Graphics. Lecture 7 : The Modeling-Viewing Pipeline

CS 475 / CS 675 Computer Graphics. Lecture 7 : The Modeling-Viewing Pipeline CS 475 / CS 675 Computer Graphics Lecture 7 : The Modeling-Viewing Pipeline Taonom Planar Projections Parallel Perspectie Orthographic Aonometric Oblique Front Top Side Trimetric Dimetric Isometric Caalier

More information

CSE528 Computer Graphics: Theory, Algorithms, and Applications

CSE528 Computer Graphics: Theory, Algorithms, and Applications CSE528 Computer Graphics: Theory, Algorithms, and Applications Hong Qin Stony Brook University (SUNY at Stony Brook) Stony Brook, New York 11794-2424 Tel: (631)632-845; Fax: (631)632-8334 qin@cs.stonybrook.edu

More information

CSE328 Fundamentals of Computer Graphics

CSE328 Fundamentals of Computer Graphics CSE328 Fundamentals of Computer Graphics Hong Qin State University of New York at Stony Brook (Stony Brook University) Stony Brook, New York 794--44 Tel: (63)632-845; Fax: (63)632-8334 qin@cs.sunysb.edu

More information

Chap 3 Viewing Pipeline Reading: Angel s Interactive Computer Graphics, Sixth ed. Sections 4.1~4.7

Chap 3 Viewing Pipeline Reading: Angel s Interactive Computer Graphics, Sixth ed. Sections 4.1~4.7 Chap 3 Viewing Pipeline Reading: Angel s Interactive Computer Graphics, Sixth ed. Sections 4.~4.7 Chap 3 View Pipeline, Comp. Graphics (U) CGGM Lab., CS Dept., NCTU Jung Hong Chuang Outline View parameters

More information

1. We ll look at: Types of geometrical transformation. Vector and matrix representations

1. We ll look at: Types of geometrical transformation. Vector and matrix representations Tob Howard COMP272 Computer Graphics and Image Processing 3: Transformations Tob.Howard@manchester.ac.uk Introduction We ll look at: Tpes of geometrical transformation Vector and matri representations

More information

On the Midterm Exam. Monday, 10/17 in class. Closed book and closed notes. One-side and one page cheat sheet is allowed. A calculator is allowed

On the Midterm Exam. Monday, 10/17 in class. Closed book and closed notes. One-side and one page cheat sheet is allowed. A calculator is allowed On the Midterm Exam Monday, 1/17 in class Closed book and closed notes One-side and one page cheat sheet is allowed A calculator is allowed Covers the topics until the class on Wednesday, 1/12 Take-home

More information

6. Modelview Transformations

6. Modelview Transformations 6. Modelview Transformations Transformation Basics Transformations map coordinates from one frame of reference to another through matri multiplications Basic transformation operations include: - translation

More information

Overview. By end of the week:

Overview. By end of the week: Overview By end of the week: - Know the basics of git - Make sure we can all compile and run a C++/ OpenGL program - Understand the OpenGL rendering pipeline - Understand how matrices are used for geometric

More information

Chapter 5. Projections and Rendering

Chapter 5. Projections and Rendering Chapter 5 Projections and Rendering Topics: Perspective Projections The rendering pipeline In order to view manipulate and view a graphics object we must find ways of storing it a computer-compatible way.

More information

Must first specify the type of projection desired. When use parallel projections? For technical drawings, etc. Specify the viewing parameters

Must first specify the type of projection desired. When use parallel projections? For technical drawings, etc. Specify the viewing parameters walters@buffalo.edu CSE 480/580 Lecture 4 Slide 3-D Viewing Continued Eamples of 3-D Viewing Must first specif the tpe of projection desired When use parallel projections? For technical drawings, etc.

More information

Determining the 2d transformation that brings one image into alignment (registers it) with another. And

Determining the 2d transformation that brings one image into alignment (registers it) with another. And Last two lectures: Representing an image as a weighted combination of other images. Toda: A different kind of coordinate sstem change. Solving the biggest problem in using eigenfaces? Toda Recognition

More information

2D and 3D Viewing Basics

2D and 3D Viewing Basics CS10101001 2D and 3D Viewing Basics Junqiao Zhao 赵君峤 Department of Computer Science and Technology College of Electronics and Information Engineering Tongji University Viewing Analog to the physical viewing

More information

CPSC 314, Midterm Exam. 8 March 2013

CPSC 314, Midterm Exam. 8 March 2013 CPSC, Midterm Eam 8 March 0 Closed book, no electronic devices besides simple calculators. Cell phones must be turned off. Place our photo ID face up on our desk. One single-sided sheet of handwritten

More information

CS Computer Graphics: Transformations & The Synthetic Camera

CS Computer Graphics: Transformations & The Synthetic Camera CS 543 - Computer Graphics: Transformations The Snthetic Camera b Robert W. Lindeman gogo@wpi.edu (with help from Emmanuel Agu ;-) Introduction to Transformations A transformation changes an objects Size

More information

Name: [20 points] Consider the following OpenGL commands:

Name: [20 points] Consider the following OpenGL commands: Name: 2 1. [20 points] Consider the following OpenGL commands: glmatrimode(gl MODELVIEW); glloadidentit(); glrotatef( 90.0, 0.0, 1.0, 0.0 ); gltranslatef( 2.0, 0.0, 0.0 ); glscalef( 2.0, 1.0, 1.0 ); What

More information

Transformations II. Arbitrary 3D Rotation. What is its inverse? What is its transpose? Can we constructively elucidate this relationship?

Transformations II. Arbitrary 3D Rotation. What is its inverse? What is its transpose? Can we constructively elucidate this relationship? Utah School of Computing Fall 25 Transformations II CS46 Computer Graphics From Rich Riesenfeld Fall 25 Arbitrar 3D Rotation What is its inverse? What is its transpose? Can we constructivel elucidate this

More information

3D Polygon Rendering. Many applications use rendering of 3D polygons with direct illumination

3D Polygon Rendering. Many applications use rendering of 3D polygons with direct illumination Rendering Pipeline 3D Polygon Rendering Many applications use rendering of 3D polygons with direct illumination 3D Polygon Rendering What steps are necessary to utilize spatial coherence while drawing

More information

Computer Graphics. Chapter 10 Three-Dimensional Viewing

Computer Graphics. Chapter 10 Three-Dimensional Viewing Computer Graphics Chapter 10 Three-Dimensional Viewing Chapter 10 Three-Dimensional Viewing Part I. Overview of 3D Viewing Concept 3D Viewing Pipeline vs. OpenGL Pipeline 3D Viewing-Coordinate Parameters

More information

Computer Viewing. CITS3003 Graphics & Animation. E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley

Computer Viewing. CITS3003 Graphics & Animation. E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley Computer Viewing CITS3003 Graphics & Animation E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012 1 Objectives Introduce the mathematics of projection Introduce OpenGL viewing

More information

Announcement. Project 1 has been posted online and in dropbox. Due: 11:59:59 pm, Friday, October 14

Announcement. Project 1 has been posted online and in dropbox. Due: 11:59:59 pm, Friday, October 14 Announcement Project 1 has been posted online and in dropbox Due: 11:59:59 pm, Friday, October 14 Project 1: Interactive Viewing of Two Teapots How to create a teapot? Before OpenGL 3., glutsolidteapot

More information

Prof. Feng Liu. Fall /19/2016

Prof. Feng Liu. Fall /19/2016 Prof. Feng Liu Fall 26 http://www.cs.pdx.edu/~fliu/courses/cs447/ /9/26 Last time More 2D Transformations Homogeneous Coordinates 3D Transformations The Viewing Pipeline 2 Today Perspective projection

More information

CPSC 314, Midterm Exam. 8 March 2010

CPSC 314, Midterm Exam. 8 March 2010 CPSC, Midterm Eam 8 March 00 Closed book, no electronic devices besides (simple, nongraphing) calculators. Cell phones must be turned off. Place our photo ID face up on our desk. One single-sided sheet

More information

Realtime 3D Computer Graphics Virtual Reality

Realtime 3D Computer Graphics Virtual Reality Realtime 3D Comuter Grahics Virtual Realit Viewing an rojection Classical an General Viewing Transformation Pieline CPU CPU Pol. Pol. DL DL Piel Piel Per Per Verte Verte Teture Teture Raster Raster Frag

More information

The Viewing Pipeline adaptation of Paul Bunn & Kerryn Hugo s notes

The Viewing Pipeline adaptation of Paul Bunn & Kerryn Hugo s notes The Viewing Pipeline adaptation of Paul Bunn & Kerryn Hugo s notes What is it? The viewing pipeline is the procession of operations that are applied to the OpenGL matrices, in order to create a 2D representation

More information

Last Time. Correct Transparent Shadow. Does Ray Tracing Simulate Physics? Does Ray Tracing Simulate Physics? Refraction and the Lifeguard Problem

Last Time. Correct Transparent Shadow. Does Ray Tracing Simulate Physics? Does Ray Tracing Simulate Physics? Refraction and the Lifeguard Problem Graphics Pipeline: Projective Last Time Shadows cast ra to light stop after first intersection Reflection & Refraction compute direction of recursive ra Recursive Ra Tracing maimum number of bounces OR

More information

Lecture 3 Sections 2.2, 4.4. Mon, Aug 31, 2009

Lecture 3 Sections 2.2, 4.4. Mon, Aug 31, 2009 Model s Lecture 3 Sections 2.2, 4.4 World s Eye s Clip s s s Window s Hampden-Sydney College Mon, Aug 31, 2009 Outline Model s World s Eye s Clip s s s Window s 1 2 3 Model s World s Eye s Clip s s s Window

More information

Viewing Transformations I Comp 535

Viewing Transformations I Comp 535 Viewing Transformations I Comp 535 Motivation Want to see our virtual 3-D worl on a 2-D screen 2 Graphics Pipeline Moel Space Moel Transformations Worl Space Viewing Transformation Ee/Camera Space Projection

More information

Geometry: Outline. Projections. Orthographic Perspective

Geometry: Outline. Projections. Orthographic Perspective Geometry: Cameras Outline Setting up the camera Projections Orthographic Perspective 1 Controlling the camera Default OpenGL camera: At (0, 0, 0) T in world coordinates looking in Z direction with up vector

More information

CS230 : Computer Graphics Lecture 6: Viewing Transformations. Tamar Shinar Computer Science & Engineering UC Riverside

CS230 : Computer Graphics Lecture 6: Viewing Transformations. Tamar Shinar Computer Science & Engineering UC Riverside CS230 : Computer Graphics Lecture 6: Viewing Transformations Tamar Shinar Computer Science & Engineering UC Riverside Rendering approaches 1. image-oriented foreach pixel... 2. object-oriented foreach

More information

Viewing and Modeling

Viewing and Modeling Viewing and Modeling Computer Science Department The Universit of Texas at Austin A Simplified Graphics ipeline Application Vertex batching & assembl Triangle assembl Triangle clipping NDC to window space

More information

Computer Graphics. Coordinate Systems and Change of Frames. Based on slides by Dianna Xu, Bryn Mawr College

Computer Graphics. Coordinate Systems and Change of Frames. Based on slides by Dianna Xu, Bryn Mawr College Computer Graphics Coordinate Systems and Change of Frames Based on slides by Dianna Xu, Bryn Mawr College Linear Independence A set of vectors independent if is linearly If a set of vectors is linearly

More information

Game Architecture. 2/19/16: Rasterization

Game Architecture. 2/19/16: Rasterization Game Architecture 2/19/16: Rasterization Viewing To render a scene, need to know Where am I and What am I looking at The view transform is the matrix that does this Maps a standard view space into world

More information

Introduction to Computer Graphics with WebGL

Introduction to Computer Graphics with WebGL Introduction to Computer Graphics with WebGL Ed Angel Classical Viewing Computer Graphics with WebGL Ed Angel, 204 Classical Viewing Viewing requires three basic elements - One or more objects - A viewer

More information

1 OpenGL - column vectors (column-major ordering)

1 OpenGL - column vectors (column-major ordering) OpenGL - column vectors (column-major ordering) OpenGL uses column vectors and matrices are written in a column-major order. As a result, matrices are concatenated in right-to-left order, with the first

More information

Perspective Projection Transformation

Perspective Projection Transformation Perspective Projection Transformation Where does a point of a scene appear in an image?? p p Transformation in 3 steps:. scene coordinates => camera coordinates. projection of camera coordinates into image

More information

Notes on Assignment. Notes on Assignment. Notes on Assignment. Notes on Assignment

Notes on Assignment. Notes on Assignment. Notes on Assignment. Notes on Assignment Notes on Assignment Notes on Assignment Objects on screen - made of primitives Primitives are points, lines, polygons - watch vertex ordering The main object you need is a box When the MODELVIEW matrix

More information

Uses of Transformations. 2D transformations Homogeneous coordinates. Transformations. Transformations. Transformations. Transformations and matrices

Uses of Transformations. 2D transformations Homogeneous coordinates. Transformations. Transformations. Transformations. Transformations and matrices Uses of Transformations 2D transformations Homogeneous coordinates odeling: position and resie parts of a comple model; Viewing: define and position the virtual camera Animation: define how objects move/change

More information

Graphics 2009/2010, period 1. Lecture 6: perspective projection

Graphics 2009/2010, period 1. Lecture 6: perspective projection Graphics 2009/2010, period 1 Lecture 6 Perspective projection Orthographic vs. perspective projection Introduction Projecting from arbitrary camera positions Orthographic projection and the canonical view

More information

Viewing and Projection

Viewing and Projection CSCI 480 Computer Graphics Lecture 5 Viewing and Projection Shear Transformation Camera Positioning Simple Parallel Projections Simple Perspective Projections [Geri s Game, Pixar, 1997] January 26, 2011

More information

Viewing and Projection

Viewing and Projection 15-462 Computer Graphics I Lecture 5 Viewing and Projection Shear Transformation Camera Positioning Simple Parallel Projections Simple Perspective Projections [Angel, Ch. 5.2-5.4] January 30, 2003 [Red

More information

CS F-07 Objects in 2D 1

CS F-07 Objects in 2D 1 CS420-2010F-07 Objects in 2D 1 07-0: Representing Polgons We want to represent a simple polgon Triangle, rectangle, square, etc Assume for the moment our game onl uses these simple shapes No curves for

More information

What and Why Transformations?

What and Why Transformations? 2D transformations What and Wh Transformations? What? : The geometrical changes of an object from a current state to modified state. Changing an object s position (translation), orientation (rotation)

More information

Transformations II. Week 2, Wed Jan 17

Transformations II. Week 2, Wed Jan 17 Universit of British Columbia CPSC 34 Computer Graphics Jan-Apr 27 Tamara Munzner Transformations II Week 2, Wed Jan 7 http://www.ugrad.cs.ubc.ca/~cs34/vjan27 Readings for Jan 5-22 FCG Chap 6 Transformation

More information

Models and The Viewing Pipeline. Jian Huang CS456

Models and The Viewing Pipeline. Jian Huang CS456 Models and The Viewing Pipeline Jian Huang CS456 Vertex coordinates list, polygon table and (maybe) edge table Auxiliary: Per vertex normal Neighborhood information, arranged with regard to vertices and

More information

Notes. University of British Columbia

Notes. University of British Columbia Notes Drop-bo is no. 14 You can hand in our assignments Assignment 0 due Fri. 4pm Assignment 1 is out Office hours toda 16:00 17:00, in lab or in reading room Uniersit of Uniersit of Chapter 4 - Reminder

More information

Modeling Transformations

Modeling Transformations Modeling Transformations Michael Kazhdan (601.457/657) HB Ch. 5 FvDFH Ch. 5 Overview Ra-Tracing so far Modeling transformations Ra Tracing Image RaTrace(Camera camera, Scene scene, int width, int heigh,

More information

4. Two Dimensional Transformations

4. Two Dimensional Transformations 4. Two Dimensional Transformations CS362 Introduction to Computer Graphics Helena Wong, 2 In man applications, changes in orientations, sizes, and shapes are accomplished with geometric transformations

More information

So we have been talking about 3D viewing, the transformations pertaining to 3D viewing. Today we will continue on it. (Refer Slide Time: 1:15)

So we have been talking about 3D viewing, the transformations pertaining to 3D viewing. Today we will continue on it. (Refer Slide Time: 1:15) Introduction to Computer Graphics Dr. Prem Kalra Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture - 8 3D Viewing So we have been talking about 3D viewing, the

More information

Introduction to Homogeneous coordinates

Introduction to Homogeneous coordinates Last class we considered smooth translations and rotations of the camera coordinate system and the resulting motions of points in the image projection plane. These two transformations were expressed mathematically

More information