Computer Graphics. Coordinate Systems and Change of Frames. Based on slides by Dianna Xu, Bryn Mawr College

Similar documents
C O M P U T E R G R A P H I C S. Computer Graphics. Three-Dimensional Graphics I. Guoying Zhao 1 / 52

Geometry. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

CS452/552; EE465/505. Geometry Transformations

Today s Agenda. Geometry

Objectives. Geometry. Coordinate-Free Geometry. Basic Elements. Transformations to Change Coordinate Systems. Scalars

Geometry. Prof. George Wolberg Dept. of Computer Science City College of New York

Basic Elements. Geometry is the study of the relationships among objects in an n-dimensional space

Objectives. Geometry. Basic Elements. Coordinate-Free Geometry. Transformations to Change Coordinate Systems. Scalars

CT5510: Computer Graphics. Transformation BOCHANG MOON

The Importance of Matrices in the DirectX API. by adding support in the programming language for frequently used calculations.

Lecture 4: Transformations and Matrices. CSE Computer Graphics (Fall 2010)

To Do. Outline. Translation. Homogeneous Coordinates. Foundations of Computer Graphics. Representation of Points (4-Vectors) Start doing HW 1

Course no. DIS4566 National Chiao Tung Univ, Taiwan By: I-Chen Lin, Assistant Professor

Column and row space of a matrix

GEOMETRIC TRANSFORMATIONS AND VIEWING

Overview. By end of the week:

CS230 : Computer Graphics Lecture 6: Viewing Transformations. Tamar Shinar Computer Science & Engineering UC Riverside

521493S Computer Graphics Exercise 2 Solution (Chapters 4-5)

For each question, indicate whether the statement is true or false by circling T or F, respectively.

Transformations. CSCI 420 Computer Graphics Lecture 4

Viewing. Reading: Angel Ch.5

Transformations Computer Graphics I Lecture 4

Viewing with Computers (OpenGL)

On the Midterm Exam. Monday, 10/17 in class. Closed book and closed notes. One-side and one page cheat sheet is allowed. A calculator is allowed

Today. Today. Introduction. Matrices. Matrices. Computergrafik. Transformations & matrices Introduction Matrices

COMP30019 Graphics and Interaction Three-dimensional transformation geometry and perspective

Transformations. CSCI 420 Computer Graphics Lecture 5

Transformations. OpenGL Transformations. 4x4 Model-view Matrix (this lecture) OpenGL Transformation Matrices. 4x4 Projection Matrix (next lecture)

Transformations Computer Graphics I Lecture 4

CS 418: Interactive Computer Graphics. Projection

Computer Viewing. Prof. George Wolberg Dept. of Computer Science City College of New York

Transformations. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Lecture 4: Viewing. Topics:

3D Viewing. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 9

1 Transformations. Chapter 1. Transformations. Department of Computer Science and Engineering 1-1

Overview. Viewing and perspectives. Planar Geometric Projections. Classical Viewing. Classical views Computer viewing Perspective normalization

Computer Viewing Computer Graphics I, Fall 2008

Virtual Cameras & Their Matrices

EECE 478. Learning Objectives. Learning Objectives. Linear Algebra and 3D Geometry. Linear algebra in 3D. Coordinate systems

Motivation. What we ve seen so far. Demo (Projection Tutorial) Outline. Projections. Foundations of Computer Graphics

Fall CSCI 420: Computer Graphics. 2.2 Transformations. Hao Li.

Assignment 2 : Projection and Homography

Affine Transformations in 3D

Vector Algebra Transformations. Lecture 4

Three Main Themes of Computer Graphics

3-D D Euclidean Space - Vectors

3D Viewing. CS 4620 Lecture 8

Interactive Computer Graphics. Hearn & Baker, chapter D transforms Hearn & Baker, chapter 5. Aliasing and Anti-Aliasing

2D Object Definition (1/3)

Computer Viewing. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

Matrix Operations with Applications in Computer Graphics

Advanced Computer Graphics Transformations. Matthias Teschner

Math background. 2D Geometric Transformations. Implicit representations. Explicit representations. Read: CS 4620 Lecture 6

Computer Graphics 7: Viewing in 3-D

CSE528 Computer Graphics: Theory, Algorithms, and Applications

XPM 2D Transformations Week 2, Lecture 3

CS354 Computer Graphics Viewing and Modeling

Last week. Machiraju/Zhang/Möller

Three-Dimensional Graphics III. Guoying Zhao 1 / 67

Computer Graphics. Chapter 7 2D Geometric Transformations

One or more objects A viewer with a projection surface Projectors that go from the object(s) to the projection surface

Viewing and Projection

Linear and Affine Transformations Coordinate Systems

Week 2: Two-View Geometry. Padua Summer 08 Frank Dellaert

To Do. Demo (Projection Tutorial) Motivation. What we ve seen so far. Outline. Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 5: Viewing

CS 4204 Computer Graphics

Fundamental Types of Viewing

Chap 3 Viewing Pipeline Reading: Angel s Interactive Computer Graphics, Sixth ed. Sections 4.1~4.7

XPM 2D Transformations Week 2, Lecture 3

Today. Rendering pipeline. Rendering pipeline. Object vs. Image order. Rendering engine Rendering engine (jtrt) Computergrafik. Rendering pipeline

Geometric transformations in 3D and coordinate frames. Computer Graphics CSE 167 Lecture 3

