13472J/1.128J/2158J/16940J COMPUTATIONAL GEOMETRY Lecture 2 Kwanghee Ko T Maekawa N.M. Patrikalakis Massachusetts Institute of Technology Cambridge, MA 02139-4307, USA Copyright 2003 Massachusetts Institute of Technology Contents 2 Differential geometry of curves 2.1 Definition of curves 2 2.1.1 Plane curves 2.1.2 Space curves 4 2.2 Arc length 2.3 Tangent vector 2.4 Normal vector and curvature 2.5 Binormal vector and torsion 12 2.6 Serret-Frenet Bibliography Reading in the Textbook 3 Chapter 2, pp 36- pp 48
13.472J/1.128J/2.158J/16.940J COMPUTATIONAL GEOMETRY Lecture 2 Kwanghee Ko T. Maekawa N. M. Patrikalakis Massachusetts Institute of Technology Cambridge, MA 02139-4307, USA Copyright c 2003 Massachusetts Institute of Technology Contents 2 Differential geometry of curves 2 2.1 Definition of curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.1.1 Plane curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.1.2 Space curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.2 Arc length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.3 Tangent vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.4 Normal vector and curvature . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.5 Binormal vector and torsion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.6 Serret-Frenet Formulae . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Bibliography 16 Reading in the Textbook • Chapter 1, pp.1 - pp.3 • Chapter 2, pp.36 - pp.48 1
Lecture 2 Differential geometry of curves 2.1 Definition of curves 2.1.1 Plane curves Implicit curves f(, y)=0 Example:x2+y2=a2 It is difficult to trace implicit curves It is easy to check if a point lies on the curve Multi-valued and closed curves can be represented It is easy to evaluate tangent line to the curve when the curve has a vertical or near vertical tangent Axis dependent(Difficult to transform to another coordinate system) Example:x3+y=3xy: Folium of Descartes(see Figure 2.1a) Let f(e, y= +y-3.ry=0, f(0,0)=0=(a, y)=(0, 0) lies on the curve Example: If we translate by(1, 2)and rotate the axes by 0=atan(3), the hyperbola x-5=l, shown in Figure 2. 1(b), will become 2x--72ry+23y-+140.T-20y+50=0 Explicit curves y= f(a) One of the variables is expressed in terms of the other It is easy to trace explicit curves It is easy to check if a point lies on the curve Multi-valued and closed curves can not be easily represented It is difficult to evaluate tangent line to the curve when the curve has a vertical or near vertical tangent
Lecture 2 Differential geometry of curves 2.1 Definition of curves 2.1.1 Plane curves • Implicit curves f(x, y) = 0 Example: x 2 + y 2 = a 2 – It is difficult to trace implicit curves. – It is easy to check if a point lies on the curve. – Multi-valued and closed curves can be represented. – It is easy to evaluate tangent line to the curve when the curve has a vertical or near vertical tangent. – Axis dependent. (Difficult to transform to another coordinate system). Example: x 3 + y 3 = 3xy : Folium of Descartes (see Figure 2.1a) Let f(x, y) = x 3 + y 3 − 3xy = 0, f(0, 0) = 0 ⇒ (x, y) = (0, 0) lies on the curve Example: If we translate by (1,2) and rotate the axes by θ = atan( 3 4 ), the hyperbola x 2 4 − y 2 2 = 1, shown in Figure 2.1(b), will become 2x 2 −72xy+23y 2 +140x−20y+50 = 0. • Explicit curves y = f(x) One of the variables is expressed in terms of the other. Example: y = x 2 – It is easy to trace explicit curves. – It is easy to check if a point lies on the curve. – Multi-valued and closed curves can not be easily represented. – It is difficult to evaluate tangent line to the curve when the curve has a vertical or near vertical tangent. 2
asymptote line Figure 2.1:(a) Descartes;(b)Hyperbola Axis dependent. ( Difficult to transform to another coordinate system) Example: If the circle is represented by an explicit equation, it must be divided into two segments, with y=+Vr2-x2 for the upper half and y=-Vr2-a2 for the low half, see Figure 2.2. This kind of segmentation creates cases which are inconvenient in computer programming and graphics Figure 2.2: Description of a circle with an explicit equation Note: The derivative of y=va at the origin a =0 is infinite, see Figure 2.3 · Parametric curves x=x(t),y=y(t),t1≤t≤t 2D coordinates (, y) can be expressed as functions of a parameter t Example: a= a cos(t) sin(t),0≤t<2r
-3 -2 -1 0 1 2 -3 -2 -1 0 1 2 X Y asymptote line x+y+1=0 multi-valued -3 -2 -1 0 1 2 3 -2 -1 0 1 2 3 4 X Y Figure 2.1: (a) Descartes; (b) Hyperbola. – Axis dependent. (Difficult to transform to another coordinate system). Example: If the circle is represented by an explicit equation, it must be divided into two segments, with y = + √ r 2 − x 2 for the upper half and y = − √ r 2 − x 2 for the lower half, see Figure 2.2. This kind of segmentation creates cases which are inconvenient in computer programming and graphics. y = + r − x 2 2 y = − r − x 2 2 x y o Figure 2.2: Description of a circle with an explicit equation. Note: The derivative of y = √ x at the origin x = 0 is infinite, see Figure 2.3. • Parametric curves x = x(t), y = y(t), t1 ≤ t ≤ t2 2D coordinates (x, y) can be expressed as functions of a parameter t. Example: x = a cos(t), y = a sin(t), 0 ≤ t < 2π 3
S→ 0,y′ Figure 2.3: Vertical slopes for explicit curves involve non-polynomial functions It is easy to trace parametric curves It is relatively difficult to check if a point lies on the curve Closed and multi-valued curves are eas It is easy to evaluate tangent line to the curve when the curve has a vertical or near Axis independent.(Easy to transform to another coordinate system) Example: Folium of Descartes, see Figure 2.1, can be expressed as r(t) ∞ 0) =(t2,t), unit tangent vector t att=0,t=(0,1) Therefore there is no problem representing a vertical tangent computationally 2.1.2 Space curves In 3D, a single equation generally represents a surface. For example x2+y2+22
y x y = √ x; y 0 = 1/2 √ x; as x → 0, y 0 → ∞ Figure 2.3: Vertical slopes for explicit curves involve non-polynomial functions. – It is easy to trace parametric curves. – It is relatively difficult to check if a point lies on the curve. – Closed and multi-valued curves are easy to represent. – It is easy to evaluate tangent line to the curve when the curve has a vertical or near vertical tangent. – Axis independent. (Easy to transform to another coordinate system) Example: Folium of Descartes, see Figure 2.1, can be expressed as: r(t) = 3t 1+t 3 , 3t 2 1+t 3 − ∞ < t < ∞ ⇒ easy to trace x(t) = x0 ⇒ solve for t ⇒ plug t into y(t) = y0 ⇒ need to solve a nonlinear equation to check if a point lies on the curve. Explicit curve y = √ x can be expressed as x = t 2 , y = t (t ≥ 0). r = (t 2 ,t), r˙ = (2t, 1) unit tangent vector t = (2t, 1) √ 4t 2 + 1 at t = 0, t = (0, 1) Therefore there is no problem representing a vertical tangent computationally. 2.1.2 Space curves • Implicit curves In 3D, a single equation generally represents a surface. For example x 2 + y 2 + z 2 = a 2 is a sphere. 4
Thus, the curve appears as the intersection of two surfaces F(x,y,2)=0∩G(x,y,2)=0 Example: Intersection of the two quadric surfaces z ay and y2= za gives cubic parabola. (These two surfaces intersect not only along the cubic parabola but also along the a-axis. · Explicit curves If the implicit equations can be solved for two of the variables in terms of the third, say for y and z in terms of a, we get y=y( ) z= a(ar) Each of the equations separately represents a cylinder projecting the curve onto one of the coordinate planes. Therefore intersection of the two cylinders represents the curve. Example: Intersection of the two cylinders y=x2, x=x gives a cubic parabola · Parametric curves x=x(t),y=y(t),z=z(t),t1≤t≤t The 3D coordinates (a, y, a) of the point can be expressed on functions of parameter t Here functions a(t), y(t), a(t) have continuous derivatives of the rth order, and the parameter t is restricted to some interval called the parameter space(i.e, tistst2 In this case the curve is said to be of class r, denoted as cr n vector notation where r=(a, y, a), r(t)=(a(t),y(t),a(t)) Example: Cubic parabola Example: Circular helix, see Fig. 2.4 x三aCos (t), y=asin(t),a Using v=tan 2 COS cos t 1+ cos t →COst1- Therefore the following parametrization will give the same circular helix r=a 1+v21+,2btam-1 0≤<∞
Thus, the curve appears as the intersection of two surfaces. F(x, y, z) = 0 ∩ G(x, y, z) = 0 Example: Intersection of the two quadric surfaces z = xy and y 2 = zx gives cubic parabola. (These two surfaces intersect not only along the cubic parabola but also along the x-axis.) • Explicit curves If the implicit equations can be solved for two of the variables in terms of the third, say for y and z in terms of x, we get y = y(x), z = z(x) Each of the equations separately represents a cylinder projecting the curve onto one of the coordinate planes. Therefore intersection of the two cylinders represents the curve. Example: Intersection of the two cylinders y = x 2 , z = x 3 gives a cubic parabola. • Parametric curves x = x(t), y = y(t), z = z(t), t1 ≤ t ≤ t2 The 3D coordinates (x, y, z) of the point can be expressed on functions of parameter t. Here functions x(t), y(t), z(t) have continuous derivatives of the rth order, and the parameter t is restricted to some interval called the parameter space (i.e., t1 ≤ t ≤ t2). In this case the curve is said to be of class r, denoted as C r . In vector notation: r = r(t) where r = (x, y, z), r(t) = (x(t), y(t), z(t)) Example: Cubic parabola x = t, y = t 2 , z = t 3 Example: Circular helix, see Fig. 2.4. x = a cos(t), y = a sin(t), z = bt, 0 ≤ t ≤ π Using v = tan t 2 v = tan t 2 = s 1 − cost 1 + cost ⇒ v 2 = 1 − cost 1 + cost ⇒ cost = 1 − v 2 1 + v 2 ⇒ sin t = 2v 1 + v 2 Therefore the following parametrization will give the same circular helix. r = a 1 − v 2 1 + v 2 , 2av 1 + v 2 , 2btan−1 v ! , 0 ≤ v < ∞ 5
>>a=2; b=3 >>u=[0:6*pi/100:6*p >>plot(a* cos(u), a sin(u), b*u >> xlabel(X”); >> ylabel(Y”); > zlabel(z) >> print('circHelix ps) Figure 2.4: Circular helix plotted using MATLAB
>> ylabel(’Y’); >> zlabel(’Z’); >> print(’circHelix.ps’) >> plot3(a * cos(u), a * sin(u), b * u) >> xlabel(’X’); >> >> a= 2; >> b = 3; >> u = [0 : 6 * pi / 100 : 6 * pi]; −2 −1 0 1 2 −2 −1 0 1 2 0 10 20 30 40 50 60 X Y Z Figure 2.4: Circular helix plotted using MATLAB. 6
△r q igure 2.5: A segment Ar connecting two point p and q on a parametric curver(t) 2.2 Arc length From Figure 2.5, we will derive an expression for the differential arc length ds of a parametric curve. First, let us express the vector Ar connecting two points p and q on an arc at parametric locations t and t+ At, respectively, as △r=p-q=r(t+△t)-r(t) p and q become infinitesimally close, the length of the segment connecting the two points approaches the arc length between the two points along the curve, r(t) andr(t+At). Or using Taylor's expansion on the norm(length)of the segment Ar and letting At-0, we can express the differential arc length as s~|△r|=r(t+△t)-r(t)=|△t+O(△2) Thus as△t→0 dt r DEfiniti d dt d Hence the rate of change at of the arc length s with respect to the parameter t is 2(t)+2(t)+22(t) (21)
y z r(t) p q r(t + ∆t) ∆r x Figure 2.5: A segment ∆r connecting two point p and q on a parametric curve r(t). 2.2 Arc length From Figure 2.5, we will derive an expression for the differential arc length ds of a parametric curve. First, let us express the vector ∆r connecting two points p and q on an arc at parametric locations t and t + ∆t, respectively, as ∆r = p − q = r(t + ∆t) − r(t). As p and q become infinitesimally close, the length of the segment connecting the two points approaches the arc length between the two points along the curve, r(t) and r(t+ ∆t). Or using Taylor’s expansion on the norm (length) of the segment ∆r and letting ∆t → 0, we can express the differential arc length as ∆s ' |∆r| = |r(t + ∆t) − r(t)| = | dr dt ∆t + O(∆t 2 )| ' | dr dt|∆t. Thus as ∆t → 0 ds = | dr dt|dt = |r˙|dt. Definitions d dt ≡ ˙ d ds ≡ 0 Hence the rate of change ds dt of the arc length s with respect to the parameter t is ds dt = q x˙ 2 (t) + y˙ 2 (t) + z˙ 2 (t) (2.1) 7
at is called the parametric speed. It is, by definition, non-negative(s being measured always the sense of increasing t) If the parametric speed does not vary significantly, parameter values to, t1, . tN corre- sponding to a uniform increment At= tk-tk-l, will be evenly distributed along the curve, as illustrated in Figure 2.6 罡 Parameter space Figure 2.6: When parametric speed does not vary, parameter values are uniformly spaced alon a parametric curve. The arc length of a segment of the curve between points r(to) and r(t)can be obtained as follows s(t)= (t)+y2(t)+22(t)dt Derivatives of arc length s w.r. t. parameter t and vice versa r|= 一此dddd (r·r)(i r (·r)2 (·P+r,r)(r)-4(·i)2 )2 (28 2.3 Tangent vector The vector r(t+At)-rt)indicates the direction from r(t)tor(t+At). If we divide the vector by At and take the limit as At -0, then the vector will converge to the finite magnitude vector r(t) r(t) is called the tangent vector. Magnitude of the tangent vector r dt
ds dt is called the parametric speed. It is, by definition, non-negative (s being measured always in the sense of increasing t). If the parametric speed does not vary significantly, parameter values t0,t1, · · · ,tN corresponding to a uniform increment ∆t = tk − tk−1, will be evenly distributed along the curve, as illustrated in Figure 2.6. Parameter Space t0 t1 t2 t3 t4 t5 t0 t1 t2 t3 t4 t5 x y t ds dt Figure 2.6: When parametric speed does not vary, parameter values are uniformly spaced along a parametric curve. The arc length of a segment of the curve between points r(to) and r(t) can be obtained as follows: s(t) = Z t to q x˙ 2 (t) + y˙ 2 (t) + z˙ 2 (t)dt = Z t to √ r˙ · r˙dt (2.2) Derivatives of arc length s w.r.t. parameter t and vice versa : s˙ = ds dt = |r˙| = √ r˙ · r˙ (2.3) s¨ = ds˙ dt = r˙ · ¨r √ r˙ · r˙ (2.4) ··· s = ds¨ dt = (r˙ · r˙)(r˙· ··· r +¨r · ¨r) − (r˙ · ¨r) 2 (r˙ · r˙) 3 2 (2.5) t 0 = dt ds = 1 |r˙| = 1 √ r˙ · r˙ (2.6) t 00 = dt0 ds = − r˙ · ¨r (r˙ · r˙) 2 (2.7) t 000 = dt00 ds = − (¨r · ¨r + r˙· ··· r)(r˙ · r˙) − 4(r˙ · ¨r) 2 (r˙ · r˙) 7 2 (2.8) 2.3 Tangent vector The vector r(t+∆t)−r(t) indicates the direction from r(t) to r(t+∆t). If we divide the vector by ∆t and take the limit as ∆t → 0, then the vector will converge to the finite magnitude vector r˙(t). r˙(t) is called the tangent vector. Magnitude of the tangent vector |r˙| = ds dt (2.9) 8
Unit tangent vector dr Definition: A parametric curve is said to be regular if r(t)l+0 for all teI. The points ere r(t)l=0 are called irregular(singular) points Note that at irregular points the parametric speed is zero Example: semi-cubical parabola r(t)=(t t), see Figure 2.7 r() 42+9=yt2(4+92) when t=0,r(t)=0 t>0 0 t<0 Figure 2.7: A singular point occurs on a semi-cubical parabola in the form of a cusp Here are some useful formulae for computing the unit tangent vector 3D Parametric curve r(t) dr dr dt (立 dt ds r 2D Implicit curve f(a, y)=0 2+f
Unit tangent vector t = r˙ |r˙| = dr dt ds dt = dr ds ≡ r 0 (2.10) Definition : A parametric curve is said to be regular if |r˙(t)| 6= 0 for all t ∈ I. The points where |r˙(t)| = 0 are called irregular (singular) points. Note that at irregular points the parametric speed is zero. Example: semi-cubical parabola r(t) = (t 2 ,t 3 ), see Figure 2.7 r˙(t) = (2t, 3t 2 ) |r˙(t)| = p 4t 2 + 9t 4 = q t 2(4 + 9t 2) when t = 0, |r˙(t)| = 0 t>0 t<0 x y 0 Figure 2.7: A singular point occurs on a semi-cubical parabola in the form of a cusp. Here are some useful formulae for computing the unit tangent vector: • 3D Parametric curve r(t) t = r 0 = dr ds = dr dt dt ds = r˙ |r˙| = (x,˙ y˙, z˙) p x˙ 2 + y˙ 2 + z˙ 2 • 2D Implicit curve f(x, y) = 0 t = (fy, −fx) q f 2 x + f 2 y 9
2D Explicit curve y= f(a) f2 Example: For a circular helix r(t)=(acost, a sint, bt) Parametric speed 4=|)=V2()+2()+2() r(t=(asin, a cost, b r() √a2+b2=c= const→ The curve is regular and ha ood parametrization Unit tangent vector sin t · Arc length s(t)=/ rldt=/va2+bdt=ct Arc length parametrization (a cos - asin -bs (214) check (215) COS (216) 2.4 Normal vector and curvature Let us consider the second derivative r"(s), see Figure 2.8 (s) r(s+△s)-r'(s) △s→0 As As-0r'(s+As)-r(s) becomes perpendicular to the tangent vector i.e. normal direction Also r(s+△s)-r(s)=△.1=△6as△s→0. Thus
• 2D Explicit curve y = f(x) t = (1, ˙f) q 1 + ˙f 2 Example: For a circular helix r(t) = (a cost, a sin t, bt) • Parametric speed ds dt = |r˙(t)| = q x˙ 2(t) + y˙ 2(t) + z˙ 2(t) r˙(t) = (−a sin t, a cost, b) |r˙(t)| = p a 2 + b 2 = c = const ⇒ ( The curve is regular and has good parametrization • Unit tangent vector t = r˙ |r˙| = (− a c sin t, a c cost, b c ) (2.11) • Arc length s(t) = Z t 0 |r˙|dt = Z t 0 p a 2 + b 2dt = ct (2.12) • Arc length parametrization t = s c (2.13) r(s) = (a cos s c , a sin s c , bs c ) (2.14) check (2.15) dr ds = (− a c sin s c , a c cos s c , b c ) = t (2.16) 2.4 Normal vector and curvature Let us consider the second derivative r 00(s), see Figure 2.8. r 00(s) = lim ∆s→0 r 0 (s + ∆s) − r 0 (s) ∆s (2.17) As ∆s → 0 r 0 (s + ∆s) − r 0 (s) becomes perpendicular to the tangent vector i.e. normal direction. Also |r 0 (s + ∆s) − r 0 (s)| = ∆θ · 1 = ∆θ as ∆s → 0. Thus |r 00(s)| = lim ∆s→0 ∆θ ∆s = lim ∆s→0 ∆θ ρ ∆θ = 1 ρ ≡ κ (2.18) 10