Defining the Viewing Coordinate System

Slides:



Advertisements
Similar presentations
Computer Graphics - Viewing -
Advertisements

Three Dimensional Viewing
Three Dimensional Modeling Transformations
Kinematic Modelling in Robotics
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,
CS 352: Computer Graphics Chapter 5: Viewing. Interactive Computer GraphicsChapter Overview Specifying the viewpoint Specifying the projection Types.
3-D Geometry.
Essentials of Interactive Computer Graphics: Concepts and Implementation K. Sung, P. Shirley, S. Baer Chapter 14 Chapter 14: The Camera.
Linear Algebra Review CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2005.
CS 450: COMPUTER GRAPHICS 3D TRANSFORMATIONS SPRING 2015 DR. MICHAEL J. REALE.
3D VIEWING ILLUSTRATED. WHAT YOU SEE DEPENDS ON YOUR POSITION In the real world, what you see depends on where you stand, the direction you look, how.
CHS Physics Multiplying Vectors. Three Possibilities 1. Multiplying a Vector by a Scalar 2. Multiplying Vector by a Vector 1. Scalar Product 2. Vector.
Introduction to 3D Computer Graphics and Virtual Reality McConnell text.
Viewing and Projections
C O M P U T E R G R A P H I C S Jian Chen January 15, D Viewing II 1/23 3D Viewing II By Andries van Dam.
Part II (The Synthetic Camera)
The Viewing Pipeline (Chapter 4) 5/26/ Overview OpenGL viewing pipeline: OpenGL viewing pipeline: – Modelview matrix – Projection matrix Parallel.
CS559: Computer Graphics Lecture 9: Projection Li Zhang Spring 2008.
Viewing Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
Computer Graphics Bing-Yu Chen National Taiwan University.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
CAP4730: Computational Structures in Computer Graphics 3D Transformations.
Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 3 of 41 William H. Hsu Department of Computing.
10/3/02 (c) 2002 University of Wisconsin, CS 559 Last Time 2D Coordinate systems and transformations.
Computer Graphics I, Fall 2010 Computer Viewing.
SCARA – Forward Kinematics
Viewing CS418 Computer Graphics John C. Hart. Graphics Pipeline Homogeneous Divide Model Coords Model Xform World Coords Viewing Xform Still Clip Coords.
The Camera Course Information CVG: Programming 4 My Name: Mark Walsh Website: Recommended Reading.
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.
CSE Real Time Rendering Week 5. Slides(Some) Courtesy – E. Angel and D. Shreiner.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Three-Dimensional Viewing Hearn & Baker Chapter 7
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
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Classical Viewing Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Composite 3D Transformations. Example of Composite 3D Transformations Try to transform the line segments P 1 P 2 and P 1 P 3 from their start position.
Taxonomy of Projections FVFHP Figure Taxonomy of Projections.
A Photograph of two papers
CS559: Computer Graphics Lecture 9: 3D Transformation and Projection Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
Orthonormal Basis Cartesian Coordinate System – Unit vectors: i, j, k – Normalized to each other – Unique representation for each position!! – Convenient!
CS 551 / 645: Introductory Computer Graphics Viewing Transforms.
Viewing Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
CS5500 Computer Graphics March 20, Computer Viewing Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts.
1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Computer Viewing Isaac Gang University of Mary Hardin-Baylor.
Viewing. Classical Viewing Viewing requires three basic elements - One or more objects - A viewer with a projection surface - Projectors that go from.
CS 490: Computer Graphics Chapter 5: Viewing. Interactive Computer GraphicsChapter Overview Specifying the viewpoint Specifying the projection Types.
A Photograph of two papers The Model: 2 papers – 8cm x 8cm and 5cm x 5cm The Camera – Simple pinhole – No focusing capability The Scene – Arrangements.
Rendering Pipeline Fall, 2015.
Viewing.
Computer Viewing.
Part II (The Synthetic Camera)
3D Viewing cgvr.korea.ac.kr.
CSCE 441 Computer Graphics 3-D Viewing
3D Transformation Pipeline
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2016
CSC461: Lecture 19 Computer Viewing
A Photograph of two papers
Three Dimensional Viewing
Computer Graphics Lecture 20
Chapter V Vertex Processing
Last Time Canonical view pipeline Projection Local Coordinate Space
Viewing (Projections)
Computer Graphics Computer Viewing
THREE-DIMENSIONAL VIEWING II
Computer Viewing Ed Angel Professor Emeritus of Computer Science
CS 352: Computer Graphics Chapter 5: Viewing.
Presentation transcript:

Defining the Viewing Coordinate System 3-D Graphics

Constructing the View Volume Position Up vector Look vector We need to know 6 things about the synthetic camera model: Position of the camera -> P (x, y, z) Look vector -> V (x, y, z) Up vector -> U (x, y, z) Note that with look and up vectors, we know the orientation of the camera

Constructing the View Volume Front clipping plane Back clipping plane Width angle Height angle Aspect ratio of the film (ratio of width to height) View angle (or height angle): determines how “wide” the frustum will be Note that the width angle can be inferred from the aspect ratio and the height angle Front and back clipping planes: limit the extend of the camera’s view. Only render objects within the two planes Optional parameter: focal length: often used for photorealistic rendering. Objects near the focal length are sharp (in focus), objects away from the focal lengths appear blurry. Note that your camera does not have to implement focal length blurring

1. Position Where is the camera located with respect to the origin? For our camera in 3D space, we use a right-handed coordinate system Open your right hand, align your palm and thumb with the +x axis, point your finger along the +y axis, and your middle finger will point towards the +z axis. If you are looking at the screen, the z axis will be positive coming towards you Means that you are typically looking down the negative z axis

2 & 3. Orientation: Look and Up Vectors Where the camera is looking is specified by either: A 3D point in space that you are looking at (the LookAt point), or A direction in which your are looking towards (the look vector) The orientation adds the rotation around the look vector Which can be represented as the up vector Up vector Look vector point to look at (x’, y’, z’) camera Position -z z y x

2 & 3. Orientation: Look and Up Vectors Look Vector Direction the camera is point 3 degrees of freedom (can be any vector in 3-space) Up Vector Determines how camera is rotated around the Look Vector For example, hold the camera horizontally or vertically Up vector CANNOT be parallel to the Look Vector… But doesn’t need to be perpendicular either (for ease of specification). The actual orientation will be defined by the part of the vector perpendicular to the look vector   Look Vector Up vector Look vector Position Projection of Up vector

Camera Coordinate System (u, v, w) Some conventions use (u, v, n) Note that: w = homogeneous coordinate system n = normal

Camera Coordinate System (u, v, w) The equivalent of x, y, z axes in camera space are unit vectors u, v, and w (or n). Also a right handed coordinate system w is a unit vector in the opposite direction of the look vector v is the part of the up vector perpendicular to the look vector, normalized to unit length u is the unit vector perpendicular to both v and w.

Camera Coordinate System (u, v, w) There are three common transformations that use the u, v, w coordinate system Roll: rotate around w Yaw: rotate around v Pitch: rotate around u

Finding (u, v, w)  

Finding (u, v, w) Finding v: Problem: up vector does not have to be perpendicular to the look vector. So how do I find v given the up vector? Let’s get back to that later. We’ll try to find u first.

Finding (u, v, w) Finding u. We know that u is perpendicular to both v and w, but we don’t have v yet (only upV) However, we do know that v is determined by a rotation leading to w. Therefore upV and w will span the same plane regardless of whether or not upV and w are perpendicular. So to find u, we can use the cross product using :  

Finding (u, v, w)  

Thanks…