{VERSION 4 0 "IBM INTEL NT" "4.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 256 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 257 "" 1 24 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Helvetica" 1 11 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "R3 Font 0" -1 256 1 {CSTYLE "" -1 -1 " Times" 1 11 255 255 255 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "R3 Font 2" -1 257 1 {CSTYLE "" -1 -1 "Courier" 1 10 255 255 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 257 18 "Geometry o f Curves" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 130 "This worksheet conta ins some basic applications of MAPLE to the differential geometry of c urves. A general reference is J. Oprea, " }{TEXT 256 42 "Differential \+ Geometry and its Applications" }{TEXT -1 197 ". In particular, there a re procedures for computing the curvature and torsion of curves. The f irst set of procedures are for dot product, the length (or norm) of a \+ vector and for the cross product." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "dp := proc(X,Y) " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 33 " X[1]*Y[1]+X[2]*Y[2]+X[3]*Y[3]; " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "end:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "nrm := proc(X) " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 17 " sqrt(dp(X,X)); " }}{PARA 0 " > " 0 "" {MPLTEXT 1 0 4 "end:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "xp := proc(X,Y)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 14 " local a, b,c;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 27 " a := X[2]*Y[3]-X[3]*Y[2]; " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 27 " b := X[3]*Y[1]-X[1]*Y[3];" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 " c := X[1]*Y[2]-X[2]*Y[1];" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 " [a,b,c];" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "end:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 221 "These pr ocedures compute curvature and torsion. These functions assume that th e curve is given parametrically in three coordinates. If the curve is \+ a plane curve in the xy-plane, say, then make the third coordinate zer o. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "curv:=proc(alpha)" } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 24 " local alphap,alphapp;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 24 " alphap:=diff(alpha,t);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 26 " alphapp:=diff(alphap,t);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 73 " RETURN(kappa=simplify(nrm(xp(alphap,alphapp))/nrm(a lphap)^3,symbolic));" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "end:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "tor:= proc(alpha)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 33 " local alphap,alphapp,alphappp;" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 " alphap:=diff(alpha,t);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 26 " alphapp:=diff(alphap,t);" }}{PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 28 " alphappp:=diff(alphapp,t);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 91 " RETURN(tau=simplify(dp(xp(alphap,alphapp),alph appp)/nrm(xp(alphap,alphapp))^2,symbolic));" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "end:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 32 "Here's an example. Take a helix." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 " hel:=[a*cos(t),a*sin(t),b*t];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "curv(hel);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "tor(hel) ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "hel1:=subs(\{a=4,b=2\} ,hel);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "curv(hel1);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "tor(hel1);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 80 "Before special types of plots can be made, the \+ following command must be issued." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(plots):" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 73 " The following plot command graphs the helix in 3-space and colors it r ed." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 70 "spacecurve(hel1,t=0. .10*Pi,scaling=constrained,thickness=3,color=red);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 73 "To plot plane curves, we can use the plot command . For example, take the " }}{PARA 0 "" 0 "" {TEXT -1 16 "witch of Agne si." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "witch:=[2*tan(t),2*c os(t)^2,0];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "curv(witch); " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 73 "You cannot say plot(witch ... ) since you've used three coordinates here. " }}{PARA 0 "" 0 "" {TEXT -1 27 "You must say (in THIS form)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 82 "plot([2*tan(t),2*cos(t)^2,t=-1.3..1.3],scaling=constr ained,axes=framed,color=red);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 56 " or use the first two coordinates of the witch as follows" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 80 "plot([witch[1],witch[2],t=-1.3..1.3],scaling= constrained,axes=framed,color=red);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 373 "Notice that the square brackets must go around the t=... as we ll as the parametrization. Try using options like `constrained` or `co lor` or `axes` or `thickness`. It is a basic theorem that a plane curv e may be recreated from its curvature alone. While the formula involve s integrals which can only rarely be solved, we can still plot the re sulting curve. Given curvature " }{XPPEDIT 18 0 "kappa;" "6#%&kappaG" }{TEXT -1 16 ", the formula is" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 62 "beta(s)=[Int(cos(theta(u)),u=0..s),Int(sin(theta(u)),u=0..s)]; " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 5 "where" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "theta(u)=Int(kappa(t),t=0..u);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 239 "By the Fundamental Theorem of Calculus, we can transform these integrals into a system of differential equations to \+ be solved numerically and plotted. The result will be the unit speed c urve with the specified curvature. First, let's take " }{XPPEDIT 18 0 "kappa = s;" "6#/%&kappaG%\"sG" }{TEXT -1 9 " itself." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 82 "sys:=diff(theta(s),s)=s, diff(b1(s) ,s)=cos(theta(s)), diff(b2(s),s)=sin(theta(s));" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 80 "p:=dsolve(\{sys,theta(0)=0,b1(0)=0,b2(0)=0\}, \{theta(s),b1(s),b2(s)\},type=numeric):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "test:=odeplot(p,[b1(s),b2(s)],-5..5,numpoints=200):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "display(test,view=[-2..2, -2..2]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 47 "As a second example, \+ take curvature=1/(1+s^2). " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 90 "sys:=diff(theta(s),s)=1/(1+s^2), diff(b1(s),s)=cos(theta(s)), diff (b2(s),s)=sin(theta(s));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 80 "p:=dsolve(\{sys,theta(0)=0,b1(0)=0,b2(0)=0\},\{theta(s),b1(s),b2(s)\} ,type=numeric):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 65 "odeplot( p,[b1(s),b2(s)],-8..8,numpoints=200,scaling=constrained);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 37 "What is this curve? Can you prove it?" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 175 "Now let' s write a procedure to take an input curvature and output the curve. O ther inputs give a bound on the curves parameter(a,b) and bounds on th e viewing region (c,d,f,g)." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "recreate:=proc(kap,a,b,c,d,f,g)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 30 " local sys,b1,b2,p,theta,pl;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 90 " sys:=diff(theta(s),s)=kap(s), diff(b1(s),s)=cos(theta(s)), diff (b2(s),s)=sin(theta(s));" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 84 " p:=d solve(\{sys,theta(0)=0,b1(0)=0,b2(0)=0\},\{theta(s),b1(s),b2(s)\},type =numeric): " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 86 " pl:=odeplot(p,[b1 (s),b2(s)],a..b,numpoints=400,thickness=1,axes=framed, color=red):" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 53 " display(pl,view=[c..d,f..g],scal ing=constrained); " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "end:" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 156 "To specify a curvature function, \+ give the parameter (t say) and use the hyphen and greater than sign to construct an arrow -> to the effect on t. Try these." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "kap1:=t->t;" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 13 "kap2:=t->t^2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "kap3:=t->exp(t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "kap4:=t->sin(t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "kap5:=t->sin(t)*t;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "kap6:=t->sin(t)*t^2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "kap7:=t->1/(1+t^2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "recreate(kap5,-8,8,-2,2,0,3);" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 32 "recreate(kap7,-10,10,-4,4,0,10);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 366 "We can also recreate curves in space fro m their curvature and torsion via the Frenet (differential) equations. The following procedure solves the nine Frenet equations together wit h the three equations defining the unit tangent vector of the curve an d allows you to zoom in by defining a viewing region. The inputs c,d,e ,f,g,h give ranges for x,y and z respectively." }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 44 "recreate3dview:=proc(kap,ta,a,b,c,d,e,f,g,h)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 63 " local sys,p,alph1,alph2,alph3, T1,T2,T3,N1,N2,N3,B1,B2,B3,pl;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 77 " \+ sys:=diff(alph1(s),s)=T1(s),diff(alph2(s),s)=T2(s),diff(alph3(s),s)= T3(s)," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 64 " diff(T1(s),s)=kap (s)*N1(s), diff(T2(s),s)=kap(s)*N2(s), " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 77 " diff(T3(s),s)=kap(s)*N3(s),diff(N1(s),s)=-kap(s)*T1(s) +ta(s)*B1(s), " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 88 " diff(N2( s),s)=-kap(s)*T2(s)+ta(s)*B2(s),diff(N3(s),s)=-kap(s)*T3(s)+ta(s)*B3(s )," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 65 " diff(B1(s),s)=-ta(s)* N1(s), diff(B2(s),s)=-ta(s)*N2(s), " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 47 " diff(B3(s),s)=-ta(s)*N3(s); print(sys);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 77 " p:=dsolve(\{sys, alph1(0)=0,alph2(0)=0,alph3( 0)=0,T1(0)=1,T2(0)=0,T3(0)=0, " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 59 " \+ N1(0)=0,N2(0)=1,N3(0)=0,B1(0)=0,B2(0)=0,B3(0)=1\}," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 74 " \{alph1(s),alph2(s),alph3(s),T1 (s),T2(s),T3(s),N1(s),N2(s),N3(s)," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 45 " B1(s),B2(s),B3(s)\},type=numeric): " }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 77 " pl:=odeplot(p,[alph1(s),alph2(s),alph3(s)],a..b, numpoints=200,thickness=1," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 37 " \+ axes=framed, color=red):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 58 " display(pl,scaling=constrained,view=[c..d,e..f,g..h]); " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "end:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 48 "Here are some examples. What is the first curve?" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "recreate3dview(1/5,1/10,0,200,0,25,0,20,0 ,40);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "kap3d1:=t->t;" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "recreate3dview(kap3d1,1/10,0 ,10,0,2,0,2,0,0.5);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "tau3 d1:=t->t/10;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "recreate3dv iew(kap3d1,tau3d1,0,10,0,2,0,2,0,1);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 47 "Here is the general formula for a hypotrochoid:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 73 "hypogen:=[(a-b)*cos(t)+h*cos((a-b)* t/b),(a-b)*sin(t)-h*sin((a-b)*t/b),0];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "curv(subs(\{a=1,b=1/3,h=2/3\},hypogen));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 163 "As a test of our procedure recreate, let 's use the curvature formula to recreate a hypotrochoid and the Witch \+ and then compare the results to ones drawn directly." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 102 "hypocurv:=t->-3/2*(-7-6*cos(t)+8*c os(t)^3)/((-5+16*cos(t)^3-12*cos(t))*sqrt(5-16*cos(t)^3+12*cos(t))):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 88 "plot([subs(\{a=1,b=1/3,h= 2/3\},hypogen)[1],subs(\{a=1,b=1/3,h=2/3\},hypogen)[2],t=0..2*Pi]);" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "recreate(hypocurv,0,2*Pi,- 1,1,-1.5,0.2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 99 "witchcurv :=t->-(4*cos(t)^2-3)*cos(t)^4/((-4*cos(t)^6-1+4*cos(t)^8)*sqrt(4*cos(t )^6+\n1-4*cos(t)^8));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "re create(witchcurv,-3,3,-1,1,0,0.4);" }}}}{MARK "0 0 1" 18 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }