Projection v VP u VPN n.

Slides:



Advertisements
Similar presentations
Computer Graphics - Viewing -
Advertisements

1 View Shandong University Software College Instructor: Zhou Yuanfeng
The View Frustum and the Camera Lecture 19 Fri, Oct 10, 2003.
Based on slides created by Edward Angel
Viewing and Transformation
Viewing and Projections
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.
OpenGL (II). How to Draw a 3-D object on Screen?
CS 4731: Computer Graphics Lecture 11: 3D Viewing Emmanuel Agu.
Introduction to OpenGL Pipeline From Programmer View Tong-Yee Lee.
Noggin (BYU Students, SIGGRAPH 2006). Introduction to OpenGL Programming Rick Skarbez, Instructor COMP 575 September 11, 2007.
Computer Graphics 3D Transformations. 3D Translation Remembering 2D transformations -> 3x3 matrices, take a wild guess what happens to 3D transformations.
Development of Interactive 3D Virtual World Applications
CS 470 Introduction to Computer Graphics Basic 3D in OpenGL.
Introduction to 3D viewing 3D is just like taking a photograph!
2002 by Jim X. Chen: 2D viewing –Window –Viewport 3D viewing –Projection methods and viewing volumes –Normalization –Clipping.
3D coordinate systems X Y Z Right-Hand Coordinate System X Y Z Left-Hand Coordinate System OpenGL uses this! Direct3D uses this!
UBI 516 Advanced Computer Graphics Three Dimensional Viewing
Advanced Computer Graphics Three Dimensional Viewing
Computer Graphics, KKU. Lecture 131 Transformation and Viewing in OpenGL.
Geometric transformations The Pipeline
CS559: Computer Graphics Lecture 9: Projection Li Zhang Spring 2008.
Fundamentals of Computer Graphics Part 5 Viewing prof.ing.Václav Skala, CSc. University of West Bohemia Plzeň, Czech Republic ©2002 Prepared with Angel,E.:
Introduction to OpenGL 1. 2 OpenGL A Graphics rendering API introduced in 1992 by Silicon Graphics Inc Provide the low-level functions to access graphics.
Computer Graphics Bing-Yu Chen National Taiwan University.
Computer Graphics I, Fall 2010 Computer Viewing.
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.
OpenGL Viewing and Modeling Transformation Geb Thomas Adapted from the OpenGL Programming Guidethe OpenGL Programming Guide.
Graphics Graphics Korea University kucg.korea.ac.kr Viewing 고려대학교 컴퓨터 그래픽스 연구실.
Viewing and Transformation. Pixel pipeline Vertex pipeline Course Map Transformation & Lighting Primitive assembly Viewport culling & clipping Texture.
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.
CGGM Lab. Tan-Chi Ho 2001 Viewing and Transformation.
Projections. Viewports Windows can have separate viewports void glViewport(GLint x, GLint y, GLsizei width, GLsizei height ) x, y - Specify the lower.
Viewing and Projection
Chap 3 Viewing and Transformation
CS 4731: Computer Graphics Lecture 12: More 3D Viewing Emmanuel Agu.
Implement of transformation,projection, viewing Hanyang University Jungsik Park.
OpenGL LAB III.
CS 490: Computer Graphics Chapter 5: Viewing. Interactive Computer GraphicsChapter Overview Specifying the viewpoint Specifying the projection Types.
CSC Graphics Programming
Viewing 고려대학교 컴퓨터 그래픽스 연구실 kucg.korea.ac.kr.
Three Dimensional Viewing
Perspective projection
Computer Graphics CC416 Week 14 3D Graphics.
Viewing.
Computer Viewing.
Courtesy of Drs. Carol O’Sullivan / Yann Morvan Trinity College Dublin
Isaac Gang University of Mary Hardin-Baylor
Prof. Lizhuang Ma Shanghai Jiao Tong University
Normalizing Transformation (I)
Projection v VP u VPN n.
VIEWING 2D viewing Window Viewport
CSC461: Lecture 19 Computer Viewing
Fundamentals of Computer Graphics Part 5 Viewing
CSC4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University View & Projection.
Computer Graphics, KKU. Lecture 13
Three-Dimensional viewing
Projections and Hidden Surface Removal
Type of View Perspective View COP(Center of Plane) Diminution of size
University of New Mexico
Interactive Computer Graphics Viewing
Computer Graphics 3Practical Lesson
Prof. Lizhuang Ma Shanghai Jiao Tong University
Computer Graphics Computer Viewing
Chapter 3 Viewing.
3D Viewing.
THREE-DIMENSIONAL VIEWING II
THREE-DIMENSIONAL VIEWING
Computer Viewing Ed Angel Professor Emeritus of Computer Science
Presentation transcript:

Projection v VP u VPN n

Projection v VRP u VRP n Eye Point

Camera & World Up Vector Look At Vector

Orthographic Projection View Plane Back Clipping Plane VPN Front Clipping Plane

In OpenGL glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far) far The direction of projection is parallel to Z-axis. Looking at the negative direction near top left Back Clipping Plane VPN right bottom Front Clipping Plane

Perspective Projection View Plane Back Clipping Plane VPN Front Clipping Plane

In OpenGL glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far) far The direction of projection is parallel to Z-axis. Looking at the negative direction near top left VPN right Back Clipping Plane bottom Front Clipping Plane

In OpenGL gluPerspective(GLdouble fovy, GLdouble aspect, GLdouble near, GLdouble far) far The direction of projection is parallel to Z-axis. Looking at the negative direction. Aspect = w/h near w VPN h Back Clipping Plane fovy Front Clipping Plane

gluLookAt gluLookAt(GLdouble eyex, GLdouble eyey, GLdouble eyez, GLdouble latx, GLdouble laty, GLdouble latz, GLdouble upx, GLdouble upy, GLdouble upz) The direction of projection is parallel to Z-axis. Looking at the negative direction. Aspect = w/h far near up w VPN h Back Clipping Plane fovy lat Front Clipping Plane

Parallel Projection

Parallel Projection (x,y,d) x z y (x,y,z) d (x,y,z) (x,y,d)

Perspective Projection

Perspective Projection xp=x(zprp – zvp)/ (zprp – z) View Plane yp=y(zprp – zvp)/ (zprp – z) (x,y,z) dp=(zprp – zvp) (xp,yp,zvp) zprp dp

Perspective Projection xp=x(zprp – zvp)/ (zprp – z) yp=y(zprp – zvp)/ (zprp – z) dp=(zprp – zvp) x y z 1 xh yh zh h 1 1 0 0 0 1 0 0 0 0 -zvp/dp zvp(zprp/dp) 0 0 -1/dp zprp/dp = h = (zprp-z/dp) xp=xh/h yp=yh/h

Graphics Pipeline Modeling Coordinates World Coordinates Viewing Transformation Viewing Transformation Viewing Coordinates Projection Coordinates Projection Transformation Normalization Transformation Normalized Projection Coordinates Device Coordinates Workstation Transformation