Example: quiz answers

Introductory Vector Calculus - web.cs.wpi.edu

Introductory Vector CalculusVersion Wittels121 Clark RoadBrookline MA 1994-97 Norman WittelsIntroductory Vector CalculusIntroductionThese notes summarize some of the Vector Calculus used in computer graphics and machinevision. They are not intended to supplant mathematics courses or texts nor are they intended tobe complete or rigorous. The main purposes of these notes are to show a few examples at aproficiency level useful for designing computer graphics and machine vision algorithms and toprovide references which may be helpful in achieving that use coordinate systems to denote positions of points in space. All computer graphics/visionis done using affine coordinate systems. In such a system, each point is determined by a uniqueset of coordinates. The size of the set the number of coordinates required is called thedimensionality of the coordinate system. A 2D system requires 2 coordinates, a 3D systemrequires 3 coordinates, etc.

Introductory Vector Calculus Pxyz xyz=(),, ,Pxyz=()ˆ,ˆ,ˆ When using the cartesian coordinate system, some authors use a mixed notation in which the linear sum of the unit vectors is implied by the coefficients (the coordinates)

Tags:

  Vector, Introductory, Calculus, Introductory vector calculus

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of Introductory Vector Calculus - web.cs.wpi.edu

1 Introductory Vector CalculusVersion Wittels121 Clark RoadBrookline MA 1994-97 Norman WittelsIntroductory Vector CalculusIntroductionThese notes summarize some of the Vector Calculus used in computer graphics and machinevision. They are not intended to supplant mathematics courses or texts nor are they intended tobe complete or rigorous. The main purposes of these notes are to show a few examples at aproficiency level useful for designing computer graphics and machine vision algorithms and toprovide references which may be helpful in achieving that use coordinate systems to denote positions of points in space. All computer graphics/visionis done using affine coordinate systems. In such a system, each point is determined by a uniqueset of coordinates. The size of the set the number of coordinates required is called thedimensionality of the coordinate system. A 2D system requires 2 coordinates, a 3D systemrequires 3 coordinates, etc.

2 Most computer graphics/vision applications use 2D, 3D, or 4 Dsystems. We humans perceive that the world we live in can be described by 3D affine coordinate system also has a unique point, called the origin, in which all coordinatevalues are zero. A point in the space is referenced by denoting the set of coordinates in thesystem being used. For example, the origin in a 3D space isO=()000,,For the rest of these notes, the number of dimensions, if important, will be stated or can bededuced from the context. Different systems can be used to denote points in the space and theorigins need not coincide. A Vector is a direction in space defined as direction of the lineconnecting one point with another. If the beginning point is the origin, it is useful to associate apoint P with the Vector P that points from the origin to add. One consequence is that a group of vectors calculated from a sequence of pointssum to the Vector from the first to the last points: PMMMMOPP PPPOP=+ ++= 1121 LIt is convenient to represent a Vector as a linear combination of a basis set of vectors PkkkNN=+ ++112 2vvvLThe most frequently used basis sets are made of orthonormal vectors.

3 That means that the basisvectors are orthogonal and normalized the length of each Vector is unity (one). In thefamiliar cartesian coordinate system, these are just the unit vectors along each axes: ,, , ,, , ,,xyz=()=()=()OOO10 00100 01 Note the use of the caret above a Vector to indicate that it is normalized. Then the point P and itsassociated Vector P can both be expressed in terms of the point s coordinates 1994-97 Norman WittelsVersion 1 Introductory Vector CalculusPxyzxyz=()=(),, , , , PxyzWhen using the cartesian coordinate system, some authors use a mixed notation in which thelinear sum of the unit vectors is implied by the coefficients (the coordinates)P=()xyz,,Be sure you understand the notation whenever you are reading a document in which both pointsand vectors occur. These notes will provide will explore how to solve geometry problems using vectors. You may wonder why we don tsimply use analytical geometry. One reason is that most of the equations of analytical geometryrequire careful attention to special cases.

4 For example, the slope-intercept form of a line in 2 Dyy mx=+0does not work for vertical lines in which x is constant and the slope infinite. Vector forms oflines, however, work for all orientations without special cases. Thus it is easier to writealgorithms that perform geometrical calculations using vectors instead of analytical Vector equations are general (independent of coordinate system), we will use cartesiancoordinates for the rest of these notes because they are most generally used in algorithms thatimplement Vector calculations. From the way vectors were associated with points above, we cansee that linearity appliesPP=() =()xyzwkkxkykzkw,,,, , ,(1a)PPPP111 2 221 2 1 21 2== +=++(, ),( , )(,)x yx yabaxbx ayby(1b)Note, as a consequence of Equation (1a), a Vector still points in the same direction when it ismultiplied by a positive constant; it points in the opposite direction when the multiplicativeconstant is Scalar ProductThere are two products of vectors that are useful in solving geometric problems.

5 One of them, isthe scalar product, combines two vectors, of the same arbitrary dimension, to produce a PP1111 2 222 12121212== =++(,,),( , , )xyzx yzxx yy zz(2)Because of the notation used, the scalar product is also known as the dot product. The number ofterms in Equation (2) is adjusted to match the number of dimensions in the space. This equationalso shows how to calculate the magnitude of a Vector , which corresponds to the cartesiandistance between any two points whose separation is described by the vectorPPPP= = =+++(,,, )xyzwxyzw222 2(3a) 1994-97 Norman WittelsVersion 2 Introductory Vector CalculusNote that the Vector part of Equation (3a) is general it applies to vectors with any number ofdimensionsPPP= (3b)We can use this last result to normalize a Vector . PPPPPP== (3c)From Equation (3a), it can be shown that the dot product is commutative and distributive withrespect to additionPP P P12 21 = ,(4a)PPP PPPP123 1213 +()= + (4b)In the right side of Equation (4b), the associativity is implied: the dot products must be done firstsince there is no triple dot product the dot product is a binary operation and a scalar cannot bedotted with a Vector .

6 To help develop a geometric interpretation of the dot product, consider the 2D Vector diagramsshown in Figure 1. xyV1V2V1V2xy 1 2 Figure 1. Equivalent 2D Vector this Figure shows the vectors V1 and V2 lying in the first quadrant and generallypointing out from the origin, our analysis will work for vectors of arbitrary location andorientation. In the calculation we will use the angle = 21 between the directions of V1 andV2. Since the vectors are pure directions, we can place them tail to tail, move the tails to theorigin, and normalize them without changing the value of . The coordinates of the pointscorresponding to the two vectors are:VVV V11 1 1 2 22 2=()=()cos ,sin,cos ,sin 1994-97 Norman WittelsVersion 3 Introductory Vector CalculusThusV V V VV VVVVV1 21 21 212121212 =+=+()=,,,,cos cossinsincosxxyy (5)If the vectors are normalized, the dot product is just the perpendicular projection of each onto theother.

7 The expression Equation (5) is even with respect to the angle , as it must be for the dotproduct to be commutative. Thus the dot product is useful for calculating the magnitude of theangle between vectors, but not the 1 Calculate the angle that the Vector V=( , ) makes with the x we apply Equation (5) directly, we obtain. = = = cos 6 VxVxThis answer implies that V points to the upper left (x negative, y positive) whereas it actuallypoints to the lower left (both x and y negative). The problem is that cos is an even function sothere is no way to deduce that the correct answer is . A better way to solve this type ofproblem is to calculate the inverse tangent using projections on both the x and y axes, Figure 2. xyV V x V yFigure 2. Projections of a Vector on to two coordinate this Figure, it can be seen that the angle is = = = tan 4 VyVxThis answer is equivalent to . Note that any algorithm to calculate the angle should use afour-quadrant inverse tangent function, such as atan2() in the standard C library package1.

8 _____1 PJ Plauger, The Standard C Library (1992, Prentice Hall, Englewood Cliffs NJ). 1994-97 Norman WittelsVersion 4 Introductory Vector CalculusEquation (5) shows that the dot product of orthogonal vectors is zero. This makes it natural toconsider using the dot product whenever orthogonality needs to be proven or 2 Find a Vector orthogonal to the Vector V=( , ).We expect that the answer will not be unique because there are two opposite directionsorthogonal to the direction of V and because there is an infinity of vectors pointing in these twodirections but differing in the unknown Vector be U=(x,y). Then the values x and y have to satisfy the relationshipUV = =xy20(6a)There are, indeed, infinitely many vectors that satisfy Equation (6a): (1, ), ( 1, ), (10, 5),( 2 , ), etc. Note that the first two have the same magnitude but point in opposite can restrict the range of acceptable answers by appending other conditions. For example, ifwe require that U be a unit Vector ,UU = + =xy221(6b)then the solution to Equations (6a) and (6b) becomesy21525152515= = = UU,,,(6c)The remaining directional ambiguity cannot be resolved without imposing further you are used to doing degrees-of-freedom analysis on systems of equations, note that Equation(6a) only imposes a single constraint because it is only one equation unlike other vectorexpressions such as Equation (1b), which really represents two equations (in a 2D space).

9 Again,it is important to keep track of how many equations are embedded in each Vector line has infinite extent and infinitesimal width. There are two ways that lines are specified invector algebra, Figure 3. 1994-97 Norman WittelsVersion 5 Introductory Vector Calculus xyzDDPP0t<0t=0t=1t>1xyzPP1P2t<0t=0t=1t>1 Figure 3. Two ways to define a the first definition, a point P is specified by a point P0 on the line and direction Vector Dwhose magnitude is non-zero. It may be easier to visualize what is happening if the tail of thedirection Vector is moved to the point P0 as shown. Then the equation of the point P isPP D0=+t(7a)There are infinitely many points P which lie on the line and each has a unique value of t. Asshown in the Figure, t=0 describes the point P0, t<0 describes points in the direction opposite Dfrom point P0, and t>0 describes points in the direction of D from point second definition of a line is the same as the first except that two points are used to definethe line and the direction Vector is calculated as the difference between themPP P PP P=+ ()= ()+121121ttt(7b)_____Example 3 Find the intersection of the line passing through (1,1,1) in the ( 1, 1,1) direction with the Equation (7a), the equation of the line isP=()+ ()= +()1111 11111,,, ,,,tttt(8)Notice that we have three equations in one unknown, t.

10 To find its value we use the fact that theintersection point must lie in the xy plane, where its z value is zero. Setting the z portion ofEquation (8) to zero yields the 1 220+== =()tt P,,,The final step was to turn the Vector P back into the point P. This is another example of anotation that requires care to prevent the last example we used the fact that we already knew one of the coordinates of the 1994-97 Norman WittelsVersion 6 Introductory Vector Calculusintersection point to decide which of the three equations in Equation (8) to solve. One usuallydoes not have this kind of knowledge and it is necessary to solve all of the Vector equations tofind a 4 The Vector V connects the point (1,1) with the point P. The length of V is 20 and it is perpen-dicular to the Vector D = ( 1, 2). What are the coordinates of P ?We first need to find V and then we can add it to (1,1) to find P. We know two equations for VVDVV = =020xy(9a)VVV22220=+=xy(9b)Solving these two equations simultaneously provides two values for V and two values for ()= () = ()= ()424 2335 1,,,,,,Again, we have two solutions because there are two vectors orthogonal to D.


Related search queries