Coordinate Systems Lecture 20 Wed, Oct 15, 2003. Object Coordinates Each object has its own “local” coordinate system, called object coordinates. Normally.

Slides:



Advertisements
Similar presentations
Computer Graphics - Viewing -
Advertisements

Graphics Pipeline.
Computer Graphic Creator: Mohsen Asghari Session 2 Fall 2014.
Computer Graphics Lecture 8 Arbitrary Viewing II: More Projection, Clipping and Mathematics of 3D Viewing.
The View Frustum and the Camera Lecture 19 Fri, Oct 10, 2003.
Based on slides created by Edward Angel
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Computer Viewing Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Part I: Basics of Computer Graphics Viewing Transformation and Coordinate Systems Chapter
Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 5: Viewing
Now Playing: Coulibaly Amadou & Mariam from Dimanche a Bamako Released August 2, 2005.
Viewing Doug James’ CG Slides, Rich Riesenfeld’s CG Slides, Shirley, Fundamentals of Computer Graphics, Chap 7 Wen-Chieh (Steve) Lin Institute of Multimedia.
4.1si31_2001 SI31 Advanced Computer Graphics AGR Lecture 4 Projection Clipping Viewport Transformation.
OpenGL (II). How to Draw a 3-D object on Screen?
1 Chapter 5 Viewing. 2 Perspective Projection 3 Parallel Projection.
Introduction to OpenGL Pipeline From Programmer View Tong-Yee Lee.
12.1 Si23_03 SI23 Introduction to Computer Graphics Lecture 12 – 3D Graphics Transformation Pipeline: Projection and Clipping.
UniS CS297 Graphics with Java and OpenGL Viewing, the model view matrix.
Week 2 - Wednesday CS361.
Viewing Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
C O M P U T E R G R A P H I C S Guoying Zhao 1 / 67 C O M P U T E R G R A P H I C S Guoying Zhao 1 / 67 Computer Graphics Three-Dimensional Graphics III.
Graphics Graphics Korea University cgvr.korea.ac.kr 3D Viewing 고려대학교 컴퓨터 그래픽스 연구실.
University of Palestine Computer Graphics ITGD3107 Prepare: Mohammed J. el-masre Nidal M. El-Borbar Supervision:
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Demetriou/Loizidou – ACSC330 – Chapter 5 Viewing Dr. Giorgos A. Demetriou Computer Science Frederick Institute of Technology.
CAP4730: Computational Structures in Computer Graphics 3D Transformations.
Computer Graphics I, Fall 2010 Computer Viewing.
10/7/04© University of Wisconsin, CS559 Fall 2004 Last Time Transformations Homogeneous coordinates Directions Rotation Geometry 101 – Points, edges, triangles/polygons.
OpenGL The Viewing Pipeline: Definition: a series of operations that are applied to the OpenGL matrices, in order to create a 2D representation from 3D.
The View Matrix Lecture 21 Fri, Oct 17, The View Matrix The function gluLookAt() creates a matrix representing the transformation from world coordinates.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
The Camera Analogy ► Set up your tripod and point the camera at the scene (viewing transformation) ► Arrange the scene to be photographed into the desired.
Chapters 5 2 March Classical & Computer Viewing Same elements –objects –viewer –projectors –projection plane.
Three-Dimensional Viewing
12/24/2015 A.Aruna/Assistant professor/IT/SNSCE 1.
©2005, Lee Iverson Lee Iverson UBC Dept. of ECE EECE 478 Viewing and Projection.
Graphics CSCI 343, Fall 2015 Lecture 16 Viewing I
Viewpoints and Transformations CSIS 5838: Graphics and Animation for Gaming.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Classical Viewing Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Rendering Pipeline Fall, D Polygon Rendering Many applications use rendering of 3D polygons with direct illumination.
Classical Viewing Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Introduction to Computer Graphics: Viewing Transformations Rama C
Programming with OpenGL Part 2: Complete Programs Ed Angel Professor of Emeritus of Computer Science University of New Mexico.
CS552: Computer Graphics Lecture 11: Orthographic Projection.
Coordinate Systems Lecture 1 Fri, Sep 2, The Coordinate Systems The points we create are transformed through a series of coordinate systems before.
GL transformations-models. x' = x+t x y' = y+t y z' = z+t z t x t y s x =s y =s z t z uniform nonuniform?!!?? x' = x·s x y' =
Viewing and Projection. The topics Interior parameters Projection type Field of view Clipping Frustum… Exterior parameters Camera position Camera orientation.
Unit 4D:2-3 Dimensional Shapes LT5: I can identify three-dimensional figures. LT6: I can calculate the volume of a cube. LT7: I can calculate the surface.
CS 551 / 645: Introductory Computer Graphics Viewing Transforms.
Viewing Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Computer Viewing Isaac Gang University of Mary Hardin-Baylor.
OpenGL LAB III.
Viewing. Classical Viewing Viewing requires three basic elements - One or more objects - A viewer with a projection surface - Projectors that go from.
Computer Graphics Lecture 41 Viewing Using OpenGL Taqdees A. Siddiqi
Outline 3D Viewing Required readings: HB 10-1 to 10-10
Introduction to 3-D Viewing Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, October 27, 2003.
Three Dimensional Viewing
Computer Graphics CC416 Week 14 3D Graphics.
Viewing.
Rendering Pipeline Aaron Bloomfield CS 445: Introduction to Graphics
CSCE 441 Computer Graphics 3-D Viewing
2D Viewing Pipeline.
Modeling 101 For the moment assume that all geometry consists of points, lines and faces Line: A segment between two endpoints Face: A planar area bounded.
Three Dimensional Viewing
CSC4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University View & Projection.
Computer Graphics (Spring 2003)
Projection in 3-D Glenn G. Chappell
The Graphics Pipeline Lecture 5 Mon, Sep 3, 2007.
THREE-DIMENSIONAL VIEWING
Presentation transcript:

