3 views

Uploaded by Shefalimodi

- geomagnet 5
- A Brief List of Matlab Commands
- statics_chapter_7.pdf
- Exp (2)- Vectors (Lab Report) (1)
- G481 Module 1 Motion Questions MS
- 0412 Transpose e
- Diagonal Matrices, Inverse Matrix
- quaternions
- Vectors
- Elements of Electromagnetics Third Edition E Book Chapter 01
- engineering electromagnetic fields and waves 2nd edition.pdf
- 2012 Code for Lighting
- Course on General Relativity
- Chapter 1
- Introduction to Tensors
- Trigonometry Study Guide
- Lecture 25
- Hypersonic Glider Control Using Higher Order Sliding Mode Control
- DocMH.com 2P Balancing.using.skf.Microlog.pdf
- 2012 Code for Lighting

You are on page 1of 7

Online Lecture 2: Review of Basic Math Vectors and Dot Products Ravi Ramamoorthi

Complete HW 0

Sets up basic compilation issues Verifies you can work with feedback/grading servers This lecture is a revision of basic math concepts

First few lectures core math ideas in graphics HW 1 has few lines of code (but start early) Textbooks: None required

Use some ideas discussed in lecture, create images OpenGL/GLSL reference helpful (but not required)

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 object can be matrix-vector multiply Should be refresher on very basic material for most of you Only basic high school math required

Vectors

=

Usually written as a or in bold. Magnitude written as a Length and direction. Absolute position not important

But strictly speaking, positions are not vectors and cannot be added: a location implicitly involves an origin, while an offset does not.

Vector Addition

a = +b

a

Geometrically: Parallelogram rule In cartesian coordinates (next), simply add coords

Cartesian Coordinates

A=4X+3Y

b+

a

b

x A = y

A =

x y

A = x2 + y 2

Vector Multiplication

Dot product Cross product Orthonormal bases and coordinate frames

b

aib = bia = ?

Note: We use right-handed (standard) coordinates

b

b

aib = bia = ?

x x a b =? a b= ya yb

x x a b =? a b= ya yb

x x a b = xa xb + y a y b a b= ya yb

Find angle between two vectors (e.g. cosine of angle between light source and surface for shading)

Projections (of b on a)

b

Finding projection of one vector on another (e.g. coordinates of point in arbitrary coordinate system) Advantage: computed easily in cartesian components

ba =? ba =?

b a = b cos = ba= ba

aib a

a aib = a 2 a a

Online Lecture 2: Review of Basic Math Vectors: Cross Products Ravi Ramamoorthi

Vector Multiplication

Dot product Cross product Orthonormal bases and coordinate frames Note: We use right-handed (standard) coordinates

a b = b a a b = a b sin b

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

x y = +z y x = z y z = +x z y = x z x = +y x z = y a b = b a aa = 0 a (b + c) = a b + a c a (kb) = k(a b)

y z y z b a a b a b = xa y a za = za xb xa zb xb y b zb xa y b y a xb 0 z y a xb a 0 xa y b a b = A*b = za 0 zb y a xa x y z

Dual matrix of vector a

Online Lecture 2: Review of Basic Math Vectors: Orthonormal Basis Frames Ravi Ramamoorthi

Vector Multiplication

Dot product Cross product Orthonormal bases and coordinate frames Note: We use right-handed (standard) coordinates

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

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)

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

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

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

w=

a a

w= u=

a a

bw bw

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

Online Lecture 2: Review of Basic Math Matrices Ravi Ramamoorthi

a w= a u=

bw bw

v =w u

Matrices

Can be used to transform points (vectors)

Translation, rotation, shear, scale (more detail next lecture)

What is a matrix

Array of numbers (mn = m rows, n columns)

1 3 5 2 0 4

Addition, multiplication by a scalar simple: element by element

Matrix-matrix multiplication

Number of columns in first must = rows in second

1 3 3 6 9 4 5 2 2 7 8 3 0 4

Matrix-matrix multiplication

Number of columns in first must = rows in second

9 27 33 13 1 3 3 6 9 4 5 2 2 7 8 3 = 19 44 61 26 8 28 32 12 0 4

Element (i,j) in product is dot product of row i of first matrix and column j of second matrix

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 first must = rows in second

9 27 33 13 1 3 3 6 9 4 = 19 44 61 26 5 2 2 7 8 3 8 28 32 12 0 4

Matrix-matrix multiplication

Number of columns in first must = rows in second

9 27 33 13 1 3 3 6 9 4 = 19 44 61 26 5 2 2 7 8 3 8 28 32 12 0 4

Element (i,j) in product is dot product of row i of first matrix and column j of second matrix

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 first must = rows in second

1 3 3 6 9 4 5 2 NOT EVEN LEGAL!! 2 7 8 3 0 4 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 (m1) E.g. 2D reflection about y-axis

