CS 4204 Computer Graphics

Similar documents
Linear Algebra V = T = ( 4 3 ).

Vectors Coordinate frames 2D implicit curves 2D parametric curves. Graphics 2008/2009, period 1. Lecture 2: vectors, curves, and surfaces

CSC 470 Introduction to Computer Graphics. Mathematical Foundations Part 2

Review of linear algebra

Linear Algebra Review. Vectors

Lecture 5 3D polygonal modeling Part 1: Vector graphics Yong-Jin Liu.

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Linear Algebra 1/33

Vectors and Matrices

Introduction. Introduction (2) Easy Problems for Vectors 7/13/2011. Chapter 4. Vector Tools for Graphics

Phys 201. Matrices and Determinants

Elementary maths for GMT

Kevin James. MTHSC 206 Section 12.5 Equations of Lines and Planes

Intro Vectors 2D implicit curves 2D parametric curves. Graphics 2011/2012, 4th quarter. Lecture 2: vectors, curves, and surfaces

4.3 Equations in 3-space

POLI270 - Linear Algebra

Computer Graphics MTAT Raimond Tunnel

Dot Products, Transposes, and Orthogonal Projections

BASIC NOTIONS. x + y = 1 3, 3x 5y + z = A + 3B,C + 2D, DC are not defined. A + C =

A matrix is a rectangular array of. objects arranged in rows and columns. The objects are called the entries. is called the size of the matrix, and

Intro Vectors 2D implicit curves 2D parametric curves. Graphics 2012/2013, 4th quarter. Lecture 2: vectors, curves, and surfaces

A matrix is a rectangular array of. objects arranged in rows and columns. The objects are called the entries. is called the size of the matrix, and

EXERCISE SET 5.1. = (kx + kx + k, ky + ky + k ) = (kx + kx + 1, ky + ky + 1) = ((k + )x + 1, (k + )y + 1)

Chapter 1: Systems of Linear Equations

Review of Linear Algebra

18.06 Problem Set 3 Due Wednesday, 27 February 2008 at 4 pm in

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Linear Algebra /34

1. Vectors.

Matrix Operations. Linear Combination Vector Algebra Angle Between Vectors Projections and Reflections Equality of matrices, Augmented Matrix

Chapter 6. Orthogonality

Chapter 5. Linear Algebra. A linear (algebraic) equation in. unknowns, x 1, x 2,..., x n, is. an equation of the form

Introduction. Chapter Points, Vectors and Coordinate Systems

MTAEA Vectors in Euclidean Spaces

MATH 22A: LINEAR ALGEBRA Chapter 1

Linear equations in linear algebra

CMSC427 Geometry and Vectors

CONVERSION OF COORDINATES BETWEEN FRAMES

Mathematical Foundations: Intro

1.1 Single Variable Calculus versus Multivariable Calculus Rectangular Coordinate Systems... 4

Matrix & Linear Algebra

Linear Combination. v = a 1 v 1 + a 2 v a k v k

5.) For each of the given sets of vectors, determine whether or not the set spans R 3. Give reasons for your answers.

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2

Linear Algebra March 16, 2019

NOTES FOR LINEAR ALGEBRA 133

Lecture Notes in Linear Algebra

IMPORTANT DEFINITIONS AND THEOREMS REFERENCE SHEET

Solutions to Math 51 First Exam October 13, 2015

Unit 2: Lines and Planes in 3 Space. Linear Combinations of Vectors

Math 1060 Linear Algebra Homework Exercises 1 1. Find the complete solutions (if any!) to each of the following systems of simultaneous equations:

Definition 1. A set V is a vector space over the scalar field F {R, C} iff. there are two operations defined on V, called vector addition

Linear Algebra. The analysis of many models in the social sciences reduces to the study of systems of equations.

MATH Topics in Applied Mathematics Lecture 12: Evaluation of determinants. Cross product.

12.5 Equations of Lines and Planes

Math113: Linear Algebra. Beifang Chen

Topics. Vectors (column matrices): Vector addition and scalar multiplication The matrix of a linear function y Ax The elements of a matrix A : A ij

Matrices. A matrix is a method of writing a set of numbers using rows and columns. Cells in a matrix can be referenced in the form.

Lecture 3: Matrix and Matrix Operations

Linear Algebra: Homework 3

MTH MTH Lecture 6. Yevgeniy Kovchegov Oregon State University

Vector equations of lines in the plane and 3-space (uses vector addition & scalar multiplication).

IMPORTANT DEFINITIONS AND THEOREMS REFERENCE SHEET

MAC Module 5 Vectors in 2-Space and 3-Space II

is Use at most six elementary row operations. (Partial

Solution to Homework 8, Math 2568

HW1 solutions. 1. α Ef(x) β, where Ef(x) is the expected value of f(x), i.e., Ef(x) = n. i=1 p if(a i ). (The function f : R R is given.

Lecture 1: Systems of linear equations and their solutions

CS 246 Review of Linear Algebra 01/17/19

1 Geometry of R Conic Sections Parametric Equations More Parametric Equations Polar Coordinates...

MAT 1339-S14 Class 8

Linear Algebra Homework and Study Guide

On-Line Geometric Modeling Notes FRAMES

How can we find the distance between a point and a plane in R 3? Between two lines in R 3? Between two planes? Between a plane and a line?

Linear Algebra 1 Exam 2 Solutions 7/14/3

INSTITIÚID TEICNEOLAÍOCHTA CHEATHARLACH INSTITUTE OF TECHNOLOGY CARLOW MATRICES

Euclidean Spaces. Euclidean Spaces. Chapter 10 -S&B

Quantum Computing Lecture 2. Review of Linear Algebra

Practical Linear Algebra: A Geometry Toolbox

AFFINE COMBINATIONS, BARYCENTRIC COORDINATES, AND CONVEX COMBINATIONS

Linear Algebra Exam 1 Spring 2007

ENGINEERING MATH 1 Fall 2009 VECTOR SPACES

Math Camp II. Basic Linear Algebra. Yiqing Xu. Aug 26, 2014 MIT

MATH 20F: LINEAR ALGEBRA LECTURE B00 (T. KEMP)

Lecture 3 Linear Algebra Background

CSL361 Problem set 4: Basic linear algebra

Math 241, Exam 1 Information.

Matrix Basic Concepts

Lesson 3. Perpendicularity, Planes, and Cross Products

GEOMETRY OF MATRICES x 1

A = u + V. u + (0) = u

The Singular Value Decomposition

Solving a system by back-substitution, checking consistency of a system (no rows of the form

MATH 423/ Note that the algebraic operations on the right hand side are vector subtraction and scalar multiplication.

Properties of Matrices and Operations on Matrices

Appendix A: Matrices

Matrix Algebra: Summary

Lecture 02: 2D Geometry. August 24, 2017

Course Summary Math 211

Introduction to Vectors

Extra Problems for Math 2050 Linear Algebra I

Linear Algebra (Review) Volker Tresp 2018

Transcription:

CS 4204 Computer Graphics Vector and Matrix Yong Cao Virginia Tech

Vectors N-tuple:

Vectors N-tuple tuple: Magnitude: Unit vectors Normalizing a vector

Operations with vectors Addition Multiplication with scalar (scaling) Properties

Visualization for 2D and 3D vectors Addition Scaling

Subtraction Adding the negatively scaled vector

Linear combination of vectors Definition A linear combination of the m vectors v 1,,v is a m vector of the form: w = a 1 v 1 + a m v m, a 1,,a m in R

Special cases Linear combination w = a 1 v 1 + a m v m, a 1,,a m in R Affine combination: A linear combination for which a 1 + +a m = 1 Convex combination An affine combination for which a i 0 for i = 1,,m,m

Linear Independence For vectors v 1,, v m If a 1 v 1 + a m v m = 0 iff a 1 =a 2 = =a=a m =0 then the vectors are linearly independent.

Generators and Base vectors How many vectors are needed to generate a vector space? Any set of vectors that generate a vector space is called a generator set. Given a vector space R n we can prove that we need minimum n vectors to generate all vectors v in R n. A generator set with minimum size is called a base for the given vector space.

Standard unit vectors

Standard unit vectors For any vector space R n : The elements of a vector v in R n are the scalar coefficients of the linear combination of the base vectors.

Standard unit vectors in 3D i = (1,0,0) j = (0,1,0) k = (0,0,1) Right handed Left handed

Representation of vectors through basis vectors Given a vector space R n, a set of basis vectors B {b{ i in R n, i=1, n} and a vector v in R n we can always find scalar coefficients such that: v = a 1 b 1 + +a n b n So, v with respect to B is: v B = (a( 1,,a n )

Dot Product Definition: Properties

Dot product and perpendicularity From Property 5: b c > 0 b c = 0 b c < 0

Perpendicular vectors Definition Vectors b and c are perpendicular iff b c = 0 Also called normal or orthogonal It is easy to see that the standard unit vectors form an orthogonal basis: i j = 0, j k = 0, i k = 0

Cross product Defined only for 3D Vectors and with respect to the standard unit vectors Definition

Properties of the cross product

Geometric interpretation of the cross product

Recap Vector spaces Operations with vectors Representing vectors through a basis v = a 1 b 1 + a n b n, v B = (a 1,,a,a n ) Standard unit vectors Dot product Perpendicularity Cross product Normal to both vectors

Points vs Vectors What is the difference?

Points vs Vectors What is the difference? Points have location but no size or direction. Vectors have size and direction but no location. Problem: we represent both as triplets!

Relationship between points and vectors A difference between two points is a vector: Q P = v Q P v We can consider a point as a point plus an offset Q = P + v

Coordinate systems Defined by: (a,b,c, )

The homogeneous representation of points and vectors

Switching coordinates Normal to homegeneous: Vector: append as fourth coordinate 0 Point: append as fourth coordinate 1

Switching coordinates Homegeneous to normal: Vector: remove fourth coordinate (0) Point: remove fourth coordinate (1)

Does the homogeneous representation support operations? Operations : v + w = (v 1,v 2,v 3,0) +(w 1,w 2,w 3,0)= (v 1 +w 1, v 2 +w 2, v 3 +w 3, 0) Vector! av = a(v 1,v 2,v 3,0) = (av 1, av 2, av 3, 0), Vector! av + bw = a(v 1,v 2,v 3,0) +b(w 1,w 2,w 3,0)= (av 1 +bw 1, av 2 +bw 2, av 3 +bw 3, 0) Vector! P+v = (p 1,p 2,p 3,1) +(v 1,v 2,v 3,0)= = (p 1 +v 1, p 2 +v 2, p 3 +v 3, 1) Point!

Linear combination of points Points P, R scalars f,g: fp+gr = f(p 1,p 2,p 3,1) +g(r 1,r 2,r 3,1) = (fp 1 +gr 1, fp 2 +gr 2, fp 3 +gr 3, f+g) What is this?

Linear combination of points Points P, R scalars f,g: fp+gr = f(p 1,p 2,p 3,1) +g(r 1,r 2,r 3,1) = (fp 1 +gr 1, fp 2 +gr 2, fp 3 +gr 3, f+g) What is this? If (f+g( f+g) ) = 0 then vector! If (f+g( f+g) ) = 1 then point!

Affine combinations of points Definition: Points P i : i = 1,,n,n Scalars f i : i = 1,,n,n f 1 P 1 + + f n P n iff f 1 + +f n = 1 Example: 0.5P 1 + 0.5P 2

Geometric explanation

Recap Vector spaces Dot product Cross product Coordinate systems Homogeneous representations of points and vectors

Matrices Rectangular arrangement of elements:

Special square matrices Symmetric: (A( ij ) n x n = (A( ji ) n x n Zero: A ij = 0, for all i,j Identity: I n = I ii = 1, for all i I ij = 0 for i j

Operations with matrices Addition: Properties:

Multiplication Definition: Properties:

Inverse of a square matrix Definition MM -1 = M -1 M = I Important property (AB) -1 = B -1-1 A -1

Convention Vectors and points are represented as column matrices.

Dot product as a matrix multiplication A vector is a column matrix

Lines and Planes

Lines Line (in 2D) Explicit Implicit Parametric (extends to 3D)

Planes Plane equations Implicit F(x, y,z) = Ax + By + Cz + D = N P + D Points on Plane F(x, y,z) = 0 Parametric Plane(s,t) = P 0 + s(p 1 P 0 ) + t(p 2 P 0 ) P 0,P 1,P 2 not colinear or Plane(s,t) = (1 s t)p 0 + sp 1 + tp 2 Plane(s,t) = P 0 + sv 1 + tv 2 where V 1,V 2 basis vectors Explicit z = - (A/C)x - (B/C)y - D/C, C 0