A.7.1 Trigonometric interpretation of dot product... 324. A.7.2 Geometric interpretation of dot product... 324



Similar documents
9.3. The Scalar Product. Introduction. Prerequisites. Learning Outcomes

LINEAR TRANSFORMATIONS AND THEIR REPRESENTING MATRICES

EQUATIONS OF LINES AND PLANES

Vectors Recap of vectors

Vector differentiation. Chapters 6, 7

Mathematics. Vectors. hsn.uk.net. Higher. Contents. Vectors 128 HSN23100

Vectors and dyadics. Chapter 2. Summary. 2.1 Examples of scalars, vectors, and dyadics

. At first sight a! b seems an unwieldy formula but use of the following mnemonic will possibly help. a 1 a 2 a 3 a 1 a 2

Vectors and dyadics. Chapter 2. Summary. 2.1 Examples of scalars, vectors, and dyadics

Section 5-4 Trigonometric Functions

MODULE 3. 0, y = 0 for all y

PROF. BOYAN KOSTADINOV NEW YORK CITY COLLEGE OF TECHNOLOGY, CUNY

Lecture 5. Inner Product

4.11 Inner Product Spaces

Use Geometry Expressions to create a more complex locus of points. Find evidence for equivalence using Geometry Expressions.

Math 314, Homework Assignment Prove that two nonvertical lines are perpendicular if and only if the product of their slopes is 1.

Operations with Polynomials

Or more simply put, when adding or subtracting quantities, their uncertainties add.

Vectors. The magnitude of a vector is its length, which can be determined by Pythagoras Theorem. The magnitude of a is written as a.

Example 27.1 Draw a Venn diagram to show the relationship between counting numbers, whole numbers, integers, and rational numbers.

Homework 3 Solutions

Scalar and Vector Quantities. A scalar is a quantity having only magnitude (and possibly phase). LECTURE 2a: VECTOR ANALYSIS Vector Algebra

6.2 Volumes of Revolution: The Disk Method

Polynomial Functions. Polynomial functions in one variable can be written in expanded form as ( )

Radius of the Earth - Radii Used in Geodesy James R. Clynch February 2006

PHY 140A: Solid State Physics. Solution to Homework #2

5.2. LINE INTEGRALS 265. Let us quickly review the kind of integrals we have studied so far before we introduce a new one.

Integration. 148 Chapter 7 Integration

Reasoning to Solve Equations and Inequalities

LECTURE #05. Learning Objective. To describe the geometry in and around a unit cell in terms of directions and planes.

Lectures 8 and 9 1 Rectangular waveguides

Physics 43 Homework Set 9 Chapter 40 Key

addition, there are double entries for the symbols used to signify different parameters. These parameters are explained in this appendix.

2 DIODE CLIPPING and CLAMPING CIRCUITS

Brillouin Zones. Physics 3P41 Chris Wiebe

Bayesian Updating with Continuous Priors Class 13, 18.05, Spring 2014 Jeremy Orloff and Jonathan Bloom

Algebra Review. How well do you remember your algebra?

Graphs on Logarithmic and Semilogarithmic Paper

Experiment 6: Friction

1. Find the zeros Find roots. Set function = 0, factor or use quadratic equation if quadratic, graph to find zeros on calculator

Vectors and Scalars. AP Physics B

1.2 The Integers and Rational Numbers

Geometry 7-1 Geometric Mean and the Pythagorean Theorem

Pentominoes. Pentominoes. Bruce Baguley Cascade Math Systems, LLC. The pentominoes are a simple-looking set of objects through which some powerful

and thus, they are similar. If k = 3 then the Jordan form of both matrices is

Cypress Creek High School IB Physics SL/AP Physics B MP2 Test 1 Newton s Laws. Name: SOLUTIONS Date: Period:

Review guide for the final exam in Math 233

AAPT UNITED STATES PHYSICS TEAM AIP 2010

RIGHT TRIANGLES AND THE PYTHAGOREAN TRIPLETS

Example A rectangular box without lid is to be made from a square cardboard of sides 18 cm by cutting equal squares from each corner and then folding

PROBLEMS 13 - APPLICATIONS OF DERIVATIVES Page 1

Regular Sets and Expressions

Basic Analysis of Autarky and Free Trade Models

CS99S Laboratory 2 Preparation Copyright W. J. Dally 2001 October 1, 2001

Section 1: Crystal Structure

Pure C4. Revision Notes

Appendix D: Completing the Square and the Quadratic Formula. In Appendix A, two special cases of expanding brackets were considered:

