Geodesic and Normal Curvature 2 In this Maple document, you can input a surface, a curve on that surface, and a point, and see the extrinsic, normal, and geodesic curvature vectors at that point. Execute this section at the start of your Maple session restart: with(plots): with(linalg): 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: Defining the surface, ranges for plotting, and a curve on the surface. You may change any of the following command definitions. The parametrization of the surface is given in g. Be sure to leave it in terms of x and y variables. The 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. g := (x,y) -> [cos(x), sin(x), y]: a1:=0: a2:=2*Pi: b1:=0: b2:=2*Pi: c1 := 1: c2 := 3: Point := 2: f1:= (t) -> .8*t+.2: f2:= (t) -> 1.2*t-.5: Execute the following each time you change one of the above variables or parameters in order to generate a new plot. surf:= plot3d(g(x,y), x=a1..a2, y=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(x,y), x): XDerivEval := evalf(subs(x=f1(Point), y=f2(Point), XDeriv)): YDeriv := map(diff, g(x,y),y): YDerivEval := evalf(subs(x=f1(Point), y=f2(Point), YDeriv)): SurfaceNormal := vecnormalize(crossprod(XDerivEval, YDerivEval)): Plane := plot3d(convert(evalm(x*XDerivEval+y*YDerivEval+g(f1(Point), f2(Point))), list), x = -1 .. 1, y = -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}); In the very last display command, remove surf and/or Plane and/or any of the items in order to see the curvature vectors better. The geodesic curvature vector is tan and in a dashdot style and is thickness 4the normal curvature vector is black and is solid and thickness 2the curvature vector is pink and is dashed and thickness 1In the very last display command, remove surf and/or Plane and/or any of the items in order to see the curvature vectors better. display({ surf,Plane, SurfCurve, ExtVector, NormVector, GeoVector}); Surface Normal U vecnormalize(crossprod(XDerivEval, YDerivEval)); Curve Curvature vector: ExtCurv k_alpha evalm(VCurvature(Point, SurfCurveEq)); Normal Curvature. Project ExtCurv onto the surface normal k_n evalm((dotprod(ExtCurv,SurfaceNormal))*SurfaceNormal); geodesic curvature. k_g = k_alpha - k_n evalm(ExtCurv-NormCurv); Checking that the speed of the geodesic is a constant sqrt(dotprod(Velocity(Point,SurfCurveEq),Velocity(Point,SurfCurveEq))); sqrt(dotprod(Velocity(2.5,SurfCurveEq),Velocity(2.5,SurfCurveEq))); sqrt(dotprod(Velocity(2.8,SurfCurveEq),Velocity(2.8,SurfCurveEq))); Velocity(t,SurfCurveEq); sqrt(.8^2+1.2^2); g for geographical sphere g := (x,y) -> [2*cos(x)*cos(y), 2*sin(x)*cos(y), 2*sin(y)]: