To Do. Vectors. Motivation and Outline. Vector Addition. Cartesian Coordinates. Foundations of Computer Graphics (Spring 2010) x y

Similar documents
Analytically, vectors will be represented by lowercase bold-face Latin letters, e.g. a, r, q.

Things to Memorize: A Partial List. January 27, 2017

Uses of transformations. 3D transformations. Review of vectors. Vectors in 3D. Points vs. vectors. Homogeneous coordinates S S [ H [ S \ H \ S ] H ]

Computer Graphics (CS 4731) Lecture 7: Linear Algebra for Graphics (Points, Scalars, Vectors)

set is not closed under matrix [ multiplication, ] and does not form a group.

MATH1131 Mathematics 1A Algebra

MATRIX DEFINITION A matrix is any doubly subscripted array of elements arranged in rows and columns.

Chapter 2. Vectors. 2.1 Vectors Scalars and Vectors

Introduction To Matrices MCV 4UI Assignment #1

Computer Graphics (CS 543) Lecture 3 (Part 1): Linear Algebra for Graphics (Points, Scalars, Vectors)

Matrix Algebra. Matrix Addition, Scalar Multiplication and Transposition. Linear Algebra I 24

Chapter 14. Matrix Representations of Linear Transformations

VECTORS, TENSORS, AND MATRICES. 2 + Az. A vector A can be defined by its length A and the direction of a unit

4 VECTORS. 4.0 Introduction. Objectives. Activity 1

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics

1.2 What is a vector? (Section 2.2) Two properties (attributes) of a vector are and.

Lecture 3. In this lecture, we will discuss algorithms for solving systems of linear equations.

On the diagram below the displacement is represented by the directed line segment OA.

3. Vectors. Home Page. Title Page. Page 2 of 37. Go Back. Full Screen. Close. Quit

Lecture 2e Orthogonal Complement (pages )

2. VECTORS AND MATRICES IN 3 DIMENSIONS

Vectors. Introduction. Definition. The Two Components of a Vector. Vectors

9.4. The Vector Product. Introduction. Prerequisites. Learning Outcomes

11-755/ Machine Learning for Signal Processing. Algebra. Class Sep Instructor: Bhiksha Raj

11-755/ Machine Learning for Signal Processing. Algebra. Class August Instructor: Bhiksha Raj

MathCity.org Merging man and maths

MATH 423 Linear Algebra II Lecture 28: Inner product spaces.

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT

Exploring parametric representation with the TI-84 Plus CE graphing calculator

IMPOSSIBLE NAVIGATION

Bases for Vector Spaces

September 13 Homework Solutions

Vector differentiation. Chapters 6, 7

CHAPTER 1 PROGRAM OF MATRICES

Partial Derivatives. Limits. For a single variable function f (x), the limit lim

DEFINITION OF ASSOCIATIVE OR DIRECT PRODUCT AND ROTATION OF VECTORS

Machine Learning for Signal Processing Fundamentals of Linear Algebra

What we should know about Linear Algebra

CS 330 Formal Methods and Models

MATRICES AND VECTORS SPACE

Optimization Lecture 1 Review of Differential Calculus for Functions of Single Variable.

Math 520 Final Exam Topic Outline Sections 1 3 (Xiao/Dumas/Liaw) Spring 2008

Math 4310 Solutions to homework 1 Due 9/1/16

How do we solve these things, especially when they get complicated? How do we know when a system has a solution, and when is it unique?

LINEAR ALGEBRA APPLIED

Thomas Whitham Sixth Form

8. Complex Numbers. We can combine the real numbers with this new imaginary number to form the complex numbers.

INTRODUCTION TO LINEAR ALGEBRA

MATH 260 Final Exam April 30, 2013

Rudimentary Matrix Algebra

Boolean algebra.

MATH34032: Green s Functions, Integral Equations and the Calculus of Variations 1

5: The Definite Integral

Three termination problems. Patrick Dehornoy. Laboratoire de Mathématiques Nicolas Oresme, Université de Caen

Section 4: Integration ECO4112F 2011

Theoretical foundations of Gaussian quadrature

Coalgebra, Lecture 15: Equations for Deterministic Automata

Chapter 4 Contravariance, Covariance, and Spacetime Diagrams

HW3, Math 307. CSUF. Spring 2007.

Matrix & Vector Basic Linear Algebra & Calculus

The practical version

Farey Fractions. Rickard Fernström. U.U.D.M. Project Report 2017:24. Department of Mathematics Uppsala University

A matrix is a set of numbers or symbols arranged in a square or rectangular array of m rows and n columns as

10 Vector Integral Calculus

Lecture 3: Curves in Calculus. Table of contents

Chapter 3 MATRIX. In this chapter: 3.1 MATRIX NOTATION AND TERMINOLOGY

1. Review. t 2. t 1. v w = vw cos( ) where is the angle between v and w. The above leads to the Schwarz inequality: v w vw.

7.1 Integral as Net Change and 7.2 Areas in the Plane Calculus

Lecture Solution of a System of Linear Equation

Lecture 3: Equivalence Relations

Matrix Eigenvalues and Eigenvectors September 13, 2017

Pre-Session Review. Part 1: Basic Algebra; Linear Functions and Graphs

Numerical Linear Algebra Assignment 008

STRAND J: TRANSFORMATIONS, VECTORS and MATRICES

308K. 1 Section 3.2. Zelaya Eufemia. 1. Example 1: Multiplication of Matrices: X Y Z R S R S X Y Z. By associativity we have to choices:

Prerequisites CHAPTER P

Parse trees, ambiguity, and Chomsky normal form

along the vector 5 a) Find the plane s coordinate after 1 hour. b) Find the plane s coordinate after 2 hours. c) Find the plane s coordinate

13.3 CLASSICAL STRAIGHTEDGE AND COMPASS CONSTRUCTIONS

a a a a a a a a a a a a a a a a a a a a a a a a In this section, we introduce a general formula for computing determinants.

THE DISCRIMINANT & ITS APPLICATIONS

Basics of space and vectors. Points and distance. Vectors

Math 33A Discussion Example Austin Christian October 23, Example 1. Consider tiling the plane by equilateral triangles, as below.

ENGI 9420 Lecture Notes 7 - Fourier Series Page 7.01

Module 6: LINEAR TRANSFORMATIONS

Recitation 3: More Applications of the Derivative

A Matrix Algebra Primer

378 Relations Solutions for Chapter 16. Section 16.1 Exercises. 3. Let A = {0,1,2,3,4,5}. Write out the relation R that expresses on A.

Chapter 1 VECTOR ALGEBRA

Math 113 Exam 1-Review

3 Mathematics of the Poisson Equation

CMSC 828D: Fundamentals of Computer Vision Homework 4

Boolean Algebra. Boolean Algebra

Section 3.2 Maximum Principle and Uniqueness

Chapter 2. Determinants

Inner Product Space. u u, v u, v u, v.

Recitation 3: Applications of the Derivative. 1 Higher-Order Derivatives and their Applications

Vectors , (0,0). 5. A vector is commonly denoted by putting an arrow above its symbol, as in the picture above. Here are some 3-dimensional vectors:

ECON 331 Lecture Notes: Ch 4 and Ch 5

1.2 What is a vector? (Section 2.2) Two properties (attributes) of a vector are and.

Transcription:

Foundtions of Computer Grphics (Spring 2010) CS 184, Lecture 2: Review of Bsic Mth http://inst.eecs.erkeley.edu/~cs184 o Do Complete Assignment 0 Downlod nd compile skeleton for ssignment 1 Red instructions re setting up your system Ask A if ny prolems, need visul C++ etc. We won t nswer compiltion issues fter next lecture ry to otin textooks, set up progrmming environment. Let us know if ny prolems. Aout first few lectures Somewht technicl: core mth ides in grphics HW1 is simple (only few lines of code): Lets you see how to use some ides discussed in lecture, crete imges Motivtion nd Outline Mny grphics concepts need sic mth like liner lger Vectors (dot products, cross products, ) Mtrices (mtrix-mtrix, mtrix-vector mult., ) E.g: point is vector, nd n opertion like trnslting or rotting points on oject cn e mtrix-vector multiply Chpters 2.4 (vectors) nd 5.2.1,5.2.2 (mtrices) Worthwhile to red ll of chpters 2 nd 5 Should e refresher on very sic mteril for most of you If not understnd, tlk to me (review in office hours) Vectors Length nd direction. Asolute position not importnt Usully written s or in old. Mgnitude written s = Use to store offsets, displcements, loctions But strictly speking, positions re not vectors nd cnnot e dded: loction implicitly involves n origin, while n offset does not. Vector Addition Crtesin Coordintes + = + A = 4 X +3Y Geometriclly: Prllelogrm rule In crtesin coordintes (next), simply dd coords X X nd Y cn e ny (usully orthogonl unit) vectors x y 2 2 A A x y A x y 1

Vector Multipliction Dot product (2.4.3) Cross product (2.4.4) Orthonorml ses nd coordinte frmes (2.4.5,6) Dot (sclr) product Note: ook tlks out right nd left-hnded coordinte systems. We lwys use right-hnded? ( c) c ( k) ( k) k( ) cos 1 cos Dot product: some pplictions in CG Find ngle etween two vectors (e.g. cosine of ngle etween light source nd surfce for shding) Projections (of on ) Finding projection of one vector on nother (e.g. coordintes of point in ritrry coordinte system) Advntge: computed esily in crtesin components?? cos 2 Dot product in Crtesin components x x? y y x x xx yy y y Vector Multipliction Dot product (2.4.3) Cross product (2.4.4) Orthonorml ses nd coordinte frmes (2.4.5,6) Note: ook tlks out right nd left-hnded coordinte systems. We lwys use right-hnded 2

Cross (vector) product sin Cross product orthogonl to two initil vectors Direction determined y right-hnd rule Useful in constructing coordinte systems (lter) Cross product: Properties x y z y xz y z x z y x z xy x z y 0 ( c) c ( k) k( ) Cross product: Crtesin formul? x y z yz yz x y z zx xz x y z xy yx 0 z y x y x 0 z Dul mtrix of vector * A z 0 x y Vector Multipliction Dot product (2.4.3) Cross product (2.4.4) Orthonorml ses nd coordinte frmes (2.4.5,6) Note: ook tlks out right nd left-hnded coordinte systems. We lwys use right-hnded Orthonorml ses/coordinte frmes Importnt for representing points, positions, loctions Often, mny sets of coordinte systems (not just X, Y, Z) Glol, locl, world, model, prts of model (hed, hnds, ) Criticl issue is trnsforming etween these systems/ses opic of next 3 lectures Coordinte Frmes Any set of 3 vectors (in 3D) so tht u v w 1 uv vw uw 0 wuv p ( puu ) ( pvv ) ( pww ) 3

Constructing coordinte frme Often, given vector (viewing direction in HW1), wnt to construct n orthonorml sis Need second vector (up direction of cmer in HW1) Construct n orthonorml sis (for instnce, cmer coordinte frme to trnsform world ojects into in HW1) Constructing coordinte frme? We wnt to ssocite w with, nd v with But nd re neither orthogonl nor unit norm And we lso need to find u w u w w v wu Mtrices Cn e used to trnsform points (vectors) rnsltion, rottion, sher, scle (more detil next lecture) Section 5.2.1 nd 5.2.2 of text Instructive to red ll of 5 ut not tht relevnt to course Wht is mtrix Arry of numers (m n = m rows, n columns) 1 3 0 4 Addition, multipliction y sclr simple: element y element Mtrix-mtrix multipliction Numer of columns in first must = rows in second 1 3 3 6 9 4 0 4 Mtrix-mtrix multipliction Numer of columns in first must = rows in second 1 3 9 27 33 13 3 6 9 4 19 44 61 26 0 4 8 28 32 12 mtrix nd column j of second mtrix mtrix nd column j of second mtrix 4

Mtrix-mtrix multipliction Numer of columns in first must = rows in second 1 3 9 27 33 13 3 6 9 4 19 44 61 26 0 4 8 28 32 12 Mtrix-mtrix multipliction Numer of columns in first must = rows in second 1 3 9 27 33 13 3 6 9 4 19 44 61 26 0 4 8 28 32 12 mtrix nd column j of second mtrix mtrix nd column j of second mtrix Mtrix-mtrix multipliction Numer of columns in first must = rows in second 1 3 3 6 9 4 NO EVEN LEGAL!! 0 4 Non-commuttive (AB nd BA re different in generl) Associtive nd distriutive A(B+C) = AB + AC (A+B)C = AC + BC Mtrix-Vector Multipliction Key for trnsforming points (next lecture) ret vector s column mtrix (m 1) E.g. 2D reflection out y-xis (from textook) 1 0x x 0 1y y rnspose of Mtrix (or vector?) 1 2 1 3 5 3 4 2 4 6 5 6 ( AB) B A Identity Mtrix nd Inverses 1 0 0 I33 0 1 0 0 0 1 1 1 AA A A I 1 1 1 ( AB) B A 5

Vector multipliction in Mtrix form Dot product? Cross product? x z x y z y x x y y z z 0 z y x y x 0 z Dul mtrix of vector * A z 0 x y 6