Coordinate Systems Lecture 20 Wed, Oct 15, 2003

Object Coordinates Each object has its own “local” coordinate system, called object coordinates. Normally the origin of an object is placed at a convenient point. Sphere – at the center. Rectangular box – at the center or at a corner. Cone – at the center of the base or at the vertex.

Model Coordinates The entire scene, including all of its objects, is drawn in model coordinates. The origin of the scene is placed at a convenient point.

Model Coordinates In most cases, the local origins of the various objects are not the same as the origin of the model. The objects must be moved to their proper locations relative to the model’s origin. This is done using translations, rotations, etc.

Camera (Eye) Coordinates The camera has its own coordinate system. The camera is located at the origin. It is facing the negative z-direction. It’s “up” direction is in the positive y- direction.

Camera (Eye) Coordinates To “move” the camera is to apply transformations to the entire scene. This puts the scene in camera, or eye, coordinates. In other words, it is the scene that is moved, not the camera.

Camera (Eye) Coordinates Given that the scene already contains a number of transformations that place the individual objects, where should the camera transformations be done in order to move the entire scene?

Example CameraMover.cpp mesh.cpp Comment out the gluLookAt() function call. Replace it with  glTranslatef(0, 0, -eyeDist);  glRotatef(eyePitch, 1, 0, 0);  glRotatef(-eyeYaw, 0, 1, 0);

Device Coordinates Once the scene is in camera coordinates, it is then transformed into device coordinates: -1  x  1 -1  y  1 -1  z  1. Now the volume is a cube, 2 units on a side, centered at the origin.

Device Coordinates This transformation is not an isometry. Angles are not preserved. Distances are not preserved. Foreshortening occurs.

Device Coordinates Then the contents of the cube are clipped by the six sides of the cube. Why now?

Device Coordinates Also, hidden surfaces are removed in device coordinates. Why now?

Window Coordinates Device coordinates are projected onto the 2-dimensional window coordinate system. This is done (conceptually) in two stages: (x, y, z)  (x, y) (orthographic) (x, y)  ((x + 1)/2*w, (y + 1)/2*h), where w and h are the screen width and height.

The Graphics Pipeline In the graphics pipeline, what takes place between application of the modelview matrix and application of the projection matrix? What takes place between application of the projection matrix and conversion to window coordinates? When does rasterization occur?