1 0 x x = 0 1 y y

1 2 1 3 5 3 4 = 2 4 6 5 6

T

I33 1 0 0 = 0 1 0 0 0 1

(AB)T = BT AT

Dot product?

a b = aT b

(x

Cross product?

ya

za

0 a b = A b = za y a

*

x b y b = xa xb + y a y b + za zb zb

za 0 xa

y a xb xa y b 0 zb

- geomagnet 5Uploaded byPARTHA SARATHI PAL
- A Brief List of Matlab CommandsUploaded byThieroy Pelenda
- statics_chapter_7.pdfUploaded byKenyi Calle Cruz
- Exp (2)- Vectors (Lab Report) (1)Uploaded byMansoor Al Tuniji
- G481 Module 1 Motion Questions MSUploaded byAmber
- 0412 Transpose eUploaded bysanjayeds
- Diagonal Matrices, Inverse MatrixUploaded byindelam
- quaternionsUploaded bypmcarmorg
- VectorsUploaded byBonito Mathew
- Elements of Electromagnetics Third Edition E Book Chapter 01Uploaded byYepuru Chaithanya
- engineering electromagnetic fields and waves 2nd edition.pdfUploaded byxieapi
- 2012 Code for LightingUploaded byWaleed Mohammed Fekry
- Course on General RelativityUploaded byhoorie
- Chapter 1Uploaded byMac Visual
- Introduction to TensorsUploaded byAnonymous TI2bUT
- Trigonometry Study GuideUploaded byMya Ballin
- Lecture 25Uploaded byHemant Tulsani
- Hypersonic Glider Control Using Higher Order Sliding Mode ControlUploaded byP_lee
- DocMH.com 2P Balancing.using.skf.Microlog.pdfUploaded byRamon A. Ruiz O.
- 2012 Code for LightingUploaded byVictor Ciprian
- List of C ProgramsUploaded byDeepali Kayande

- Dtu BrochureUploaded byShefalimodi
- digital communication notesUploaded byravindarsingh
- network tools.pdfUploaded byShefalimodi
- HP web2Uploaded byShefalimodi
- Smith Chart BasicsUploaded byDina Garan
- Information BrochurejljkUploaded byKishor Hegde
- MITRES_6_007S11_lec20Uploaded byShefalimodi
- Recommended Books for GATE ECEUploaded byLamont Wright
- Power and RMS Values of Fourier SeriesUploaded byahmetebeninami
- sameerUploaded byevd89
- GATE 2010 EE SolutionUploaded bykumar478

- Undergraduate Algebra Problems and SolutionsUploaded byAlexis Tarazona
- Calculus FormulasUploaded byllamaster 88
- Notes Chapter 9Uploaded byAna Luisa Garnica Salgado
- Maths Olympiad QuestionsUploaded byNitin
- On Fuzzy Compact Open TopologyUploaded bySudam Dang
- CBSE Class 11 Assignment for Sequences and SeriesUploaded byKarthik Boopathy
- Math11N12thUploaded byMukesh Malav
- Norms 2010Uploaded byCiprian Biris
- buchi1Uploaded byMandavi Prakash
- Matriculation Quiz QS025Uploaded bySUE YIN
- Fundamentals of Algebraic Topology (Gradua - Steven WeintraubUploaded byjesusdark44
- 9A04304 Signals & SystemsUploaded bysivabharathamurthy
- Neutrosophic Multi-Criteria Decision Making. Special Issue at “Axioms” JournalUploaded byAnonymous 0U9j6BLllB
- Math 2320 Assignment 1 SolutionUploaded bykitty
- Using Path-Finding Algorithms of Graph Theory for Route-SearchingUploaded byradhikakumaran3
- 354082212-Solutions-Manual-Introduction-to-Finite-Elements-in-Engineering-4th-Edition-Tirupathi-R-Chandrupatla-Ashok-D-Belegundu.pdfUploaded byKOKOLE
- 08 Math for EB - MF.pdfUploaded byFikri Nur
- research paperUploaded byHenrikki Matilainen
- the pole and zeros.pdfUploaded byKim Keat
- MSc_General_Topology_Azhar_Hussain(1)Uploaded byAmir Ali
- ode10.pdfUploaded byfatihanoor
- lecture-static-04_011.pdfUploaded byAshoka Vanjare
- De Movire's TheoremUploaded byTutor World Online
- ConcavityUploaded byparapara11
- Chapter 11Uploaded byPamyu Hamasaki Peral
- Combinatorics Test SolutionsUploaded byhappymark2
- CBSE X MathematicsUploaded bymicrodotcdm
- Group TheoryUploaded bygollakoti
- maagoUploaded byCarlton Green
- MASS – Modified Assignment Algorithm in Facilities Layout PlanningUploaded byAnonymous 0U9j6BLllB