CSC 470 Computer Graphics. Three Dimensional Viewing
|
|
- Merryl Arlene Owens
- 5 years ago
- Views:
Transcription
1 CSC 470 Computer Graphics Three Dimensional Viewing 1
2 Today s Lecture Three Dimensional Viewing Developing a Camera Fly through a scene Mathematics of Projections Producing Stereo Views 2
3 Introduction We have already learnt how to: Create 2D and 3D solid objects Construct a 3D scene Add colors Create complex mesh surfaces So what do we do now? Moving/Flying through a scene Adding perspective 3
4 The Camera We previously looked at setting up a camera. glortho() and glulookat() these created parallel projections We now want to modify a scene to give us perspective projections. lines converge as they get further away 4
5 Viewing process and graphics pipeline parallel projection 5
6 OpenGL tools for modeling and viewing Set modeling transformations. Setting camera in OpenGL. Positioning and aiming the camera. 6
7 Set the projection matrix glmatrixmode(gl_projection); // make the projection matrix current glloadidentity(); // set it to the identity matrix glortho(left,right,bottom,top,near,far); // multiply it by the new matrix 7
8 glulookat(eye.x, eye.y, eye.z, look.x, look.y, look.z, up.x, up.y, up.z) It takes as parameters the eye position, eye, of the camera and the look-at point, look. It also takes an approximate up direction, up. up is most often set to (0, 1, 0) to suggest an up direction parallel to the y-axis. 8
9 Example 1: Set up a typical camera Show the camera with its eye situated at eye = (4,4,4) looking at the origin with lookat = (0,1,0). The up direction is set to up = (0, 1, 0). Suppose we also want the view volume to have a width of 6.4, a height of 4.8 (so its aspect ratio is 640/480), and to set near to 1 and far to 50. This camera would be established using: glmatixmode(gl_projection); // set the view volume glloadidentity(); glortho(-3.2, 3.2, -2.4, 2.4, 1, 50); glmatrixmode(gl_modelview); // place and aim the camera glloadidentity(); glulookat(2, 4, 5, 0, 0, 0, 0, 1, 0); 9
10 10
11 Example 2 11
12 The Camera The Perspective Camera 12
13 The Camera Revisited View volume: a portion of a rectangular pyramid. Viewangle (θ): the opening (vertically) of the pyramid. Viewplane: between the near plane and the far plane whose location dose not matter. Map the image (projections) on the viewplane into the viewport. Aspect ratio: to specify a view volume *With a perspective projection, the point P is determined by finding where a line from the eye to P intersects the viewplane. 13
14 Setting the View Volume The projection matrix (encoded with the view volume) is set up using gluperspective(). (Comparing with glortho() for parallel projection.) The height (H) of a viewplane (i.e. near plane)can be computed as: H=2*N*tg(θ/2), and its width (W) is decided by the aspect ratio (AR): W=H*AR. OpenGL commands: glmatrixmode(gl_projection); glloadidentity(); gluperspective(viewangle, aspectratio, N, F); 14
15 Positioning and Pointing the Camera The only difference between a parallel- and perspective-projection camera resides in the projection matrix, which determines the shape of the view volume. Code: glmatrixmode(gl_modelview); glloadidentity(); glulookat(eye, look, up); 15
16 The Camera Setting up the Camera instead of glortho() we now use: gluperspective() gluperspective viewangle aspectratio (W/H) near plane far plane 16
17 The Camera glmatrixmode(gl_projection); glloadidentity(); gluperspective(viewangle, aspectratio, N, F); 17
18 The Camera Positioning the Camera The camera is positioned using a combination of translations and rotations. Think if the camera being in the same location as the viewers eye. 18
19 The Camera up(x,y,z) eye(x,y,z) lookat(x,y,z) 19
20 The Camera glmatrixmode(gl_modelview); glloadidentity(); glulookat(eye.x, eye.y, eye.z, look.x, look.y, look.z, up.x, up.y, up.z); 20
21 The Camera The camera can have an arbitrary orientation and position. Therefore we can think of the camera having its own axes. 21
22 glulookat and the Camera Coordinate System The view matrix V created by glulookat is V u u u d v v v d x y z x x y z y = nx ny nz dz where d x = -eye u, d y = -eye v, d z = -eye n V is postmultiplied by M to form the modelview matrix VM. 22
23 The Camera Camera Movement A camera has six degrees of freedom: 1. slid in 3 directions; and 2. rotated in 3 directions 23
24 The Camera Camera Movement The camera can move along its axes. 24
25 The Camera Camera Movement The camera can move along its axes. This is called sliding the camera. Sliding the camera: for example, move it a distance D along u-axis: eye + Du. 25
26 The Camera Camera Movement To move the camera along the u axis you would simply perform eye = eye + Du To move slide the camera in any direction: eye.x = du*u.x + dv*v.x + dn*n.x eye.y = du*u.y + dv*v.y + dn*n.y eye.z = du*u.z + dv*v.z + dn*n.z v n u 26
27 The Camera Camera Movement Besides physically moving the camera to another location the camera can be tilted in different directions to look at different parts of the scene. 27
28 The Camera Camera Movement We use a plane analogy to describe the cameras movement. a rotation from the horizontal along the length is called PITCH a rotation from the horizontal along the width is called ROLL a rotation around the vertical is called YAW 28
29 Positioning and Pointing the Camera Arbitrary orientation and position (using the aviation terms): (rotate) (change heading) pitch heading or azimuth or bearing 29
30 The Camera Pitch v = cos(θ)v sin(θ)n n = sin(θ)n + cos(θ)v v n 30
31 The Camera Roll u = cos(θ)u + sin(θ)v v = cos(θ)v - sin(θ)u v u 31
32 The Camera Yaw n = cos(θ)n - sin(θ)u u = sin(θ)n + cos(θ)u n u 32
33 The Camera A Teapot Fly By teapot_flyby.exe A Mesh Surface Fly By 33
34 Building a Camera in a Program The Camera class definition class Camera{ private: Point3 eye; Vector3 u,v,n; // view volume shape double viewangle, aspect, neardist, fardist; // tell OpenGL where the camera is void setmodelviewmatrix(); public: Camera(); // default constructor // like glulookat() void set(point3 eye, Point3 look, Vector3 up); void roll(float angle); // roll it void pitch(float angle); // increase pitch void yaw(float angle); // yaw it void slide(float delu, float delv, float deln); // slide it void setshape(float vang, float asp, float neard, float fard); }; 34
35 Building a Camera in a Program (2) The utility routine: setmodelviewmatrix(); void Camera :: setmodelviewmatrix(void) { // load modelview matrix with existing camera values float m[16]; //m is column-organized; m[0~3] = the 1st column! Vector3 evec(eye.x, eye.y, eye.z); // a vector version of eye m[0] = u.x; m[4] = u.y; m[8] = u.z; m[12] = -evec.dot(u); m[1] = v.x; m[5] = v.y; m[9] = v.z; m[13] = -evec.dot(v); m[2] = n.x; m[6] = n.y; m[10] = n.z; m[14] = -evec.dot(n); m[3] = 0; m[7] = 0; m[11] = 0; m[15] = 1.0; glmatrixmode(gl_modelview); glloadmatrixf(m); // load OpenGL s modelview matrix } void Camera:: set(point3 Eye, Point3 look, Vector3 up) { // create a modelview matrix and send it to OpenGL eye.set(eye); // store the given eye position n.set(eye.x - look.x, eye.y - look.y, eye.z - look.z); // make n u.set(up.cross(n)); // make u = up X n n.normalize(); u.normalize(); // make them unit length v.set(n.cross(u)); // make v = n X u setmodelviewmatrix(); // tell OpenGL } 35
36 Projections Parallel Perspective 36
37 Viewing process and graphics pipeline Modelview, projection, and viewport matrices 37
38 Projections Parallel Projection centre of projection at infinity A D A B D C B C projection plane 38
39 Parallel Projection Projections centre of projection at infinity A A B D D C Points on the object are projected to the viewing plane along parallel lines B C projection plane Preserves relative dimensions of the object but does not give a realistic presentation 39
40 40 40 Projections Projections Parallel Projection A D C B projection plane D C B A centre of projection at infinity = z y x z y x p p p
41 Projections Parallel Projection y So all we are really doing is getting rid of the z coordinate to take the coordinates from 3d to 2d!!! z x 41
42 Perspective Projections 42
43 Perspective Transformation First discovered by Donatello, Brunelleschi, and DaVinci during Renaissance Objects closer to viewer look larger Parallel lines appear to converge to single point 43
44 Perspective Projection In the real world, objects exhibit perspective foreshortening: distant objects appear smaller The basic situation: 44
45 Perspective 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? 45
46 Perspective Projection The geometry of the situation is that of similar triangles. View from above: X View plane P (x, y, z) (0,0,0) x =? Z d What is x? 46
47 Perspective Projections Projecting a 3D Point We use similar triangles to project the point onto the plane in the line of the eye. (x,y,z) N z near plane 47
48 Perspective Projections Projecting a 3D Point x /x = N/-z (z in the negative direction) y /y = N/-z Once projected onto a 2D plane the z coordinate is not needed. (x,y,z) (x,y ) N z near plane 48
49 Perspective Projections Properties 1. Parallel lines in 3D will meet at a vanishing point 49
50 Perspective Projections Properties 2. Lines that pass behind the eye of the camera cause a catastropic passage through infinity. 50
51 Perspective Projections Properties 3. Perspective projections usually produce geometrically realistic pictures. 51
52 Setting view volume and aiming camera 52
53 53
54 Stereo Projections Faking depth in a 2D image Based on natural stereoscopic eye-brain system. Objects are not viewed with just one eye, but two eyes. Each eye looks at the object from a slightly different location. 54
55 Stereo Projections 55
56 Stereo Projections In OpenGL we can produce stereo views by creating two side-by-side viewports with slightly different viewing angles. The lookat point stays the same but the location of the eye moves. Human eyes are about 3 inches apart, therefore a good value for D is
57 Stereo Projections eye=(0,-1,2.5) eye=(0.5,-1,2.5) -stereoview.exe 57
58 Taxonomy of Projections 58
59 Taxonomy of Projections Perspective One Point horizon vanishing point 59
60 Taxonomy of Projections Perspective Two Point horizon vanishing point 60
61 Taxonomy of Projections Perspective Three Point horizon vanishing point 61
62 Taxonomy of Projections Perspective Three Point M.C. Escher: Ascending and Descending 62
63 Taxonomy of Projections Orthographic Projections Multiview Orthographic 63
64 Taxonomy of Projections Orthographic Projections Axonometric View Isometric (all three axes are shortened equally) Dimetric (two axes are shortended equally) Trimetric (all axes are shortended unequally) 64
65 Taxonomy of Projections Oblique Projections Combine the properties of Orthographic and Axonometric Preserves the object face; and Gives a better sense of the 3D nature. 65
66 Taxonomy of Projections Oblique Projections 66
CSC 470 Computer Graphics
CSC 47 Computer Graphics Three Dimensional Viewing Today s Lecture Three Dimensional Viewing Developing a Camera Fly through a scene Mathematics of Producing Stereo Views 1 2 Introduction We have already
More informationComputer Graphics using OpenGL, 3 rd Edition F. S. Hill, Jr. and S. Kelley Chapter Three-dimensional Viewing
Computer Graphics using OpenGL, 3 rd Edition F. S. Hill, Jr. and S. Kelley Chapter 7.1-4 Three-dimensional Viewing S. M. Lea University of North Carolina at Greensboro 2007, Prentice Hall Introduction
More informationCS 4204 Computer Graphics
CS 4204 Computer Graphics 3D Viewing and Projection Yong Cao Virginia Tech Objective We will develop methods to camera through scenes. We will develop mathematical tools to handle perspective projection.
More informationOverview. 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 information3D 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 informationCS 543: Computer Graphics Lecture 6 (Part I): 3D Viewing and Camera Control. Emmanuel Agu
CS 543: Computer Graphics Lecture 6 (Part I): 3D Viewing and Camera Control Emmanuel Agu 3D Viewing Similar to taking a photograph Control the lens of the camera Project the object from 3D world to 2D
More informationThree-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 informationThe 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 informationComputer 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 information7. 3D Viewing. Projection: why is projection necessary? CS Dept, Univ of Kentucky
7. 3D Viewing Projection: why is projection necessary? 1 7. 3D Viewing Projection: why is projection necessary? Because the display surface is 2D 2 7.1 Projections Perspective projection 3 7.1 Projections
More informationCITSTUDENTS.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 informationGeometry: 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 informationThe View Frustum. Lecture 9 Sections 2.6, 5.1, 5.2. Robb T. Koether. Hampden-Sydney College. Wed, Sep 14, 2011
The View Frustum Lecture 9 Sections 2.6, 5.1, 5.2 Robb T. Koether Hampden-Sydney College Wed, Sep 14, 2011 Robb T. Koether (Hampden-Sydney College) The View Frustum Wed, Sep 14, 2011 1 / 36 Outline 1 The
More informationFundamental 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 informationOne 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 informationIntroduction 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 informationLecture 9 Sections 2.6, 5.1, 5.2. Wed, Sep 16, 2009
Lecture 9 Sections 2.6, 5.1, 5.2 Hampden-Sydney College Wed, Sep 16, 2009 Outline 1 2 3 4 5 6 Controlling 7 Definition () A frustum is a truncated pyramid. Definition ( ) The view frustum is the region
More informationComputer 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 informationComputer Graphics (CS 543) Lecture 6a: Viewing & Camera Control. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)
Computer Graphics (CS 543) Lecture 6a: Viewing & Camera Control Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) 3D Viewing? Specify a view volume Objects inside view volume
More informationClassical 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 informationCS354 Computer Graphics Viewing and Modeling
Slide Credit: Donald S. Fussell CS354 Computer Graphics Viewing and Modeling Qixing Huang February 21th 2018 Computer Viewing There are three aspects of the viewing process, all of which are implemented
More informationCS380: Computer Graphics Viewing Transformation. Sung-Eui Yoon ( 윤성의 ) Course URL:
CS38: Computer Graphics Viewing Transformation Sung-Eui Yoon ( 윤성의 ) Course URL: http://sglab.kaist.ac.kr/~sungeui/cg/ Class Objectives Know camera setup parameters Understand viewing and projection processes
More informationViewing Transformation
CS38: Computer Graphics Viewing Transformation Sung-Eui Yoon ( 윤성의 ) Course URL: http://sglab.kaist.ac.kr/~sungeui/cg/ Class Objectives Know camera setup parameters Understand viewing and projection processes
More information1 Transformations. Chapter 1. Transformations. Department of Computer Science and Engineering 1-1
Transformations 1-1 Transformations are used within the entire viewing pipeline: Projection from world to view coordinate system View modifications: Panning Zooming Rotation 1-2 Transformations can also
More information3D 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 informationCOMP Computer Graphics and Image Processing. 5: Viewing 1: The camera. In part 1 of our study of Viewing, we ll look at ˆʹ U ˆ ʹ F ˆʹ S
COMP27112 Û ˆF Ŝ Computer Graphics and Image Processing ˆʹ U ˆ ʹ F C E 5: iewing 1: The camera ˆʹ S Toby.Howard@manchester.ac.uk 1 Introduction In part 1 of our study of iewing, we ll look at iewing in
More informationCOMP3421. Introduction to 3D Graphics
COMP3421 Introduction to 3D Graphics 3D coodinates Moving to 3D is simply a matter of adding an extra dimension to our points and vectors: 3D coordinates 3D coordinate systems can be left or right handed.
More informationCOMP3421. Introduction to 3D Graphics
COMP3421 Introduction to 3D Graphics 3D coordinates Moving to 3D is simply a matter of adding an extra dimension to our points and vectors: 3D coordinates 3D coordinate systems can be left or right handed.
More informationViewing and Projection
CSCI 480 Computer Graphics Lecture 5 Viewing and Projection January 25, 2012 Jernej Barbic University of Southern California Shear Transformation Camera Positioning Simple Parallel Projections Simple Perspective
More informationCOMP3421. Introduction to 3D Graphics
COMP3421 Introduction to 3D Graphics 3D coodinates Moving to 3D is simply a matter of adding an extra dimension to our points and vectors: 3D coordinates 3D coordinate systems can be left or right handed.
More information3D 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 information3.1 Viewing and Projection
Fall 2017 CSCI 420: Computer Graphics 3.1 Viewing and Projection Hao Li http://cs420.hao-li.com 1 Recall: Affine Transformations Given a point [xyz] > form homogeneous coordinates [xyz1] > The transformed
More informationOverview 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 informationThree-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 informationProf. 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 information2D 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 informationAnnouncements. 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 informationAdvanced Computer Graphics (CS & SE )
Advanced Computer Graphics (CS & SE 233.420) Topics Covered Picking Pipeline Viewing and Transformations Rendering Modes OpenGL can render in one of three modes selected by glrendermode(mode) GL_RENDER
More informationComputer 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 informationGetting Started. Overview (1): Getting Started (1): Getting Started (2): Getting Started (3): COSC 4431/5331 Computer Graphics.
Overview (1): Getting Started Setting up OpenGL/GLUT on Windows/Visual Studio COSC 4431/5331 Computer Graphics Thursday January 22, 2004 Overview Introduction Camera analogy Matrix operations and OpenGL
More informationChapter 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 informationVisualisation Pipeline : The Virtual Camera
Visualisation Pipeline : The Virtual Camera The Graphics Pipeline 3D Pipeline The Virtual Camera The Camera is defined by using a parallelepiped as a view volume with two of the walls used as the near
More informationDescribe the Orthographic and Perspective projections. How do we combine together transform matrices?
Aims and objectives By the end of the lecture you will be able to Work with multiple transform matrices Describe the viewing process in OpenGL Design and build a camera control APIs Describe the Orthographic
More informationFachhochschule Regensburg, Germany, February 15, 2017
s Operations Fachhochschule Regensburg, Germany, February 15, 2017 s Motivating Example s Operations To take a photograph of a scene: Set up your tripod and point camera at the scene (Viewing ) Position
More informationComputer 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 informationViewing 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 informationCOMP 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 informationTransformation Pipeline
Transformation Pipeline Local (Object) Space Modeling World Space Clip Space Projection Eye Space Viewing Perspective divide NDC space Normalized l d Device Coordinatesd Viewport mapping Screen space Coordinate
More informationComputer Viewing. Prof. George Wolberg Dept. of Computer Science City College of New York
Computer Viewing Prof. George Wolberg Dept. of Computer Science City College of New York Objectives Introduce the mathematics of projection Introduce OpenGL viewing functions Look at alternate viewing
More informationOpenGL Transformations
OpenGL Transformations R. J. Renka Department of Computer Science & Engineering University of North Texas 02/18/2014 Introduction The most essential aspect of OpenGL is the vertex pipeline described in
More informationComputer Graphics 7: Viewing in 3-D
Computer Graphics 7: Viewing in 3-D In today s lecture we are going to have a look at: Transformations in 3-D How do transformations in 3-D work? Contents 3-D homogeneous coordinates and matrix based transformations
More informationChapter 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 informationCSC Graphics Programming. Budditha Hettige Department of Statistics and Computer Science
CSC 307 1.0 Graphics Programming Department of Statistics and Computer Science Graphics Programming OpenGL 3D Drawing 2 3D Graphics Projections Getting 3D to 2D 3D scene 2D image 3 Projections Orthographic
More informationGraphics and Visualization
International University Bremen Spring Semester 2006 Recap Representing graphic objects by homogenous points and vectors Using affine transforms to modify objects Using projections to display objects
More informationViewing 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 informationCOMS 4160: Problems on Transformations and OpenGL
COMS 410: Problems on Transformations and OpenGL Ravi Ramamoorthi 1. Write the homogeneous 4x4 matrices for the following transforms: Translate by +5 units in the X direction Rotate by 30 degrees about
More information3D Graphics for Game Programming (J. Han) Chapter II Vertex Processing
Chapter II Vertex Processing Rendering Pipeline Main stages in the pipeline The vertex processing stage operates on every input vertex stored in the vertex buffer and performs various operations such as
More informationViewing COMPSCI 464. Image Credits: Encarta and
Viewing COMPSCI 464 Image Credits: Encarta and http://www.sackville.ednet.ns.ca/art/grade/drawing/perspective4.html Graphics Pipeline Graphics hardware employs a sequence of coordinate systems The location
More informationViewing 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 informationReminder: Affine Transformations. Viewing and Projection. Shear Transformations. Transformation Matrices in OpenGL. Specification via Ratios
CSCI 420 Computer Graphics Lecture 6 Viewing and Projection Jernej Barbic University o Southern Caliornia Shear Transormation Camera Positioning Simple Parallel Projections Simple Perspective Projections
More informationComputer 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 information1 (Practice 1) Introduction to OpenGL
1 (Practice 1) Introduction to OpenGL This first practical is intended to get you used to OpenGL command. It is mostly a copy/paste work. Try to do it smartly by tweaking and messing around with parameters,
More informationAnnouncement. 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 informationNotes 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 informationCSE 690: GPGPU. Lecture 2: Understanding the Fabric - Intro to Graphics. Klaus Mueller Stony Brook University Computer Science Department
CSE 690: GPGPU Lecture 2: Understanding the Fabric - Intro to Graphics Klaus Mueller Stony Brook University Computer Science Department Klaus Mueller, Stony Brook 2005 1 Surface Graphics Objects are explicitely
More informationCSE528 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 informationLecture 4. Viewing, Projection and Viewport Transformations
Notes on Assignment Notes on Assignment Hw2 is dependent on hw1 so hw1 and hw2 will be graded together i.e. You have time to finish both by next monday 11:59p Email list issues - please cc: elif@cs.nyu.edu
More informationCSE328 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 informationToday. Rendering pipeline. Rendering pipeline. Object vs. Image order. Rendering engine Rendering engine (jtrt) Computergrafik. Rendering pipeline
Computergrafik Today Rendering pipeline s View volumes, clipping Viewport Matthias Zwicker Universität Bern Herbst 2008 Rendering pipeline Rendering pipeline Hardware & software that draws 3D scenes on
More informationComputer Graphics Viewing
Computer Graphics Viewing What Are Projections? Our 3-D scenes are all specified in 3-D world coordinates To display these we need to generate a 2-D image - project objects onto a picture plane Picture
More informationComputer Graphics. Lecture 04 3D Projection and Visualization. Edirlei Soares de Lima.
Computer Graphics Lecture 4 3D Projection and Visualization Edirlei Soares de Lima Projection and Visualization An important use of geometric transformations in computer
More information3D 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 informationWire-Frame 3D Graphics Accelerator IP Core. C Library Specification
Wire-Frame 3D Graphics Accelerator IP Core C Library Specification Kenji Ishimaru 1 / 29 Revision History Rev. Date Author Description 1.0 2015/09/30 Kenji Ishimaru First release
More informationSurface Graphics. 200 polys 1,000 polys 15,000 polys. an empty foot. - a mesh of spline patches:
Surface Graphics Objects are explicitely defined by a surface or boundary representation (explicit inside vs outside) This boundary representation can be given by: - a mesh of polygons: 200 polys 1,000
More informationOrder of Transformations
Order of Transformations Because the same transformation is applied to many vertices, the cost of forming a matrix M=ABCD is not significant compared to the cost of computing Mp for many vertices p Note
More informationModels 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 informationMAE : Lecture #12 - Projection and Perspective. Lecture Overview:
Lecture Overview: Miscellaneous Motivation Projection - basics Means for projecting images: Orthographic viewing - basics Perspective viewing - basics The mathematics of projection Vanishing points Numerical
More information1 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 information3D Viewing Episode 2
3D Viewing Episode 2 1 Positioning and Orienting the Camera Recall that our projection calculations, whether orthographic or frustum/perspective, were made with the camera at (0, 0, 0) looking down the
More information3D Viewing. CS 4620 Lecture 8
3D Viewing CS 46 Lecture 8 13 Steve Marschner 1 Viewing, backward and forward So far have used the backward approach to viewing start from pixel ask what part of scene projects to pixel explicitly construct
More informationMORE OPENGL. Pramook Khungurn CS 4621, Fall 2011
MORE OPENGL Pramook Khungurn CS 4621, Fall 2011 SETTING UP THE CAMERA Recall: OpenGL Vertex Transformations Coordinates specified by glvertex are transformed. End result: window coordinates (in pixels)
More informationINTRODUCTION TO COMPUTER GRAPHICS. It looks like a matrix Sort of. Viewing III. Projection in Practice. Bin Sheng 10/11/ / 52
cs337 It looks like a matrix Sort of Viewing III Projection in Practice / 52 cs337 Arbitrary 3D views Now that we have familiarity with terms we can say that these view volumes/frusta can be specified
More information3D Viewing Episode 2
3D Viewing Episode 2 1 Positioning and Orienting the Camera Recall that our projection calculations, whether orthographic or frustum/perspective, were made with the camera at (0, 0, 0) looking down the
More informationCMSC427 Transformations II: Viewing. Credit: some slides from Dr. Zwicker
CMSC427 Transformations II: Viewing Credit: some slides from Dr. Zwicker What next? GIVEN THE TOOLS OF The standard rigid and affine transformations Their representation with matrices and homogeneous coordinates
More informationCOMP30019 Graphics and Interaction Perspective & Polygonal Geometry
COMP30019 Graphics and Interaction Perspective & Polygonal Geometry Department of Computing and Information Systems The Lecture outline Introduction Perspective Geometry Virtual camera Centre of projection
More informationSo 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 informationViewing. 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 informationProjection and viewing. Computer Graphics CSE 167 Lecture 4
Projection and viewing Computer Graphics CSE 167 Lecture 4 CSE 167: Computer Graphics Review: transformation from the object (or model) coordinate frame to the camera (or eye) coordinate frame Projection
More informationComputer Graphics. Bing-Yu Chen National Taiwan University
Computer Graphics Bing-Yu Chen National Taiwan University Introduction to OpenGL General OpenGL Introduction An Example OpenGL Program Drawing with OpenGL Transformations Animation and Depth Buffering
More informationOverview. 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 informationThe Virtual Camera. The Virtual Camera. Setting the View Volume. Perspective Camera
The Virtual Camera The Virtual Camera The Camera is defined by using a parallelepiped as a view volume with two of the walls used as the near and far view planes OpenGL also allows for a perspective view
More informationCS 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 informationI N T R O D U C T I O N T O C O M P U T E R G R A P H I C S
3D Viewing: the Synthetic Camera Programmer s reference model for specifying 3D view projection parameters to the computer General synthetic camera (e.g., PHIGS Camera, Computer Graphics: Principles and
More informationComputer Graphics: Viewing in 3-D. Course Website:
Computer Graphics: Viewing in 3-D Course Website: http://www.comp.dit.ie/bmacnamee 2 Contents Transformations in 3-D How do transformations in 3-D work? 3-D homogeneous coordinates and matrix based transformations
More informationCIS 636 Interactive Computer Graphics CIS 736 Computer Graphics Spring 2011
CIS 636 Interactive Computer Graphics CIS 736 Computer Graphics Spring 2011 Lab 1a of 7 OpenGL Setup and Basics Fri 28 Jan 2011 Part 1a (#1 5) due: Thu 03 Feb 2011 (before midnight) The purpose of this
More informationINTRODUCTION TO COMPUTER GRAPHICS. cs123. It looks like a matrix Sort of. Viewing III. Projection in Practice 1 / 52
It looks like a matrix Sort of Viewing III Projection in Practice 1 / 52 Arbitrary 3D views } view volumes/frusta spec d by placement and shape } Placement: } Position (a point) } look and up vectors }
More informationViewing. Announcements. A Note About Transformations. Orthographic and Perspective Projection Implementation Vanishing Points
Viewing Announcements. A Note About Transformations. Orthographic and Perspective Projection Implementation Vanishing Points Viewing Announcements. A Note About Transformations. Orthographic and Perspective
More informationCSE 167: Introduction to Computer Graphics Lecture #5: Projection. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017
CSE 167: Introduction to Computer Graphics Lecture #5: Projection Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017 Announcements Friday: homework 1 due at 2pm Upload to TritonEd
More informationViewing. Part II (The Synthetic Camera) CS123 INTRODUCTION TO COMPUTER GRAPHICS. Andries van Dam 10/10/2017 1/31
Viewing Part II (The Synthetic Camera) Brownie camera courtesy of http://www.geh.org/fm/brownie2/htmlsrc/me13000034_ful.html 1/31 The Camera and the Scene } What does a camera do? } Takes in a 3D scene
More informationCOMP30019 Graphics and Interaction Perspective Geometry
COMP30019 Graphics and Interaction Perspective Geometry Department of Computing and Information Systems The Lecture outline Introduction to perspective geometry Perspective Geometry Virtual camera Centre
More information