Elementary maths for GMT

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

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

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

Math 241, Exam 1 Information.

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

Study guide for Exam 1. by William H. Meeks III October 26, 2012

Vectors. The standard geometric definition of vector is as something which has direction and magnitude but not position.

Math 302 Outcome Statements Winter 2013

12.5 Equations of Lines and Planes

Remark 3.2. The cross product only makes sense in R 3.

Elementary maths for GMT

LINEAR ALGEBRA - CHAPTER 1: VECTORS

Review of Coordinate Systems

Distance Formula in 3-D Given any two points P 1 (x 1, y 1, z 1 ) and P 2 (x 2, y 2, z 2 ) the distance between them is ( ) ( ) ( )

MATH 12 CLASS 4 NOTES, SEP

Mathematical Foundations: Intro

MATH 12 CLASS 5 NOTES, SEP

Course Notes Math 275 Boise State University. Shari Ultman

Stereographic projection and inverse geometry

Exam 1 Review SOLUTIONS

SOLUTIONS TO HOMEWORK ASSIGNMENT #2, Math 253

Chapter 13: Vectors and the Geometry of Space

Chapter 13: Vectors and the Geometry of Space

Applied Linear Algebra in Geoscience Using MATLAB

Linear Algebra I. Ronald van Luijk, 2015

Review of Linear Algebra

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

Calculus III (MAC )

,, rectilinear,, spherical,, cylindrical. (6.1)

Department of Mathematical and Statistical Sciences University of Alberta

MATH Final Review

Midterm 1 Review. Distance = (x 1 x 0 ) 2 + (y 1 y 0 ) 2.

MATH 1020 WORKSHEET 12.1 & 12.2 Vectors in the Plane

Vectors and Fields. Vectors versus scalars

This pre-publication material is for review purposes only. Any typographical or technical errors will be corrected prior to publication.

4.3 Equations in 3-space

Vectors a vector is a quantity that has both a magnitude (size) and a direction

Inner Product Spaces 6.1 Length and Dot Product in R n

(arrows denote positive direction)

Graphics (INFOGR), , Block IV, lecture 1 Deb Panja. Today: Vectors, and vector algebra in 2D. Welcome

Computer Graphics MTAT Raimond Tunnel

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

1 Differentiable manifolds and smooth maps. (Solutions)

Lecture 02: 2D Geometry. August 24, 2017

Linear Algebra & Geometry why is linear algebra useful in computer vision?

Linear Algebra Homework and Study Guide

MATH 255 Applied Honors Calculus III Winter Midterm 1 Review Solutions

(1) Recap of Differential Calculus and Integral Calculus (2) Preview of Calculus in three dimensional space (3) Tools for Calculus 3

The Geometry of R n. Supplemental Lecture Notes for Linear Algebra Courses at Georgia Tech

MAT 1339-S14 Class 8

1 Differentiable manifolds and smooth maps. (Solutions)

Introduction. Chapter Points, Vectors and Coordinate Systems

LEARN ABOUT the Math

Vector Geometry. Chapter 5

Section 14.1 Vector Functions and Space Curves

Lecture 1 Complex Numbers. 1 The field of complex numbers. 1.1 Arithmetic operations. 1.2 Field structure of C. MATH-GA Complex Variables

4.1 Distance and Length

Notes on multivariable calculus

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.

This appendix provides a very basic introduction to linear algebra concepts.

VECTORS vectors & scalars vector direction magnitude scalar only magnitude

MTAEA Vectors in Euclidean Spaces

which arises when we compute the orthogonal projection of a vector y in a subspace with an orthogonal basis. Hence assume that P y = A ij = x j, x i

Solution. The relationship between cartesian coordinates (x, y) and polar coordinates (r, θ) is given by. (x, y) = (r cos θ, r sin θ).

Linear Algebra. Preliminary Lecture Notes

CALC 3 CONCEPT PACKET Complete

SOME PROBLEMS YOU SHOULD BE ABLE TO DO

Linear Algebra II. 7 Inner product spaces. Notes 7 16th December Inner products and orthonormal bases

MATH Linear Algebra

Lecture 2: Vector-Vector Operations

CALCULUS 3 February 6, st TEST

6. Linear Transformations.

Solutions for the Practice Final - Math 23B, 2016

Math Linear Algebra

Linear Algebra & Geometry why is linear algebra useful in computer vision?

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 Massoud Malek

1.3 LECTURE 3. Vector Product

Math 462: Homework 2 Solutions

DATE: MATH ANALYSIS 2 CHAPTER 12: VECTORS & DETERMINANTS

Linear Algebra. Preliminary Lecture Notes

Linear Algebra I for Science (NYC)

Rational Numbers and Exponents

CS 4204 Computer Graphics

MATH 423 Linear Algebra II Lecture 33: Diagonalization of normal operators.

MAT1035 Analytic Geometry

Linear Algebra Review. Vectors

