Dr. Sarah's Maple File for Spherical Coordinates Maple is a computer algebra system, which was first developed in 1980 at the University of Waterloo in Canada.Maple can handle numerical, symbolic, and graphical representations. Exposure to this type of technology is a course goals of Linear Algebra, Calculus II with Analytic Geometry, and this course. Change r=1 to a different constant r, Enter Your Surface and Execute Initial Commands and Proceedures Change r=1 in each coordinate of g to a different value of r. Notice the surface is a function of u and v. Don't forget to hit return here every time you open this document! g := (u,v) ->[1*cos(u)*sin(v),1*sin(u)*sin(v),1*cos(v)]; with(linalg): with(plots): dp := proc(X,Y) X*Y+X*Y+X*Y; end: xp := proc(X,Y) local a,b,c; a := X*Y-X*Y; b := X*Y-X*Y; c := X*Y-X*Y; [a,b,c]; end: nrm := proc(X) sqrt(dp(X,X)); end: UN := proc(X) local Xu,Xv,Z,s; Xu := [diff(X,u),diff(X,u),diff(X,u)]; Xv := [diff(X,v),diff(X,v),diff(X,v)]; Z := xp(Xu,Xv); s := nrm(Z); simplify([Z/s,Z/s,Z/s],sqrt,symbolic,trig); end: Tangent := proc(t,func) local Velocity, VelEval, VelLength; Velocity := map(diff, func(x), x); VelEval := map(evalf,(subs(x=t, Velocity))); VelLength := sqrt(dotprod(VelEval,VelEval)); evalm((1/VelLength)*VelEval) end: vecnormalize := (vec) -> evalm((1/vecnorm(vec))*vec): vecnorm:= (vec) -> sqrt(dotprod(vec,vec)): Velocity := proc(t, func) local fprime; fprime := map(diff, func(x), x); map(evalf, subs(x=t, fprime)) end: sprime := proc(t, func) sqrt(dotprod(Velocity(t,func), Velocity(t,func))) end: VCurvature := proc(t, func) local TanPrime, TanPrimeEval; TanPrime := map (diff, Tangent(x,func), x); TanPrimeEval := map(evalf, subs(x=t, eval(TanPrime))); evalm((1/sprime(t,func))*TanPrimeEval) end: Geodesic and Normal Curvatures Not a geodesic I made the parameters have a small range here. If your surface needs restricted values, modify them here and be sure that the Point and rest is within the restricted values. Be sure to make use of the second display command where you can play around and remove surf and Plane and more to get a good sense and showcase a revealing picture. In addition, hit enter at the numerical approximation of geodesic curvature below the graphs. You can also modify the values below to showcase revealing featuresThe range for the parameter of the first coordinate of the parametrization on the surface is from a1 to a2; the second coordinate from b1 to b2. The range of the parameter for the curve on the surface is from c1 to c2. The Point command lets you choose the point in the domain that maps to the point on the surface where we will exhibit the curvature vectors. f1 and f2 give the parameters of the curve that will be used on the surface; they can be constants or functions of t. a1:=.1: a2:=1.5: b1:=.1: b2:=1.5: c1 := .5: c2 := 1.5: Point := 1: f1:= (t) -> t: f2:= (t) -> sin(t): surf:= plot3d(g(u,v), u=a1..a2, v=b1..b2, color=blue, style=wireframe): SurfCurveEq := (x) -> subs(u=f1(x), v=f2(x), g(u,v)): SurfCurve:= spacecurve(SurfCurveEq(x), x=c1..c2, color=yellow,thickness=4, style=wireframe): ExtCurv := evalm(VCurvature(Point, SurfCurveEq)): ExtVector := polygonplot3d([g(f1(Point),f2(Point)),convert(evalm(g(f1(Point), f2(Point)) + ExtCurv), list)], color=magenta, thickness=1, linestyle=DASH, style=line): XDeriv := map(diff, g(u,v), u): XDerivEval := evalf(subs(u=f1(Point), v=f2(Point), XDeriv)): YDeriv := map(diff, g(u,v),v): YDerivEval := evalf(subs(u=f1(Point), v=f2(Point), YDeriv)): SurfaceNormal := vecnormalize(crossprod(XDerivEval, YDerivEval)): Plane := plot3d(convert(evalm(u*XDerivEval+v*YDerivEval+g(f1(Point), f2(Point))), list), u = -1 .. 1, v = -1 .. 1, color = green, numpoints = 16, style=wireframe): NormCurv := evalm((dotprod(ExtCurv,SurfaceNormal))*SurfaceNormal): GeoCurv := evalm(ExtCurv - NormCurv): NormVector := polygonplot3d([g(f1(Point),f2(Point)),convert(evalm(g(f1(Point),f2(Point)) + NormCurv), list)],color=black, thickness=2, style=line): GeoVector := polygonplot3d([g(f1(Point),f2(Point)),convert(evalm(g(f1(Point), f2(Point)) + GeoCurv), list)],color=coral, thickness=4, linestyle=DASHDOT, style=line): display({ surf,Plane, SurfCurve, ExtVector, NormVector, GeoVector}); Second display command for not a geodesic where you can remove surf and/or Plane or more to see the curvature vectors better display({ surf, Plane, SurfCurve, ExtVector, NormVector, GeoVector}); Numerical approximation of geodesic curvature: evalm(ExtCurv-NormCurv); Yes a geodesic (or close to it) I made the parameters have a larger range here so that you can get a sense of the surface. If your surface needs restricted values, modify them here and be sure that the Point and rest is within the restricted values. Be sure to make use of the second display command where you can play around and remove surf and Plane and more to get a good sense and showcase a revealing picture. In addition, hit enter at the numerical approximation of geodesic curvature below the graphs. You can also modify the values below to showcase revealing featuresThe range for the parameter of the first coordinate of the parametrization on the surface is from a1 to a2; the second coordinate from b1 to b2. The range of the parameter for the curve on the surface is from c1 to c2. The Point command lets you choose the point in the domain that maps to the point on the surface where we will exhibit the curvature vectors. f1 and f2 give the parameters of the curve that will be used on the surface; they can be constants or functions of t. a1:=0: a2:=2*Pi: b1:=0: b2:=2*Pi: c1 := 1: c2 := 3: Point := 2: f1:= (t) -> t: f2:= (t) -> Pi/2: surf:= plot3d(g(u,v), u=a1..a2, v=b1..b2, color=blue, style=wireframe): SurfCurveEq := (x) -> subs(u=f1(x), v=f2(x), g(u,v)): SurfCurve:= spacecurve(SurfCurveEq(x), x=c1..c2, color=yellow,thickness=4, style=wireframe): ExtCurv := evalm(VCurvature(Point, SurfCurveEq)): ExtVector := polygonplot3d([g(f1(Point),f2(Point)),convert(evalm(g(f1(Point), f2(Point)) + ExtCurv), list)], color=magenta, thickness=1, linestyle=DASH, style=line): XDeriv := map(diff, g(u,v), u): XDerivEval := evalf(subs(u=f1(Point), v=f2(Point), XDeriv)): YDeriv := map(diff, g(u,v),v): YDerivEval := evalf(subs(u=f1(Point), v=f2(Point), YDeriv)): SurfaceNormal := vecnormalize(crossprod(XDerivEval, YDerivEval)): Plane := plot3d(convert(evalm(u*XDerivEval+v*YDerivEval+g(f1(Point), f2(Point))), list), u = -1 .. 1, v = -1 .. 1, color = green, numpoints = 16, style=wireframe): NormCurv := evalm((dotprod(ExtCurv,SurfaceNormal))*SurfaceNormal): GeoCurv := evalm(ExtCurv - NormCurv): NormVector := polygonplot3d([g(f1(Point),f2(Point)),convert(evalm(g(f1(Point),f2(Point)) + NormCurv), list)],color=black, thickness=2, style=line): GeoVector := polygonplot3d([g(f1(Point),f2(Point)),convert(evalm(g(f1(Point), f2(Point)) + GeoCurv), list)],color=coral, thickness=4, linestyle=DASHDOT, style=line): display({ surf,Plane, SurfCurve, ExtVector, NormVector, GeoVector}); Second display command for yes a geodesic where you can remove surf and/or Plane or more to see the curvature vectors better display({surf,Plane, SurfCurve, ExtVector, NormVector, GeoVector}); Numerical approximation of geodesic curvature: evalm(ExtCurv-NormCurv);