Lecture 3 Sections 2.2, 4.4. Mon, Aug 31, 2009

Last week. Machiraju/Zhang/Möller/Fuhrmann

Classical and Computer Viewing. Adapted From: Ed Angel Professor of Emeritus of Computer Science University of New Mexico

3D Viewing Episode 2

To Do. Motivation. Demo (Projection Tutorial) What we ve seen so far. Computer Graphics. Summary: The Whole Viewing Pipeline

CS231A. Review for Problem Set 1. Saumitro Dasgupta

5.8.3 Oblique Projections

Blue colour text questions Black colour text sample answers Red colour text further explanation or references for the sample answers

Geometry: Outline. Projections. Orthographic Perspective

CS 559 Computer Graphics Midterm Exam March 22, :30-3:45 pm

CSE528 Computer Graphics: Theory, Algorithms, and Applications

CS Exam 1 Review Problems Fall 2017

2D Image Transforms Computer Vision (Kris Kitani) Carnegie Mellon University

Perspective Projection in Homogeneous Coordinates

Image Warping. Some slides from Steve Seitz

3D Viewing Episode 2

Structure from Motion CSC 767

CS 4620 Midterm 1. Tuesday 22 October minutes

Viewing and Projection

Announcement. Project 1 has been posted online and in dropbox. Due: 11:59:59 pm, Friday, October 14

Introduction to Computer Vision

3D Computer Vision II. Reminder Projective Geometry, Transformations

CSE328 Fundamentals of Computer Graphics

Review of Thursday. xa + yb xc + yd

Planar homographies. Can we reconstruct another view from one image? vgg/projects/singleview/

CS 130 Final. Fall 2015

Chapter 2 - Basic Mathematics for 3D Computer Graphics

Projective Geometry and Camera Models

Geometric Transformations

Transcription:

Computer Graphics Coordinate Systems and Change of Frames Based on slides by Dianna Xu, Bryn Mawr College

Linear Independence A set of vectors independent if is linearly If a set of vectors is linearly independent, we cannot represent any one in terms of the others

Dimension and Basis In a vector space, the maximum number of linearly independent vectors is fixed and is called the dimension of the space In an n-dimensional space, any set of n linearly independent vectors form a basis for the space Given a basis, any vector v can be written as (a linear combination of the basis)

Basis In 2-space, any vector can be represented by where is a basis How does this basis look like? The two vectors are orthogonal The standard basis What about 3-space? n-space?

Coordinate Systems Consider a basis A vector is written The list of scalars {α 0, α 1,. α n-1 }is the representation of v with respect to the given basis We can write the representation as a row or column array of scalars

Coordinate Systems Which is correct? v v Both are because vectors have no fixed location

Frames Coordinate system is insufficient to represent points If we work in an affine space we can add a single point, the origin, to the basis vectors to form a frame O v 1 v 0 v 2

Representation in a Frame Frame determined by Within this frame, every vector can be written as Every point can be written as

Confusing Points and Vectors Consider the point and the vector They appear to have the similar representations A point has no length or direction A vector has no position v v p vector: can place anywhere point: fixed

A Single Representation Define and then we have Homogenous representation of a point Homogenous representation of a vector

Homogeneous Coordinates In general, the homogeneous coordinates form for a three dimensional point [x y z] is given as We return to a three dimensional point (for w 0) by If w=0, the representation is that of a vector If w=1, the representation of a point is [x y z 1]

Homogeneous Coordinates and Computer Graphics All standard viewing transformations (rotation, translation, scaling) can be implemented by matrix multiplications with 4 x 4 matrices Hardware pipeline works with 4 dimensional representations Change of coordinate systems Projection For orthographic viewing, we can maintain w=0 for vectors and w=1 for points For perspective we need a perspective division

Change of Coordinate Systems Consider two representations of a the same vector with respect to two different bases: Where

Representing one basis in terms of the other Each of the basis vectors, u0,u1, u2, are vectors that can be represented in terms of the other basis v

Matrix Form The coefficients define a 3 x 3 matrix and the bases can be related by and the vectors by

Change of Frames We can apply a similar process in homogeneous coordinates to the representations of both points and vectors Consider two frames u u 1 v 0 (P 0, v 0, v 1, v 2 ) Q 0 (Q 0, u 0, u 1, u 2 ) P 0 v 0 v 2 Any point or vector can be represented in each u 2

Change of Homogeneous Coordinates Add point of origin:

Working with Representations Within the two frames any point or vector has a representation of the same form in the first frame in the second frame where α 3 = β 3 = 1 for points and α 3 = β 3 = 0 for vectors The matrix M is 4 x 4 and specifies an affine transformation in homogeneous coordinates

Affine Transformations Every linear transformation is equivalent to a change in frames Every affine transformation preserves lines However, an affine transformation has only 12 degrees of freedom because 4 of the elements in the matrix are fixed and are a subset of all possible 4 x 4 linear transformations

The World and Camera Frames When we work with representations, we work with n-tuples or arrays of scalars Changes in frame are then defined by 4 x 4 matrices In OpenGL, the base frame that we start with is the world frame Eventually we represent entities in the camera frame by changing the world representation using the model-view matrix Initially these frames are the same (M=I) Model-view matrix starts out as the identity matrix

Example: Moving the Camera If objects are on both sides of z=0, we must move camera or world M =