GEOMETRY AND VECTORS

Linear Algebra MATH20F Midterm 1

MTH Linear Algebra. Study Guide. Dr. Tony Yee Department of Mathematics and Information Technology The Hong Kong Institute of Education

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

Chapter 2. Vectors and Vector Spaces

Department of Physics, Korea University

FFTs in Graphics and Vision. The Laplace Operator

Lecture 1: Systems of linear equations and their solutions

CG Basics 1 of 10. Mathematical Foundations: Vectors, Matrices, & Parametric Equations

Vectors. September 2, 2015

Chapter 1A -- Real Numbers. iff. Math Symbols: Sets of Numbers

12.1. Cartesian Space

MATH 2083 FINAL EXAM REVIEW The final exam will be on Wednesday, May 4 from 10:00am-12:00pm.

Transcription:

Elementary maths for GMT Linear Algebra Part 1: Vectors, Representations

Algebra and Linear Algebra Algebra: numbers and operations on numbers 2 + 3 = 5 3 7 = 21 Linear Algebra: tuples, triples... of numbers and operations on them Assists in geometric computations 2

Vectors: definition A vector in R d is an ordered d-tuple v = v 1 v 2 v d In R 3, for example: v = v 1 v 2 v 3 ( or v x v y vz, or x v y v z v, or (v 1, v 2, v 3 ), or... ) 3

Vectors: algebraic interpretation A 2D vector x v y v be seen as the point x v, y v in the Cartesian plane can 4

Vectors: notation A 2D vector should be denoted as x v x v, y v T y v The T in the exponent stands for transposed or as A 2D point should be denoted as x v, y v Be aware of misused notation (mostly point notation used for a vector) 5

Vectors: geometric interpretation A 2D vector x v y can v be seen as an offset from the origin Such an offset (arrow) can be translated 6

Vectors: length and scalar multiple The Euclidean length of a d-dimensional vector v is v = v 1 2 + v 2 2 + + v d 2 A scalar multiple of a d-dimensional vector v is λv = λv 1, λv 2,, λv d T Note that v and λv have the same direction or opposite directions 7

Parallel vectors Two vectors v 1 and v 2 are parallel if one is a scalar multiple of the other, i.e. there is a λ 0 such that v 2 = λv 1 Note that if one of the vectors is the null vector, then the vectors are considered neither parallel nor not parallel 8

Unit vectors A vector v is a unit vector if v = 1 Normalization Questions Given an arbitrary vector v, how do we find a unit vector parallel to v? Can every vector be normalized? 9

Addition of vectors Given two vectors in R d, v = v 1, v 2,, v d T and w = w 1, w 2,, w d T their sum is defined as v + w = v 1 + w 1, v 2 + w 2,, v d + w d T Q: How would subtraction be defined? 10

Addition of vectors Addition of vectors is commutative as it can be seen easily from the geometric interpretation Q: show algebraically that vector addition is commutative Q: what is the relation between v, w, and v + w? 11

A 2D vector can be expressed as a combination of any pair of non-parallel vectors For instance, in the figure, a = 1.5v + 0.6w Such a pair is called linearly independent, and forms a 2D basis The extension to higher dimensions is straightforward Bases in 2D 12

Orthonormal basis in 2D Two vectors form an orthonormal basis in 2D if (1) they are orthogonal to each other, and (2) they are unit vectors The advantage of an orthonormal basis is that lengths of vectors, expressed in the basis, are easy to calculate 13

The null vector The null vector 0 0 0 is special It acts as the zero for addition of vectors It is the only vector that has length zero It is the only vector that does not have a direction It can not be used as a base vector 14

For two vectors v, w R d, the dot product is defined as v w = v 1 w 1 + v 2 w 2 + + v d w d, or We have cos θ = Dot product v w = v w v w d i=1 v i w i, where θ is the angle between the two vectors Note that the dot product is also called inner product or scalar product and that the result of the operation is a scalar (not a vector) 15

Questions Dot product What is the inner product of an arbitrary unit vector with itself? What do we know if for two vectors v and w we have that v w = 0? 16

Cross product For two vectors v, w R 3, the cross product is defined as v 2 w 3 v 3 w 2 v w = v 3 w 1 v 1 w 3 v 1 w 2 v 2 w 1 Q: Show that v w is orthogonal to both v and w We have that v w = v w sin θ, where θ is the angle between v and w Note that the result of the operation is a vector 17

Cross product Questions It is possible or necessary that v and w are orthogonal to form v w? What is v w if v and w are parallel? 18

Questions Products and null vector What is the dot product of a vector and the null vector? What is the cross product of a vector and the null vector? 19

Bases in 3D You need three vectors to form a basis in 3D If u, v, and w form a basis, then any vector a in 3D can be expressed as a = μu + λv + ρw where μ, λ, and ρ are scalars Q: Let u, v, and w be three vectors (no one is the null vector). Suppose that u and v are not parallel, u and w are not parallel, and v and w are not parallel. Do u, v, and w always form a basis? 20

Linear dependence in 3D If for three vectors u, v, and w in 3D (no null vectors), we have w = μu + λv where μ and λ are scalars, then u, v, and w are linearly dependent If such μ and λ do not exist, then they are linearly independent Any three linearly independent vectors in 3D form a 3D basis 21

Orthonormal 3D bases Three vectors form an orthonormal basis in 3D if (1) each pair of them is orthogonal, and (2) they are unit vectors Questions What would you do to test if three 3D vectors form an orthonormal basis? Suppose that two vectors u and v in 3D are orthogonal, and they are unit vectors. Let w be the cross-product of u and v. What can you say about u, v, and w (do they form an orthonormal basis)? 22

Left- and right-handed systems Coordinate systems in 3D come in two flavors: lefthanded and right-handed There are arguments for both systems for The global system The camera system Objects systems 23

Coordinate transformations A frequent operation in graphics is the change from one coordinate system (e.g. the (u, v, w) camera system) to another (e.g. the (x, y, z) global system) Having orthonormal bases for both systems makes the transformations simpler 24

2D implicit curves An implicit curve in 2D has the form f x, y = 0 f maps two-dimensional points to a real value; the points for which this value is 0 are on the curve, while other points are not on the curve 25

Implicit representation of circles The implicit representation of a 2D circle with center c and radius r is x x c 2 + y y c 2 r 2 = 0 So for any point p that lies on the circle, we have p c p c r 2 = 0, so p c 2 r 2 = 0, which gives p c = r 26

Implicit representation of lines A well-known representation of lines is the slopeintercept form y = ax + b This can easily be converted to ax + y b = 0 If b = 0, the line intersects the origin, and we have n p = 0, with p = x y and n = a 1 Q: What if the line does not intersect the origin? 27

A parametric curve is controlled by a single parameter, and has the form x y = g(t) h(t) Parametric representations have some advantages over functions, even if a function would suffice to represent the curve 2D parametric curves 28

Parametric equation of a circle The parametric equation of a 2D circle with center c and radius r is x y = x c + r cos φ y c + r sin φ 29

Parametric equation of a line The parametric equation of a line through the points p 0 and p 1 is x y = x p 0 + t(x p1 x p0 ) y p0 + t(y p1 y p0 ) This can alternatively be written as p t = p 0 + t(p 1 p 0 ) 30

Conversion between representations It is convenient to be able to convert a parametric equation of a line into an implicit equation, and vice versa Q: How do we do that? 31

Implicit surfaces: from 2D to 3D Recall that an implicit curve has the form f x, y = 0 The 3D generalization is an implicit surface with a similar form f x, y, z = 0 Fun project: try to draw the 4D image of the graph of such function x 2 1 x 2 y 2 2 + z2 2 1 40 1 + x2 + y 2 + z 2 = 0 32

Implicit one-dimensional curves in 3D? Cooking up an implicit function for a onedimensional thingy in 3D is in general not possible; such thingies are degenerate surfaces For example, x 2 + y 2 = 0 is a cylinder with radius 0: the Z-axis More complex curves can be described as the intersection of two or more implicit surfaces 33

Parametric curves and surfaces As opposed to implicit curves, it is possible to specify parametric curves in 3D x = f t, y = g t, z = h(t) Parametric surfaces depend on two parameters x = f u, v, y = g u, v, z = h(u, v) 34

Implicit spheres The sphere equation is given by: x c x 2 + y c y 2 + z cz 2 r 2 = 0 Just as in the circle case, this can be written in dot product form for any point p on the sphere p c p c r 2 = 0, so p c 2 r 2 = 0, which gives p c = r 35

Parametric spheres Spheres can also be represented parametrically For example, a sphere with radius r centered at the origin has the equation x = r cos φ sin θ, y = r sin φ sin θ, z = r cos θ Q: What would the equation for a sphere with radius r centered at c = (c x, c y, c z ) be? 36

Parametric spheres x = r cos φ sin θ, y = r sin φ sin θ, z = r cos θ The parametric representation of a sphere looks much more inconvenient than the implicit equation However, when we have to do texture mapping, the parametric representation turns out to be quite convenient 37

Implicit planes The implicit equation for a plane in 3D looks a lot like the equation for a line in 2D ax + by + cz d = 0 Here, (a, b, c) T is a normal vector of the plane Q: What is the meaning of d? 38

Parametric planes Planes can also be described parametrically Instead of one direction vector (as for lines), we need two x, y, z = x p, y p, z p + s x v, y v, z v T + t(x w, y w, z w ) T 39

Implicit and parametric planes Implicit equation: ax + by + cz d = 0 Parametric equation: x, y, z = x p, y p, z p + s x v, y v, z v T + t(x w, y w, z w ) T Questions Is an implicit description of a plane in 3D unique? Is a parametric description of a plane in 3D unique? 40