Binary Representation of Numbers Autar Kaw

SPECIAL PRODUCTS AND FACTORIZATION

9 CONTINUOUS DISTRIBUTIONS

Babylonian Method of Computing the Square Root: Justifications Based on Fuzzy Techniques and on Computational Complexity

Physics 2102 Lecture 2. Physics 2102

P.3 Polynomials and Factoring. P.3 an 1. Polynomial STUDY TIP. Example 1 Writing Polynomials in Standard Form. What you should learn

The Velocity Factor of an Insulated Two-Wire Transmission Line

Physics 6010, Fall 2010 Symmetries and Conservation Laws: Energy, Momentum and Angular Momentum Relevant Sections in Text: 2.6, 2.

FAULT TREES AND RELIABILITY BLOCK DIAGRAMS. Harry G. Kwatny. Department of Mechanical Engineering & Mechanics Drexel University

Factoring Polynomials

Applications to Physics and Engineering

AREA OF A SURFACE OF REVOLUTION

MATH 150 HOMEWORK 4 SOLUTIONS

Module 2. Analysis of Statically Indeterminate Structures by the Matrix Force Method. Version 2 CE IIT, Kharagpur

Multiplication and Division - Left to Right. Addition and Subtraction - Left to Right.

GENERALIZED QUATERNIONS SERRET-FRENET AND BISHOP FRAMES SERRET-FRENET VE BISHOP ÇATILARI

Helicopter Theme and Variations

Section 7-4 Translation of Axes

FUNCTIONS AND EQUATIONS. xεs. The simplest way to represent a set is by listing its members. We use the notation

Lecture 3 Gaussian Probability Distribution

MA Lesson 16 Notes Summer 2016 Properties of Logarithms. Remember: A logarithm is an exponent! It behaves like an exponent!

The Definite Integral

Clipping & Scan Conversion. CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2005

0.1 Basic Set Theory and Interval Notation

, and the number of electrons is -19. e e C. The negatively charged electrons move in the direction opposite to the conventional current flow.

Harvard College. Math 21a: Multivariable Calculus Formula and Theorem Review

Second Term MAT2060B 1. Supplementary Notes 3 Interchange of Differentiation and Integration

Integration by Substitution

Unit 6: Exponents and Radicals

Math 135 Circles and Completing the Square Examples

6 Energy Methods And The Energy of Waves MATH 22C

4 Approximations. 4.1 Background. D. Levy

Rotating DC Motors Part II

CURVES ANDRÉ NEVES. that is, the curve α has finite length. v = p q p q. a i.e., the curve of smallest length connecting p to q is a straight line.

Answer, Key Homework 10 David McIntyre 1

The remaining two sides of the right triangle are called the legs of the right triangle.

Chapter 2 The Number System (Integers and Rational Numbers)

Linear Equations in Two Variables

COMPONENTS: COMBINED LOADING

Practice Test 2. a. 12 kn b. 17 kn c. 13 kn d. 5.0 kn e. 49 kn

Point Groups and Space Groups in Geometric Algebra

SECTION 7-2 Law of Cosines

Transcription:

A P P E N D I X A Vectors CONTENTS A.1 Scling vector................................................ 321 A.2 Unit or Direction vectors...................................... 321 A.3 Vector ddition................................................. 322 A.4 Vector sutrction............................................. 322 A.5 Points nd vectors............................................. 322 A.6 Prmetric definition of lines nd rys........................ 323 A.7 Dot or inner product........................................... 323 A.7.1 Trigonometric interprettion of dot product......... 324 A.7.2 Geometric interprettion of dot product............. 324 A.7.3 Dot product exmple: The distnce from point to line..................................................... 325 A.7.4 Dot product exmple: Mirror reflection.............. 325 A.8 Cross Product.................................................. 326 A.8.1 Trigonometric interprettion of cross product....... 326 A.8.2 Cross product exmple: Finding surfce normls.... 327 A.8.3 Cross product exmple: Computing the re of tringle................................................. 327 319

320 Foundtions of Physiclly Bsed Modeling nd Animtion To mthemticin, vector is the fundmentl element of wht is known s vector spce, supporting the opertions of scling, y elements known s sclrs, nd lso supporting ddition etween vectors. When using vectors to descrie physicl quntities, like velocity, ccelertion, nd force, we cn move wy from this strct definition, nd stick with more concrete notion. We cn view them s rrows in spce, of prticulr length nd denoting prticulr direction, nd we cn think of the corresponding sclrs s simply the rel numers. Prcticlly speking, vector is simply wy of simultneously storing nd hndling two pieces of informtion: direction in spce, nd mgnitude or length. An rrow is convenient wy to drw vector; since oth length nd direction re clerly indicted. A rel numer is convenient wy to represent sclr, which when multiplied y vector chnges its length. To the left re three visul representtions of identicl vectors. They re identicl, since they re ll of the sme length nd the sme direction, i.e. they re prllel to ech other. Their loction within the spce is irrelevnt. In the study of physiclly sed nimtion, we will initilly e interested in vectors in twodimensionl (2D) nd in three-dimensionl (3D) spce, whose elements re rel numers. But, we will see lter tht vectors cn e defined in spce of ny numer of dimensions, with elements tht my themselves e multidimensionl. Nottionlly, vector is usully denoted y lower-cse letter, which hs line over it, like v, or is printed in old type, like v. For hnd written notes, the line is most convenient, ut in printed form the old form is more usul. Throughout these notes the form v is used. A vector in 2D Eucliden spce is defined y pir of sclrs rrnged in column, like ] v = [ vx Exmining the digrm to the right, we see tht v x denotes the horizontl extent or component of the vector, nd v y its verticl component. Note, tht in computer progrm this structure cn e esily represented s two-element rry of floting point numers, or struct contining two flots. When working in 2D, the direction of the vector cn e given y the slope m = v y /v x. Its mgnitude, lso clled its norm, is written v. By the Pythgoren Theorem, v = v 2 x + v 2 y. v y. v v x v y A vector in 3D spce is defined y three sclrs rrnged in column, v = v x v y v z, where v x is the horizontl component, v y the verticl component, nd v z the depth

Vectors 321 component. The norm of 3D vector v is v = v 2 x + v 2 y + v 2 z. In 3D there is no simple equivlent to the slope. The direction of 3D vector is often given in terms of its zimuth nd elevtion. But, for our purposes it will e est understood y its corresponding unit vector, which we will descrie fter first defining some key lgeric vector opertions. A.1 SCALING A VECTOR 2 Multipliction of vector y rel numer sclr leves the vector s direction unchnged, ut multiplies its mgnitude y the sclr. Algericlly, we multiply ech term of the vector y the sclr. For exmple [ ] [ ] x 2x 2 = 2 =. y 2 y /2 Division y sclr is the sme s multipliction y the reciprocl of the sclr: [ ] x /2 /2 =. y /2 A.2 UNIT OR DIRECTION VECTORS The direction of vector is most esily descried y unit vector, lso clled direction vector. A unit vector, for prticulr vector, is prllel to tht vector ut of unit length. Therefore, it retins the direction, ut not the norm of the prent vector. Throughout these notes the nottion ˆv will e used to indicte unit vector in the direction of prent vector v. For exmple, the unit or direction vector corresponding with the 2D vector would e [ ] ] x / [x = =. y / y

322 Foundtions of Physiclly Bsed Modeling nd Animtion A.3 VECTOR ADDITION Addition of vectors cn e expressed y digrm. Plcing the vectors end to end, the vector from the strt of the first vector to the end of the second vector is the sum of the vectors. One wy to think of this is tht we strt t the eginning of the first vector, trvel long tht vector to its end, nd then trvel from the strt of the second vector to its end. An rrow constructed etween the strting nd ending points defines new vector, which is the sum of the originl vectors. Algericlly, this is equivlent to dding corresponding terms of the two vectors: " # " # " # + x += x + x = x. y y y + y + We cn think of this s gin mking trip from the strt of the first vector to the end of the second vector, ut this time trveling first horizontlly the distnce x + x nd then verticlly the distnce y + y. A.4 VECTOR SUBTRACTION Sutrction of vectors cn e shown in digrm form y plcing the strting points of the two vectors together, nd then constructing n rrow from the hed of the second vector in the sutrction to the hed of the first vector. Algericlly, we sutrct corresponding terms: " # " # " # x = x x = x. y y y y - A.5 POINTS AND VECTORS (x,y) Y p (0,0) O X p This leds us to the ide tht points nd vectors cn e interchnged lmost. While vectors cn exist nywhere in spce, point is lwys defined reltive to the origin, O. Thus, we cn sy tht point, p"=# (x, y), is defined y the origin, O = (0, 0) x nd vector, p =, i.e. y p = O + p. Becuse the origin is ssumed to e the point (0, 0), points nd vectors" cn e represented the sme wy, e.g. the point (2, 3) cn e represented s the # 2 vector. This interchngeility cn e very convenient in mny cses, ut cn lso led 3

Vectors 323 to confusion. It is good ide to mke sure tht when storing dt, you clerly indicte which vlues re points, nd which re vectors. As will e seen elow, the homogeneous coordintes used to define trnsformtions cn help with this. Equivlent to the ove, we cn write, p = p O, i.e. vector defines the mesure from the origin to prticulr point in spce. More generlly, vector cn lwys e defined y the difference etween ny two points, p nd q. The vector v = p q represents the direction nd distnce from point q to point p. Conversely, the point q nd the vector v define the point, p = q + v, which is trnslted from q y the components of v. A.6 PARAMETRIC DEFINITION OF LINES AND RAYS t x(t) This leds us to compct definition of line in spce, written in terms of unit vector nd point. Let p e known point (expressed in vector form) on the line eing defined, nd let e unit vector whose direction is prllel to the desired line. Then, the locus of points on the line is the set of ll points x, stisfying x(t) = p + t. p The vrile t is rel numer, nd is known s the line prmeter. It mesures the distnce from the point p to the point x(t). If t is positive, the point x lies in the direction of the unit vector from point p, nd if t is negtive, the point lies in the direction opposite to the unit vector. The definition of ry is identicl to the definition of line, except tht the prmeter t of ry is limited to the positive rel numers. Thus, ry cn e interpreted s strting from the point p, nd trveling in the direction of distnce corresponding to t, s t goes from 0 to incresingly lrge positive vlues. On ry, the point p is clled the ry origin, the ry direction, nd t the distnce long the ry. A.7 DOT OR INNER PRODUCT Vector-vector multipliction is not s esily defined s ddition, sutrction nd sclr multipliction. There re ctully severl vector products tht cn e defined. First, we will look t the dot product of two vectors, which is often clled their inner product. Defined lgericlly, the dot product of two vectors is given y ] ] = [ x y [ x y = x x + y y. We multiply corresponding terms nd dd the result. The result is not vector, ut is

324 Foundtions of Physiclly Bsed Modeling nd Animtion in fct sclr. This turns out to hve mny rmifictions. The dot product is mighty opertion nd hs mny uses in grphics! A.7.1 Trigonometric interprettion of dot product liii IIIl cos The dot product cn e written in trigonometric form s = cos θ, where θ is the smllest ngle etween the two vectors. Note, tht this definition of θ pplies in oth 2D nd 3D. Two nonprllel vectors lwys define plne, nd the ngle θ is the ngle etween the vectors mesured in tht plne. Note tht if oth nd re unit vectors, then = 1, nd = cos θ. So, in generl if you wnt to find the cosine of the ngle etween two vectors nd, first compute the unit vectors nd ˆ in the directions of nd then cos θ = ˆ. Other things to note out the trigonometric representtion of dot product tht follow directly from the cosine reltionship re tht 1. the dot product of orthogonl (perpendiculr) vectors is zero, so if = 0, for vectors nd with non-zero norms, we know tht the vectors must e orthogonl, 2. the dot product of two vectors is positive if the mgnitude of the smllest ngle etween the vectors is less thn 90, nd negtive if the mgnitude of this ngle exceeds 90. A.7.2 Geometric interprettion of dot product Another very useful interprettion of the dot product is tht it cn e used to compute the component of one vector in the direction prllel to nother vector. For exmple, let e unit vector in the direction of vector. Then the length of the projection of nother vector in the direction of vector is. You cn think of this s the length of the shdow of vector on vector. Therefore, the vector component of in the direction of is = ( ). So, is prllel to nd hs length equl to the projection of onto. Note lso tht = will e the component of perpendiculr to vector. The dot product hs mny uses in grphics tht the following two exmples will serve to illustrte.

Vectors 325 A.7.3 Dot product exmple: The distnce from point to line p x Let us look t how dot product cn e used to compute n importnt geometric quntity: the distnce from point to line. We will use the prmetric definition of line, descried ove, specified y point p nd direction vector. To compute the distnce of n ritrry point x from this line, first compute the vector = x p, from the point p on the line to the point x. The component of in the direction of vector is = ( ). The component of perpendiculr to is =, nd the distnce of point x from the line is simply k k. A.7.4 Dot product exmple: Mirror reflection Another very useful exmple of the use of dot product in geometric clcultions is the computtion of the mirror reflection from surfce. Assume tht we hve flt mirror surfce, whose surfce norml is the unit vector n. The v surfce norml is defined to e direction vector perpenn diculr to the surfce. Since there re two such vectors t ny point on surfce, the convention is to tke the direction of the surfce norml to e pointing in the up vr direction of the surfce. For exmple, on sphere it would point out of the sphere, nd on plne it would point in the direction considered to e the top of the plne. Now, we shine light ry with direction v t the surfce. The direction of the reflected ry will e given y vr. Wht must e true is tht the ngle θ etween the norml n nd the light ry v should e the sme s the ngle etween the reflected ry nd the norml, nd ll three vectors v, n, nd vr must lie in the sme plne. Given these constrints, elow is one wy to clculte the light reflection ry vr. v n vr v To mke the figure to the left, we first rotted the scene so everything is in convenient orienttion, with the surfce norml n pointing verticlly, nd the surfce horizontl. Now, move vector v so tht its til is t the reflection point, s shown y the vector drwn with dshed line in the figure. If is the vector prllel to n from the hed of v to the surfce, then y vector ddition we hve vr = v + 2. Now the vector is just the negtive of the component of v in the direction of n. So, = (n v)n.

326 Foundtions of Physiclly Bsed Modeling nd Animtion Thus, v r = v 2( ˆn v) ˆn. A.8 CROSS PRODUCT x The cross product etween two vectors nd is new vector perpendiculr to the plne defined y the originl two vectors. In other words, the cross product of two vectors is vector tht is perpendiculr to oth of the originl vectors. The figure to the left illustrtes the construction. This notion of cross product does not mke sense in 2D spce, since it is not possile for third 2D vector to e perpendiculr to two (non prllel) 2D vectors. Thus, in grphics, the notion of cross product is reserved for working in 3D spce. Since there re two directions perpendiculr to the plne formed y two vectors, we must hve convention to determine which of these two directions to use. In grphics, it is most common to use the right hnd rule, nd we use this convention throughout this text. The right-hnd rule works s follows. Hold your right hnd out flt, with the thum out, ligning the fingers so they point in the direction of. Now, rotte your hnd so you cn curl your fingers in the direction from vector to vector. Your thum will point in the direction of. If you reverse this, nd first lign your fingers with nd then curl them towrds you will see tht you hve to turn your hnd upside down, reversing the direction in which your thum is pointing. From this it should e pprent tht = ( ). In other words, the order of the opernds in the cross product chnges the polrity of the resulting cross product vector. The result is still perpendiculr to oth of the originl vectors, ut the direction is flipped. A.8.1 Trigonometric interprettion of cross product The mgnitude of the cross product is given y = sin θ, x where θ is the smll ngle etween vectors nd. Thus, if nd re unit vectors, the mgnitude of the cross product is the mgnitude of sin θ. Note, tht the cross product of two prllel vectors will e the

Vectors 327 zero vector 0. This is consistent with the geometric notion tht the cross product produces vector orthogonl to the originl two vectors. If the originl vectors re prllel, then there is no unique direction perpendiculr to oth vectors (i.e. there re infinitely mny orthogonl vectors, ll prllel to ny plne perpendiculr to either vector). Algericlly, the cross product is defined s follows. If two vectors re defined then = x y z, nd = x y z, y z z y = z x x z. x y y x The cross product hs mny uses in grphics, which the following two exmples will serve to illustrte. A.8.2 Cross product exmple: Finding surfce normls p 0 v 02 n p 2 v 01 p 1 Suppose we hve tringle (p 0, p 1, p 2 ), nd we wnt to find the tringle s surfce norml. We cn do this esily y use of cross product opertion. First, define vectors long two of the tringle edges: v 01 = p 1 p 0, nd v 02 = p 2 p 0. Then the cross product v 01 v 02 is vector perpendiculr to oth v 01 nd v 02, nd therefore perpendiculr to the plne of the tringle. Scling this vector to unit vector yields the surfce norml vector ˆn = (v 01 v 02 )/ v 01 v 02. A.8.3 Cross product exmple: Computing the re of tringle Another ppliction of cross product to tringles uses the trigonometric definition of the mgnitude of the cross product. Suppose we hve tringle, like the one shown to the right. If we know the lengths of sides nd, nd we know the ngle θ etween these sides, the re computtion is strightforwrd. Reltive to side, the height of the tringle is given y h = sin θ, nd we know tht the re of the tringle is A = 1/2h, so we hve A = 1/2 sin θ. If we represent the sides of the tringle y vectors nd, = nd =. Since the mgnitude of the cross product = sin θ, it follows tht A = 1/2. h