1 Project 2: Navigation five ways to navigate Absolute Rotate/Translate Keyboard Absolute Lookat Keyboard move wrt global coordinate system Relative Rolling.

Slides:



Advertisements
Similar presentations
Computer Graphics - Viewing -
Advertisements

Using GLU/GLUT Objects GLU/GLUT provides very simple object primitives glutWireCube glutWireCone gluCylinder glutWireTeapot.
1 Computer Graphics Week6 –Basic Transformations- Translation & Scaling.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner Viewing/Projections I.
Lab 1: OpenGL Tutorial CS 282. What’s the plan for today? Go over our framework code. Learn some basic OpenGL! Reveal Lab 1 Answer questions.
Based on slides created by Edward Angel
1 3D modelling with OpenGL Brian Farrimond Robina Hetherington.
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.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Rasterization Week 6,
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner Lighting/Shading II Week.
Objectives Learn to build arbitrary transformation matrices from simple transformations Learn to build arbitrary transformation matrices from simple transformations.
COMP322/S2000/L221 Relationship between part, camera, and robot (cont’d) the inverse perspective transformation which is dependent on the focal length.
Virtual Trackball Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2008 Tamara Munzner Transformations III Week.
TA: Zhicheng Yan Sushma S Kini Mary Pietrowicz
CS 4731: Computer Graphics Lecture 11: 3D Viewing Emmanuel Agu.
Hierarchical Transformations Hierarchical Models Scene Graphs
Computer Vision Group Prof. Daniel Cremers Autonomous Navigation for Flying Robots Lecture 3.1: 3D Geometry Jürgen Sturm Technische Universität München.
A Camera Class for OpenGL John McGuiness October 2006.
Mouse-Based Viewing & Navigation Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, November 3, 2003.
Scan Conversion. Also known as rasterization In our programs objects are represented symbolically –3D coordinates representing an object’s position –Attributes.
CS 480/680 Computer Graphics Representation Dr. Frederick C Harris, Jr. Fall 2012.
OpenGL Matrices and Transformations Angel, Chapter 3 slides from AW, Red Book, etc. CSCI 6360.
2003CS Hons RW778 Graphics1 Chapter 5: Transforming Objects 5.2 Introduction to Transformations 5.2 Introduction to Transformations –Affine transformations.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 4: Transformations 2
Computer Graphics I, Fall 2010 Computer Viewing.
Modeling with OpenGL Practice with OpenGL transformations.
Advanced Viewing Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Friday, October 31, 2003.
Computer Graphics I, Fall 2010 OpenGL Transformations.
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 OpenGL Transformations.
Transformations Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
Geometric Transformations Sang Il Park Sejong University Many slides come from Jehee Lee’s.
University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell Hierarchical Modeling.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner Viewing/Projections IV.
Coordinate Systems Lecture 1 Fri, Sep 2, The Coordinate Systems The points we create are transformed through a series of coordinate systems before.
 2.3: Reflections. What is a Reflection?  Reflection or flip is a transformation in which a figure is reflected on a line called the line of reflection.
Homogeneous Coordinates and Matrix Representations Cartesian coordinate (x, y, z) Homogeneous coordinate (x h, y h, z h, h) Usually h = 1. But there are.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2010 Tamara Munzner Viewing/Projection V,
Mobile & Casual Gaming OpenGL ES Intro. /red/chapter03.html.
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.
TA: Ryan Freedman Sushma Kini Chi Zhou.  Due Date: March , 12:30 PM  We want a zip folder named cs418_mp1_{netid}.zip which contains  Source.
CSCE 441: Computer Graphics: Hierarchical Models Jinxiang Chai.
OpenGL LAB III.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2008 Tamara Munzner Viewing/Projections I.
OpenGL Matrices and Transformations Angel, Chapter 3 slides from AW, Red Book, etc. CSCI 6360/4360.
Objectives Introduce standard transformations Introduce standard transformations Derive homogeneous coordinate transformation matrices Derive homogeneous.
CSE 167 [Win 17], Lecture 2: Review of Basic Math Ravi Ramamoorthi
Viewing.
School of Computer Science
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2016
Computer Viewing.
Summary of Properties of 3D Affine Transformations
Transformations V, Viewing I Week 3, Fri Jan 22
Isaac Gang University of Mary Hardin-Baylor
3D Computer Graphics (3080/GV10) Week 5-6 Tutorial 3
Projection in 3-D Glenn G. Chappell
Rigid Body Transformations
The Modelview Matrix Lecture 8 Mon, Sep 10, 2007.
University of New Mexico
Transformations III Week 3, Mon Jan 21
Computer Graphics Computer Viewing
Viewing/Projections I Week 3, Fri Jan 25
Computer Viewing Ed Angel Professor Emeritus of Computer Science
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2016
Rigid Body Transformations
Hierarchical Modeling
CS 352: Computer Graphics Chapter 5: Viewing.
Presentation transcript:

1 Project 2: Navigation five ways to navigate Absolute Rotate/Translate Keyboard Absolute Lookat Keyboard move wrt global coordinate system Relative Rolling Ball Mouse spin around with mouse, as discussed in class Relative Flying Relative Mouselook use both mouse and keyboard, move wrt camera template: colored ground plane

2 Roll/Pitch/Yaw

3

4

5 Demo

6 Hints: Viewing don’t forget to flip y coordinate from mouse window system origin upper left OpenGL origin lower left all viewing transformations belong in modelview matrix, not projection matrix

7 Hint: Incremental Relative Motion motion is wrt current camera coords maintaining cumulative angles wrt world coords would be difficult computation in coord system used to draw previous frame (what you see!) is simple at time k, want p' = I k I k-1 ….I 5 I 4 I 3 I 2 I 1 Cp thus you want to premultiply: p’=ICp but postmultiplying by new matrix gives p’=CIp OpenGL modelview matrix has the info! sneaky trick: dump out modelview matrix with glGetDoublev() wipe the stack with glIdentity() apply incremental update matrix apply current camera coord matrix be careful to leave the modelview matrix unchanged after your display call (using push/pop)

8 Caution: OpenGL Matrix Storage OpenGL internal matrix storage is columnwise, not rowwise a e i m b f j n c g k o d h l p opposite of standard C/C++/Java convention possibly confusing if you look at the matrix from glGetDoublev()!