{VERSION 4 0 "IBM INTEL NT" "4.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Times" 1 12 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 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 "Maple Output" -1 11 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }3 3 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 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 42 " E := dotprod(Xu,Xu,orthogonal);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 42 " F := dotprod(Xu,Xv,orthogonal) ;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 42 " G := dotprod(Xv,Xv, orthogonal);" }}{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 Xu :=[diff(X[1],u),diff(X[2],u),dif f(X[3],u)];\n Xv := [diff(X[1],v),diff(X[2],v),diff(X[3],v)] ;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 35 " E := dotprod(Xu,Xu) /g^2;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 35 " F := dotprod(Xu ,Xv)/g^2;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 44 " G := dotpro d(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 "The geodesic equations are ob tained 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 " +sub s(\{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 following procedure plot s a geodesic on a surface. The inputs are: X a parametrization in u an d v, ustart......vend the range of the parameters, 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 denote s how smooth a picture you want, gr=[d,e] whered 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,Dv 0,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 50 " type=numeric, method=dna,output= listprocedure);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 46 " u1:=subs(desy s,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,thic kness=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 80 " display(\{geo,plotX\},style= patch,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:=di ff(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:=dif f(v(t),t$2) + subs( \{u=u(t),v=v(t)\} ,(E*(2*Fu-Ev)-F*Eu) / (2*D) )*d iff(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 "He re are two example surfaces. Plot 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 "torus:=[(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 direction does the geodesic begin? Wher e does it always stay? Why?" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 70 "plotgeo2(torus,0,2*Pi,0,2*Pi,evalf(Pi/2),0,0,1,10,100,[10,30],177, 68);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 62 "Now plot the next two geo desics. 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,[10,30],17 7,68);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "plotgeo2(torus,0, 2*Pi,0,2*Pi,0,0,0,1,25,75,[10,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 67 "plotgeo2(torus,0,2 *Pi,0,2*Pi,evalf(Pi),0,0,1,10,75,[10,30],177,68);" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 67 "plotgeo2(torus,0,2*Pi,0,2*Pi,evalf(Pi),0,0,1 ,15,75,[10,30],177,68);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 26 "Explain why this happened!" }}}{PARA 11 "" 1 "" {TEXT -1 0 "" }}}{MARK "28" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 } {PAGENUMBERS 0 1 2 33 1 1 }