Honours Graphics 2008 Session 3. Today’s focus Perspective and orthogonal projection Quaternions Graphics camera.

Slides:



Advertisements
Similar presentations
Computer Graphics - Viewing -
Advertisements

Lecture 3: Transformations and Viewing. General Idea Object in model coordinates Transform into world coordinates Represent points on object as vectors.
02/17/05CISC640/440 OpenGL Tutorial1 OpenGL Tutorial CISC 640/440 Computer Graphics TA: Qi Li/Mani Thomas
MAT 594CM S2010Fundamentals of Spatial ComputingAngus Forbes Overview Goals of the course: 1. to introduce real-time 3D graphics programming with openGL.
Computer Graphics Lecture 4 Geometry & Transformations.
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.
3-D Geometry.
Computer Graphics (Fall 2008) COMS 4160, Lecture 4: Transformations 2
OpenGL (II). How to Draw a 3-D object on Screen?
CS 4731: Computer Graphics Lecture 11: 3D Viewing Emmanuel Agu.
Linear Algebra Review CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2005.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Technical Background.
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
Introduction to 3D viewing 3D is just like taking a photograph!
3D coordinate systems X Y Z Right-Hand Coordinate System X Y Z Left-Hand Coordinate System OpenGL uses this! Direct3D uses this!
CS 450: COMPUTER GRAPHICS QUATERNIONS SPRING 2015 DR. MICHAEL J. REALE.
Advanced Computer Graphics Three Dimensional Viewing
Geometric transformations The Pipeline
CO1301: Games Concepts Dr Nick Mitchell (Room CM 226) Material originally prepared by Gareth Bellaby.
Week 5 - Wednesday.  What did we talk about last time?  Project 2  Normal transforms  Euler angles  Quaternions.
CS559: Computer Graphics Lecture 9: Projection Li Zhang Spring 2008.
Viewing Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
Advanced Computer Graphics Spring 2014
CAP 4703 Computer Graphic Methods Prof. Roy Levow Chapter 5.
Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 4: Transformations 2
Stages of Vertex Transformation To specify viewing, modeling, and projection transformations, you construct a 4 × 4 matrix M, which is then multiplied.
Computer Graphics I, Fall 2010 Computer Viewing.
Quaternionic Splines of Paths Robert Shuttleworth Youngstown State University Professor George Francis, Director illiMath2001 NSF VIGRE REU UIUC-NCSA.
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.
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.
Projections. Viewports Windows can have separate viewports void glViewport(GLint x, GLint y, GLsizei width, GLsizei height ) x, y - Specify the lower.
©2005, Lee Iverson Lee Iverson UBC Dept. of ECE EECE 478 Viewing and Projection.
Comparing Two Motions Jehee Lee Seoul National University.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Classical Viewing Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Quaternion 靜宜大學資工系 蔡奇偉副教授 大綱  History of Quaternions  Definition of Quaternion  Operations  Unit Quaternion  Operation Rules  Quaternion Transforms.
Classical Viewing Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Transformations: Projection CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
 Learn some important functions and process in OpenGL ES  Draw some triangles on the screen  Do some transformation on each triangle in each frame.
Honours Graphics 2008 Session 2. Today’s focus Vectors, matrices and associated math Transformations and concatenation 3D space.
CS 4731: Computer Graphics Lecture 12: More 3D Viewing Emmanuel Agu.
CS559: Computer Graphics Lecture 9: 3D Transformation and Projection Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
Euler Angles This means, that we can represent an orientation with 3 numbers Assuming we limit ourselves to 3 rotations without successive rotations about.
Quaternionic Splines of Paths Robert Shuttleworth Youngstown State University Professor George Francis, Director illiMath2001 NSF VIGRE REU UIUC-NCSA.
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.
OpenGL LAB III.
Graphics Graphics Korea University kucg.korea.ac.kr Mathematics for Computer Graphics 고려대학교 컴퓨터 그래픽스 연구실.
CS 490: Computer Graphics Chapter 5: Viewing. Interactive Computer GraphicsChapter Overview Specifying the viewpoint Specifying the projection Types.
CSE 681 Brief Review: Vectors. CSE 681 Vectors Direction in space Normalizing a vector => unit vector Dot product Cross product Parametric form of a line.
What you will learn about today
Viewing.
Math Fundamentals Maths revisit.
Computer Viewing.
Isaac Gang University of Mary Hardin-Baylor
In mathematics, the quaternions are a number system that extends the complex numbers. They were first described by Irish mathematician Sir William Rowan.
What you will learn about today
UMBC Graphics for Games
Type of View Perspective View COP(Center of Plane) Diminution of size
University of New Mexico
Computer Graphics 3Practical Lesson
Chapter 3 Viewing.
Vectors and Dot Products
The Pinhole Camera Model
Presentation transcript:

Honours Graphics 2008 Session 3

Today’s focus Perspective and orthogonal projection Quaternions Graphics camera

Projections Visualizing 3D data on a 2D screen requires projection of the data onto a 2D plane Several projection models exist, with varying qualities We’re interested in orthogonal and perspective projection

Perspective projection

Perspective projection, cont. Starting from world coordinate space:

Increasing focal length and distance of the camera to infinity changes perspective into orthogonal projection

Orthogonal projection Flat, 2D projection Used when precise profiles or measurements need to be displayed Special case of perspective projection, when focal length approaches infinity

Quaternions Developed by Sir William Rowan Hamilton in 1843 Generally superceded by vectors and matrices, but still very useful in applied mathematics and computer graphics Specifically useful to compute 3D rotations Consists of scalar and “vector” components

Quaternions, cont. Defined as an extension to the complex numbers: three components i, j and k all are squareroots of -1, hence Furthermore

Quaternions, cont. Finally Quaternion addition and subtraction

Quaternions, cont. Magnitude of a quaternion Quaternion multiplication

Quaternions, cont. For graphics purposes a unit quaternion is used, which has the property that Unit quaternions represent rotation / orientation

Quaternions, cont. Quaternion to rotation matrix conversion

Graphics camera Both DirectX and OpenGL expose camera parameters that consist of View position View target Relative view-up direction

Camera commands OpenGL void gluLookAt(eyeX, eyeY, eyeZ, centerX, centerY, centerZ, upX, upY, upZ ) DirectX D3DXMatrixLookAtLH(mat, eye, center, up); DX9Device.SetTransform(D3DTS_VIEW, mat);

Homework Write a camera library that makes use of quaternions. Allow for keyboard and mouse input to control the camera. For next session