with Applications in Computer Graphics

Slides:



Advertisements
Similar presentations
1Computer Graphics Homogeneous Coordinates & Transformations Lecture 11/12 John Shearer Culture Lab – space 2
Advertisements

Chapter 4 Euclidean Vector Spaces
3D Graphics Rendering and Terrain Modeling
Mapping: Scaling Rotation Translation Warp
2-D Geometry. The Image Formation Pipeline Outline Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous.
HCI 530 : Seminar (HCI) Damian Schofield. HCI 530: Seminar (HCI) Transforms –Two Dimensional –Three Dimensional The Graphics Pipeline.
Chapter 4.1 Mathematical Concepts. 2 Applied Trigonometry Trigonometric functions Defined using right triangle  x y h.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Representation Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
CSCE 590E Spring 2007 Basic Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
Representation CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Transformations CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Geometric Objects and Transformations Geometric Entities Representation vs. Reference System Geometric ADT (Abstract Data Types)
CE 311 K - Introduction to Computer Methods Daene C. McKinney
1 Matrix Math ©Anthony Steed Overview n To revise Vectors Matrices n New stuff Homogenous co-ordinates 3D transformations as matrices.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Little Linear Algebra Contents: Linear vector spaces Matrices Special Matrices Matrix & vector Norms.
 Row and Reduced Row Echelon  Elementary Matrices.
Chapter 2 – Linear Transformations
CS 480/680 Computer Graphics Representation Dr. Frederick C Harris, Jr. Fall 2012.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Geometric Transformation. So far…. We have been discussing the basic elements of geometric programming. We have discussed points, vectors and their operations.
Camera Geometry and Calibration Thanks to Martial Hebert.
Transformations Dr. Amy Zhang.
CS 480/680 Computer Graphics Transformations Dr. Frederick C Harris, Jr.
Mathematics for Computer Graphics. Lecture Summary Matrices  Some fundamental operations Vectors  Some fundamental operations Geometric Primitives:
Computational Biology, Part E Basic Principles of Computer Graphics Robert F. Murphy Copyright  1996, 1999, 2000, All rights reserved.
Intro to 3D Models Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
Matrices. A matrix, A, is a rectangular collection of numbers. A matrix with “m” rows and “n” columns is said to have order m x n. Each entry, or element,
Matrices, Transformations and the 3D Pipeline Matthew Rusch Paul Keet.
Matrices A matrix is a table or array of numbers arranged in rows and columns The order of a matrix is given by stating its dimensions. This is known as.
Transformations Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
Geometric Camera Models
Geometric Objects and Transformation
CSE Real Time Rendering Week 5. Slides(Some) Courtesy – E. Angel and D. Shreiner.
1 Chapter 2: Geometric Camera Models Objective: Formulate the geometrical relationships between image and scene measurements Scene: a 3-D function, g(x,y,z)
1 Graphics CSCI 343, Fall 2015 Lecture 10 Coordinate Transformations.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Affine Geometry.
Computer Graphics Matrices
1 Representation. 2 Objectives Introduce concepts such as dimension and basis Introduce coordinate systems for representing vectors spaces and frames.
Matrices and Matrix Operations. Matrices An m×n matrix A is a rectangular array of mn real numbers arranged in m horizontal rows and n vertical columns.
Computer Graphics I, Fall 2010 Transformations.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Transformations Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Matrices. Variety of engineering problems lead to the need to solve systems of linear equations matrixcolumn vectors.
Computer Graphics Lecture 19 PROJECTIONS I Taqdees A. Siddiqi
3D Ojbects: Transformations and Modeling. Matrix Operations Matrices have dimensions: Vectors can be thought of as matrices: v=[2,3,4,1] is a 1x4 matrix.
Objectives Introduce standard transformations Introduce standard transformations Derive homogeneous coordinate transformation matrices Derive homogeneous.
MTH108 Business Math I Lecture 20.
CPT450 – Computer Graphics
Lecture 10 Geometric Transformations In 3D(Three- Dimensional)
Matrices and Vector Concepts
Week 4 - Monday CS361.
Math Fundamentals Maths revisit.
Mathematics for Computer Graphics
Transforms.
Spatcial Description & Transformation
Coordinate Change.
Chapter 7 Matrix Mathematics
Computer Graphics CC416 Week 15 3D Graphics.
Linear independence and matrix rank
3D Graphics Rendering PPT By Ricardo Veguilla.
COMP 175: Computer Graphics February 9, 2016
Isaac Gang University of Mary Hardin-Baylor
2-D Geometry.
Geometric Camera Models
CSC461: Lecture 14 Representations
Matrices and Matrix Operations
RECORD. RECORD COLLABORATE: Discuss: Is the statement below correct? Try a 2x2 example.
Rendering – Matrix Transformations and the Graphics Pipeline
Representation Ed Angel
Presentation transcript:

with Applications in Computer Graphics Matrix Operations with Applications in Computer Graphics

Special Matrices The zero matrix is a matrix with all zero entries. The identity matrix is the matrix I with 1 on the main diagonal entries and 0 for all other entries. A diagonal matrix D = [dij] has the property that dij=0 when i not equal to j. Sometimes we use the notation D = diag{a,b,c}.

Matrix Multiplication Examples

Linear Transformation A matrix M : R3 -> R3 is called a linear transformation and maps vectors to vectors by Y=MX. The term linearity refers to the property that M(cU +V) = cMU + MV for any scalar c and any vectors U and V.

Matrix Transpose The transpose of a matrix M = [mij] is the matrix MT = [mji].  That is the rows and columns are interchanged in MT (or the matrix is flipped about its main diagonal).

Skew (Anti-) Symmetric A matrix M  is symmetric if M=MT. A matrix M is skew-symmetric if MT= -M.

Computer Graphics Computer graphics is a study of the use of a computer to create and manipulate images and animated scenes, usually represented in three dimensions. A mathematical model of a three dimensional world uses vectors to describe the locations and material properties of objects and their relationships. An observer's location and line of sight are used to generate a perspective view of this mathematical model.

Scaling If a diagonal matrix D = diag{d0, d1, d2} has all positive entries, it is a scaling matrix.  Each diagonal term represents how much stretching or shrinking occurs for the corresponding coordinate direction.  Uniform scaling is D = sI = diag{s,s,s} for s>0.

An Invertible Matrix A matrix is said to be invertible if there exists a matrix, M-1 such that MM-1 = M-1M = I.

R = I + (sin f) S + (1 - cos f) S2 Rotation A matrix R is a rotation matrix if its transpose and inverse are the same matrix,  that is, R-1 = RT, in which case RRT = RTR = I.  The matrix has a corresponding unit-length axis of rotation U and angle of rotation f.  The choice is not unique since -U is also an axis of rotation and f + 2pk for any integer k is an angle of rotation.  If U=(u0,u1,u2), we can define the skew-symmetric matrix S by The rotation corresponding to axis U and angle f is R = I + (sin f) S + (1 - cos f) S2

Translation Translation of vectors by a fixed vector T element of R3 is represented by the function Y = X + T for X and Y elements of R3.  It is not possible to represent this translation as a linear transformation of the form Y = MX for some constant matrix M.  However, if the problem is embedded in a four-dimensional space, it is possible to represent translation with a linear transformation (called a homogeneous transformation). ref: 3D Game Engine Design, by David H. Eberly, Morgan Kaufmann

Orthographic Projection Vector Model Orthographic Projection Shutterbug: Copyright 1990 Pixar - Rendered by Thomas Williams and H. B. Siegel using Pixar's RenderManTM

Perspective Projection Shutterbug: Copyright 1990 Pixar - Rendered by Thomas Williams and H. B. Siegel using Pixar's RenderManTM

Depth Cueing Shutterbug: Copyright 1990 Pixar - Rendered by Thomas Williams and H. B. Siegel using Pixar's RenderManTM

Depth Clipping Shutterbug: Copyright 1990 Pixar - Rendered by Thomas Williams and H. B. Siegel using Pixar's RenderManTM

Color Vectors Shutterbug: Copyright 1990 Pixar - Rendered by Thomas Williams and H. B. Siegel using Pixar's RenderManTM

Visible Line Determination Shutterbug: Copyright 1990 Pixar - Rendered by Thomas Williams and H. B. Siegel using Pixar's RenderManTM

Ambient Illumination Only Shutterbug: Copyright 1990 Pixar - Rendered by Thomas Williams and H. B. Siegel using Pixar's RenderManTM

Polygon Shading Shutterbug: Copyright 1990 Pixar - Rendered by Thomas Williams and H. B. Siegel using Pixar's RenderManTM

Gouraud Shading Shutterbug: Copyright 1990 Pixar - Rendered by Thomas Williams and H. B. Siegel using Pixar's RenderManTM

Gouraud Shading with Specular Reflection Shutterbug: Copyright 1990 Pixar - Rendered by Thomas Williams and H. B. Siegel using Pixar's RenderManTM

Phong Shading with Specular Reflection Shutterbug: Copyright 1990 Pixar - Rendered by Thomas Williams and H. B. Siegel using Pixar's RenderManTM

Curved Surfaces Shutterbug: Copyright 1990 Pixar - Rendered by Thomas Williams and H. B. Siegel using Pixar's RenderManTM

Local Lighing Sources Shutterbug: Copyright 1990 Pixar - Rendered by Thomas Williams and H. B. Siegel using Pixar's RenderManTM

Texture Mapping Shutterbug: Copyright 1990 Pixar - Rendered by Thomas Williams and H. B. Siegel using Pixar's RenderManTM

Displacement Mapping Shutterbug: Copyright 1990 Pixar - Rendered by Thomas Williams and H. B. Siegel using Pixar's RenderManTM

Reflection Mapping Shutterbug: Copyright 1990 Pixar - Rendered by Thomas Williams and H. B. Siegel using Pixar's RenderManTM

Homogeneous Transformations A vector (x,y,z) e R3 can be mapped uniquely onto a vector (x,y,z,1) e R4.  Other vectors (x,y,z,w) e R4  can be projected onto the hyperplane w=1 by (x,y,z,w) -> (x/w,y/w,z/w,1).  An entire line of points with with origin (0,0,0,0) is projected onto the single point (x,y,z,1)  All of R4 \ ={0} is partitioned into equivalence classes, each class having representative projection (x,y,z,1).  A 4-tuple in this setting is called a homogeneous coordinate.  Two homogeneous coordinates that are equivalent are indicated to be so by (x0,y0,z0,w0)~(x1,y1,z1,w1).

Transformations can be applied to homogeneous coordinates to obtain other homogeneous coordinates.  Such a 4x4 matrix H = [hij], 0 <= i <= 3 and 0 <=j<=3, is called a homogeneous transformation as long as h33=1.  Usually, homogeneous matrices are written as 2x2 block matrices, where M is a 3x3 matrix, T is 3x1  ST is 1x3 and 1 is a scalar.  The product of a homogeneous coordinate and a homogeneous transformation in block format is,

Perspective Transformations Any 3x3 linear transformation M can be represented by the homogeneous matrix Translation by a vector T can also be represented by a homogeneous transformation, The two transformations can be composed to represent Y = MX + T as Assuming M is invertible, the equation can be solved for X = M-1(Y-T).  Thus, the inverse of a homogeneous matrix is

Perspective projection can also be represented by a homogenoeous matrix where the lower-left entry is not the zero vector.  We usually discuss the geometric pipeline in terms of products of homogeneous transformations.  That notation is a convenience and is not particularly useful in an implementation unless the underlying hardware (and/or graphics package) has native support for vector and matrix operations in four dimensions (e.g. openGL and SGI).