Rice COMP 360 - Some Applications of Vector Geometry

Unformatted text preview:

Lecture 11: Some Applications of Vector Geometry apply thine heart unto my knowledge. Proverbs 22:181. IntroductionVector geometry and vector algebra are powerful tools for deriving geometric relationships and algebraic identities. In this lecture we shall employ vector methods to derive trigonometric laws, metric expressions, intersection formulas, interpolation techniques, and inside-outside tests that have wide ranging applications in Computer Graphics and Geometric Modeling.2. Trigonometric LawsTrigonometric laws are often required for the analysis of geometry. As early as Lecture 1, we employed the Law of Cosines to compute the length of the radius in a wheel and the lengths of the diagonals in a rosette. Here we shall provide simple derivations of the Law of Cosines and the Law of Sines using dot product and cross product.2.1 Law of Cosines. Consider € ΔABC with corresponding sides € a,b,c (see Figure 1). The Law of Cosines asserts that€ c2= a2+ b2−2 abCos(C). (2.1)The Law of Cosines is a generalization of the Pythagorean Theorem; indeed, when € C =π/ 2, the Law of Cosines is the Pythagorean Theorem, since € Cos(π/ 2) = 0.€ •€ •€ •€ A€ B€ C€ a€ c€ bFigure 1: Law of Cosines: € c2= a2+ b2−2 abCos(C)Whenever you see cosine, think dot product. To derive the Law of Cosines, recall that € c2= | B − A |2= (B − A) • (B − A). (2.2)Since we need to introduce the sides € a,b into the formula for € c2, observe that € B − A = (B − C) + (C − A). (2.3)Now the rest of the derivation is mechanical. Substituting Equation (2.3) into Equation (2.2), expanding by the distributive law, and invoking the definition of the dot product yields€ c2= (A − B) • (A − B) = (B − C) + (C − A)( )• (B − C) + (C − A)( ) = (B − C) • (B −C) + 2(B −C)• (C − A) + (C − A) • (C − A) =| B − C |2−2(B − C) • (A − C)+ | C − A |2 = a2−2 abCos(C) + b22.2 Law of Sines. Consider € ΔABC in Figure 2. The Law of Sines asserts that€ aSin(A)=bSin(B)=cSin(C). (2.4)€ •€ •€ •€ A€ B€ C€ a€ c€ bFigure 2: Law of Sines: € aSin(A)=bSin(B)=cSin(C).Whenever you see sine, think cross product. To derive the Law of Sines, observe that by the definition of the cross product€ 2Area(ΔABC) = (A − B) × (C − B) = c a Sin(B)€ 2Area(ΔABC) = (C − A) × (B − A) = bc Sin(A)€ 2Area(ΔABC) = (B − C) × (A − C) = ab Sin(C).Therefore€ c aSin(B) = bc Sin(A) = ab Sin(C),so€ aSin(A)=bSin(B)=cSin(C).3. Representations for Lines and PlanesWe are going to derive formulas for distances and intersections between simple geometric objects. We shall focus primarily on lines and planes, so a word about representations for lines and planes is in order here before we proceed any further.23.1 Lines. Two points determine a line, but a point and a vector also determine a line (see Figure 3, left). Generally it will be more convenient to represent a line L in terms of a point P on the line and a vector v parallel to the line, since the formulas for distances and intersections are readily represented in terms of dot and cross products, which apply to vectors but not to points. The line L determined by the point P and the vector v can be expressed parametrically by the linear equation€ L(t) = P + t v, (3.1)which is equivalent to the three linear parametric equations for the coordinates€ x(t) = p1+ t v1, € y(t) = p2+ t v2, € z(t) = p3+ t v3.2.2 Planes. There are two convenient ways to represent a plane in 3-dimensions: parametrically and implicitly. Just like a line L can be represented by a point P and a nonzero vector v, a plane S can be represented by a point P and two linearly independent vectors € u,v (see Figure 3, right). The plane S determined by the point P and the vectors € u,v can be expressed parametrically by the linear equation€ S(u,v) = P + s u + t v, (3.2)which is equivalent to the three linear parametric equations for the coordinates€ x(s,t) = p1+ s u1+ t v1, € y(s,t) = p2+ su2+ t v2, € z(s,t) = p3+ su3+ t v3.Alternatively, a plane S can be represented by a point P on S and a vector N normal to S. A point Q lies on the plane S if and only if the vector € Q − P is perpendicular to the normal vector N -- that is, if and only if€ N •(Q − P) = 0. (3.3)Equation (3.3) is called the implicit equation of the plane S. Notice that the implicit equation is also a linear equation. Indeed if € N = (a,b,c),€ Q = (x, y,z), and € N • P = d, then€ N •(Q − P) = 0 ⇔ a x + b y + c z + d = 0. (3.4)Equation (3.4) is called an implicit equation because there are no explicit expressions for the coordinates € x, y,z as there are in the parametric representation. Notice that if we have a parametric representation for the plane S in terms of a point P and two linearly independent vectors € u,v, then we can easily generate an implicit representation, since € N = u ×v is normal to the plane S.€ •€ P€ t v€ •€ L(t) = P + t v€ S€ P€ Q€ N || u× v€ •€ •€ su€ t vFigure 3: A line L determined by a point P and a direction vector v (left). A plane S determined either by a point P and two linearly independent vectors € u,v or by a point P and a normal vector N (right). Notice that € N || u ×v.34. Metric FormulasHere we collect some simple formulas for distance, area, and volume, which will be useful in a variety of future applications.4.1 Distance. We are interested mainly in the distance between points, lines, and planes. Distance is often related to projection and projection is computed using dot product, so distance formulas are typically expressed in terms of dot products.4.1.1 Distance Between Two Points. The distance between two points € P,Q is the same as the length of the vector from P to Q (see Figure 4). Therefore€ Dist2(P,Q) =| Q − P |2= (Q − P)• (Q − P). (4.1)€ •€ •€ Q€ P€ Q − PFigure 4: € Dist2(P,Q) =| Q − P |2= (Q − P)• (Q − P).4.1.2 Distance Between a Point and a Line. Consider a point Q and a line L determined by a point P and a direction vector v (see Figure 5). The distance between the point Q and the line L is the length of the perpendicular component of the vector € Q − P relative to the vector v. Therefore


View Full Document

Rice COMP 360 - Some Applications of Vector Geometry

Documents in this Course
Radiosity

Radiosity

42 pages

Radiosity

Radiosity

22 pages

Load more
Download Some Applications of Vector Geometry
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Some Applications of Vector Geometry and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Some Applications of Vector Geometry 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?