{VERSION 2 3 "IBM INTEL NT" "2.3" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Times" 1 12 255 0 0 1 0 1 0 0 1 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 1 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Maple Output" 0 11 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 0 1 0 0 0 0 0 0 0 }3 3 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 0" -1 256 1 {CSTYLE "" -1 -1 "Times" 1 11 255 255 255 1 2 1 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 2" -1 257 1 {CSTYLE "" -1 -1 "Courier" 1 10 255 255 0 1 2 1 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 94 "This worksheet shows how t o plot geodesics on surfaces. First we need the metric E, F=0 and G." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "with(plots):with(linalg): " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 60 "dp:=proc(X,Y)\nsimplify (X[1]*Y[1]+X[2]*Y[2]+X[3]*Y[3]);\n end:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "EFG := proc(X)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 25 " local E,F,G,Xu,Xv;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 116 " \+ Xu :=[diff(X[1],u),diff(X[2],u),diff(X[3],u)];\n Xv := [diff(X[1],v),diff(X[2],v),diff(X[3],v)];" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 26 " E := dp(Xu,Xu);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 26 " F := dp(Xu,Xv);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 26 " G := dp(Xv,Xv);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 29 " simplify([E,F,G]);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 11 " end:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 165 "EFGconf:=proc(X,g)\n local Xu,Xv,E,F,G;\n X u :=[diff(X[1],u),diff(X[2],u),diff(X[3],u)];\n Xv := [diff( X[1],v),diff(X[2],v),diff(X[3],v)];" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 30 " E := dp(Xu,Xu)/g^2;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 30 " F := dp(Xu,Xv)/g^2;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 39 " G := dp(Xv,Xv)/g^2; " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 29 " simplify([E,F,G]);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 11 " end:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 38 "T he geodesic equations are obtained by" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "geoeq:=proc(X)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 28 " local M,eq1,eq2;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 22 " \+ M:=EFG(X);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 90 " \+ eq1:=diff(u(t),t$2)+subs(\{u=u(t),v=v(t)\},diff(M[1],u)/(2*M[1]))*diff (u(t),t)^2" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 89 " \+ +subs(\{u=u(t),v=v(t)\},diff(M[1],v)/(M[1]))*diff(u(t),t)*diff(v(t),t) " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 85 " - subs(\{ u=u(t),v=v(t)\},diff(M[3],u)/(2*M[1]))*diff(v(t),t)^2=0;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 11 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 90 " eq2:=diff(v(t),t$2)-subs(\{u=u(t),v=v(t)\},diff(M[1] ,v)/(2*M[3]))*diff(u(t),t)^2" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 89 " \+ +subs(\{u=u(t),v=v(t)\},diff(M[3],u)/(M[3]))*diff(u( t),t)*diff(v(t),t)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 85 " \+ + subs(\{u=u(t),v=v(t)\},diff(M[3],v)/(2*M[3]))*diff(v(t),t)^ 2=0;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 20 " eq1,eq2;" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 " end: " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "geoeqconf:=proc(X,g)" }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 28 " local M,eq1,eq2;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 28 " M:=EFGconf(X,g);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 90 " eq1:=diff(u(t),t$2)+subs(\{u=u(t),v=v(t) \},diff(M[1],u)/(2*M[1]))*diff(u(t),t)^2" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 89 " +subs(\{u=u(t),v=v(t)\},diff(M[1 ],v)/(M[1]))*diff(u(t),t)*diff(v(t),t)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 85 " - subs(\{u=u(t),v=v(t)\},diff(M[3],u)/(2 *M[1]))*diff(v(t),t)^2=0;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 11 " \+ " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 90 " eq2:=diff(v(t) ,t$2)-subs(\{u=u(t),v=v(t)\},diff(M[1],v)/(2*M[3]))*diff(u(t),t)^2" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 89 " +subs(\{u=u(t) ,v=v(t)\},diff(M[3],u)/(M[3]))*diff(u(t),t)*diff(v(t),t)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 85 " + subs(\{u=u(t),v=v(t) \},diff(M[3],v)/(2*M[3]))*diff(v(t),t)^2=0;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 20 " eq1,eq2;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 17 " end: " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 487 "The f ollowing procedure plots a geodesic on a surface. The inputs are: X a \+ parametrization in u and v, ustart......vend the range of the paramete rs, u0,v0 the starting point of the geodesic (i.e. initial condition 1 ), Du0,Dv0 the starting speed of the geodesic (i.e. initial condition \+ 2), n=[a,b,c] where a,b tell what the parameter of the geodesic itself runs from and c denotes how smooth a picture you want, gr=[d,e] where d is the number of grid lines for u and e is the number for v." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 72 "plotgeo2:=proc(X,ustart,uend ,vstart,vend,u0,v0,Du0,Dv0,T,N,gr,theta,phi)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 41 " local sys,desys,u1,v1,listp,geo,plotX;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 17 " sys:=geoeq(X);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 75 " desys:=dsolve(\{sys,u(0)=u0,v(0)=v0,D(u)(0)=Du0,D( v)(0)=Dv0\},\{u(t),v(t)\}," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 39 " ty pe=numeric, output=listprocedure);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 46 " u1:=subs(desys,u(t)); v1:=subs(desys,v(t));" }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 92 " geo:=spacecurve(subs(u='u1'(t),v='v1'(t),X),t=0. .T, color=black,thickness=2,numpoints=N):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 80 " plotX:=plot3d(X,u=ustart..uend,v=vstart..vend,grid =[gr[1],gr[2]],shading=XY):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 84 " d isplay(\{geo,plotX\},style=wireframe,scaling=constrained,orientation=[ theta,phi]);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "end:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 730 "geoeq2:=proc(X)\n local M,G,E,F,D, Eu,Ev,Fu,Fv,Gu,Gv,eq1,eq2;\nM:=EFG(X);\nE:=M[1]; F:=M[2]; G:=M[3];\nD: =E*G-F*F;\nEu:=diff(M[1],u); Ev:=diff(M[1],v);\nFu:=diff(M[2],u); Fv:= diff(M[2],v);\nGu:=diff(M[3],u); Gv:=diff(M[3],v);\neq1:=diff(u(t),t$2 ) + subs( \{u=u(t),v=v(t)\} , (G*Eu-F*(2*Fu-Ev)) / (2*D) )*diff(u(t),t )^2\n + subs( \{u=u(t),v=v(t)\} ,(G*Ev-F*Gu) / D )*diff(u(t),t)* diff(v(t),t)\n + subs( \{u=u(t),v=v(t)\} ,(G*(2*Fv-Gu)-F*Gv) / \+ (2*D) )*diff(v(t),t)^2=0;\neq2:=diff(v(t),t$2) + subs( \{u=u(t),v=v(t) \} ,(E*(2*Fu-Ev)-F*Eu) / (2*D) )*diff(u(t),t)^2\n + subs( \{u =u(t),v=v(t)\}, (E*Gu-F*Ev) / (D) )*diff(u(t),t)*diff(v(t),t)\n \+ + subs( \{u=u(t),v=v(t)\},(E*Gv-F*(2*Fv-Gu)) / (2*D) )*diff(v(t),t )^2=0;\n eq1,eq2;\nend:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 100 "Here are two example surfaces. Pl ot some geodesics on them following the models for the torus below." } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "sphere:=[cos(u)*cos(v),sin (u)*cos(v),sin(v)];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 52 "toru s:=[(5+cos(u))*cos(v),(5+cos(u))*sin(v),sin(u)];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "EFG(sphere);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "geoeq(sphere);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 130 "Explain the following behavior of a geodesic. Where and in what d irection does the geodesic begin? Where does it always stay? Why?" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 63 "plotgeo2(torus,0,2*Pi,0,2*Pi ,Pi/2,0,0,1,10,100,[20,30],177,68);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 62 "Now plot the next two geodesics. What's different or the same? " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "plotgeo2(torus,0,2*Pi,0 ,2*Pi,0,0,0,1,15,75,[20,30],177,68);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "plotgeo2(torus,0,2*Pi,0,2*Pi,0,0,0,1,25,75,[20,30],17 7,68);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 62 "Now plot the next two g eodesics. What's different or the same?" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 60 "plotgeo2(torus,0,2*Pi,0,2*Pi,Pi,0,0,1,10,75,[20,30],1 77,68);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 60 "plotgeo2(torus,0 ,2*Pi,0,2*Pi,Pi,0,0,1,15,75,[20,30],177,68);" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 26 "Explain why this happened!" }}}{PARA 11 "" 1 "" {TEXT -1 0 "" }}}{MARK "24 0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 }