Computer Graphics (Fall 2005) COMS 4160, Lecture 2: Review of Basic Math

Slides:



Advertisements
Similar presentations
Math Review Guest Lecturer: Michiel van de Panne Week 1, Wed Jan 9
Advertisements

Maths for Computer Graphics
2D Geometric Transformations
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 : “shiv rpi” Linear Algebra A gentle introduction Linear Algebra has become as basic and as applicable.
Chapter 4.1 Mathematical Concepts
Chapter 4.1 Mathematical Concepts. 2 Applied Trigonometry Trigonometric functions Defined using right triangle  x y h.
CSC 123 – Computational Art Points and Vectors
Now Playing: My Mathematical Mind Spoon From Gimme Fiction Released May 10, 2005.
Outline for Today More math… Finish linear algebra: Matrix composition
CSCE 590E Spring 2007 Basic Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
3-D Geometry.
Computer Graphics CSC 630 Lecture 2- Linear Algebra.
Computer Graphics (Fall 2008) COMS 4160, Lecture 3: Transformations 1
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner Math Review Week 1, Wed.
Computer Graphics (Fall 2008) COMS 4160, Lecture 4: Transformations 2
Computer Graphics (Fall 2004) COMS 4160, Lecture 3: Transformations 1
Linear Algebra Review CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2005.
Lecture 7: Matrix-Vector Product; Matrix of a Linear Transformation; Matrix-Matrix Product Sections 2.1, 2.2.1,
Week 4 - Monday.  What did we talk about last time?  Vectors.
ME451 Kinematics and Dynamics of Machine Systems Review of Matrix Algebra – 2.2 Review of Elements of Calculus – 2.5 Vel. and Acc. of a point fixed in.
ME451 Kinematics and Dynamics of Machine Systems Review of Matrix Algebra – 2.2 September 13, 2011 Dan Negrut University of Wisconsin-Madison © Dan Negrut,
2IV60 Computer Graphics Basic Math for CG
Basics of Linear Algebra A review?. Matrix  Mathematical term essentially corresponding to an array  An arrangement of numbers into rows and columns.
Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 2: Review of Basic Math
Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 3: Transformations 1
Geometric Intuition Randy Gaul. Vectors, Points and Basis Matrices Rotation Matrices Dot product and how it’s useful Cross product and how it’s useful.
COS 397 Computer Graphics Svetla Boytcheva AUBG, Spring 2013.
Graphics CSE 581 – Interactive Computer Graphics Mathematics for Computer Graphics CSE 581 – Roger Crawfis (slides developed from Korea University slides)
6.837 Linear Algebra Review Patrick Nichols Thursday, September 18, 2003.
Patrick Nichols Thursday, September 18, Linear Algebra Review.
Kansas State University Department of Computing and Information Sciences CIS 736: Computer Graphics Monday, 26 January 2004 William H. Hsu Department of.
ME451 Kinematics and Dynamics of Machine Systems Review of Linear Algebra 2.1 through 2.4 Th, Sept. 08 © Dan Negrut, 2011 ME451, UW-Madison TexPoint fonts.
Transformations Dr. Amy Zhang.
Mathematics for Computer Graphics. Lecture Summary Matrices  Some fundamental operations Vectors  Some fundamental operations Geometric Primitives:
6.837 Linear Algebra Review Patrick Nichols Thursday, September 18, 2003.
1 Math Review Coordinate systems 2-D, 3-D Vectors Matrices Matrix operations.
CO1301: Games Concepts Dr Nick Mitchell (Room CM 226) Material originally prepared by Gareth Bellaby.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 : “shiv rpi” Linear Algebra A gentle introduction Linear Algebra has become as basic and as applicable.
ME451 Kinematics and Dynamics of Machine Systems Review of Linear Algebra 2.1 through 2.4 Tu, Sept. 07 © Dan Negrut, 2009 ME451, UW-Madison TexPoint fonts.
6.837 Linear Algebra Review Rob Jagnow Monday, September 20, 2004.
Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 4: Transformations 2
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Jinxiang Chai Composite Transformations and Forward Kinematics 0.
ME451 Kinematics and Dynamics of Machine Systems Review of Linear Algebra 2.1, 2.2, 2.3 September 06, 2013 Radu Serban University of Wisconsin-Madison.
CS559: Computer Graphics Lecture 8: 3D Transforms Li Zhang Spring 2008 Most Slides from Stephen Chenney.
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Affine Transformations.
CO1301: Games Concepts Dr Nick Mitchell (Room CM 226) Material originally prepared by Gareth Bellaby.
Chun-Yuan Lin Mathematics for Computer Graphics 2015/12/15 1 CG.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2016 Tamara Munzner Math Basics Week 1, Fri.
Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 3: Transformations 1
Computer Graphics Matrices
CS 450: COMPUTER GRAPHICS TRANSFORMATIONS SPRING 2015 DR. MICHAEL J. REALE.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Math Review Week 1, Fri.
ME451 Kinematics and Dynamics of Machine Systems Review of Linear Algebra 2.1 through 2.4 Th, Jan. 22 © Dan Negrut, 2009 ME451, UW-Madison.
4. Affine transformations. Reading Required:  Watt, Section 1.1. Further reading:  Foley, et al, Chapter  David F. Rogers and J. Alan Adams,
Computer Graphics Mathematical Fundamentals Lecture 10 Taqdees A. Siddiqi
Linear Algebra Review Tuesday, September 7, 2010.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2010 Tamara Munzner Math Review Week 1, Wed.
1 Objective To provide background material in support of topics in Digital Image Processing that are based on matrices and/or vectors. Review Matrices.
Graphics Graphics Korea University kucg.korea.ac.kr Mathematics for Computer Graphics 고려대학교 컴퓨터 그래픽스 연구실.
CSE 167 [Win 17], Lecture 2: Review of Basic Math Ravi Ramamoorthi
CSE 167 [Win 17], Lecture 3: Transformations 1 Ravi Ramamoorthi
Week 4 - Monday CS361.
Lecture 03: Linear Algebra
COMP 175: Computer Graphics February 9, 2016
Linear Algebra A gentle introduction
Math review - scalars, vectors, and matrices
Presentation transcript:

Computer Graphics (Fall 2005) COMS 4160, Lecture 2: Review of Basic Math

To Do  Complete Assignment 0; by tomorrow  Download and compile skeleton for assignment 1  Read instructions re setting up your system  Ask TA if any problems, need visual C++ etc.  We won’t answer compilation issues after next lecture  Are there logistical problems with getting textbooks, programming (using MRL lab etc.?), office hours?  About first few lectures  Somewhat technical: core mathematical ideas in graphics  HW1 is simple (only few lines of code): Lets you see how to use some ideas discussed in lecture, create images

Motivation and Outline  Many graphics concepts need basic math like linear algebra  Vectors (dot products, cross products, …)  Matrices (matrix-matrix, matrix-vector mult., …)  E.g: a point is a vector, and an operation like translating or rotating points on an object can be a matrix-vector multiply  Much more, but beyond scope of this course (e.g. 4162)  Chapters 2.4 (vectors) and 5.2.1,5.2.2 (matrices)  Worthwhile to read all of chapters 2 and 5  Should be refresher on very basic material for most of you  If not understand, talk to me (review in office hours)

Vectors  Length and direction. Absolute position not important  Use to store offsets, displacements, locations  But strictly speaking, positions are not vectors and cannot be added: a location implicitly involves an origin, while an offset does not. =

Vector Addition  Geometrically: Parallelogram rule  In cartesian coordinates (next), simply add coords a b a+b = b+a

Cartesian Coordinates  X and Y can be any (usually orthogonal unit) vectors X A = 4 X + 3 Y

Vector Multiplication  Dot product (2.4.3)  Cross product (2.4.4)  Orthonormal bases and coordinate frames (2.4.5,6)  Note: book talks about right and left-handed coordinate systems. We always use right-handed

Dot (scalar) product a b

Dot product: some applications in CG  Find angle between two vectors (e.g. cosine of angle between light source and surface for shading)  Finding projection of one vector on another (e.g. coordinates of point in arbitrary coordinate system)  Advantage: can be computed easily in cartesian components

Projections (of b on a) a b

Dot product in Cartesian components

Vector Multiplication  Dot product (2.4.3)  Cross product (2.4.4)  Orthonormal bases and coordinate frames (2.4.5,6)  Note: book talks about right and left-handed coordinate systems. We always use right-handed

Cross (vector) product  Cross product orthogonal to two initial vectors  Direction determined by right-hand rule  Useful in constructing coordinate systems (later) a b

Cross product: Properties

Cross product: Cartesian formula? Dual matrix of vector a

Vector Multiplication  Dot product (2.4.3)  Cross product (2.4.4)  Orthonormal bases and coordinate frames (2.4.5,6)  Note: book talks about right and left-handed coordinate systems. We always use right-handed

Orthonormal bases/coordinate frames  Important for representing points, positions, locations  Often, many sets of coordinate systems (not just X, Y, Z)  Global, local, world, model, parts of model (head, hands, …)  Critical issue is transforming between these systems/bases  Topic of next 3 lectures

Coordinate Frames  Any set of 3 vectors (in 3D) so that

Constructing a coordinate frame  Often, given a vector a (viewing direction in HW1), want to construct an orthonormal basis  Need a second vector b (up direction of camera in HW1)  Construct an orthonormal basis (for instance, camera coordinate frame to transform world objects into in HW1)

Constructing a coordinate frame? We want to associate w with a, and v with b  But a and b are neither orthogonal nor unit norm  And we also need to find u

Matrices  Can be used to transform points (vectors)  Translation, rotation, shear, scale (more detail next lecture)  Section and of text  Instructive to read all of 5 but not that relevant to course

What is a matrix  Array of numbers (m×n = m rows, n columns)  Addition, multiplication by a scalar simple: element by element

Matrix-matrix multiplication  Number of columns in second must = rows in first  Element (i,j) in product is dot product of row i of first matrix and column j of second matrix

Matrix-matrix multiplication  Number of columns in second must = rows in first  Element (i,j) in product is dot product of row i of first matrix and column j of second matrix

Matrix-matrix multiplication  Number of columns in second must = rows in first  Element (i,j) in product is dot product of row i of first matrix and column j of second matrix

Matrix-matrix multiplication  Number of columns in second must = rows in first  Element (i,j) in product is dot product of row i of first matrix and column j of second matrix

Matrix-matrix multiplication  Number of columns in second must = rows in first  Non-commutative (AB and BA are different in general)  Associative and distributive  A(B+C) = AB + AC  (A+B)C = AC + BC

Matrix-Vector Multiplication  Key for transforming points (next lecture)  Treat vector as a column matrix (m×1)  E.g. 2D reflection about y-axis (from textbook)

Transpose of a Matrix (or vector?)

Identity Matrix and Inverses

Vector multiplication in Matrix form  Dot product?  Cross product? Dual matrix of vector a