(* Definitions for intrinsic curvature and other differential geometry concepts *) BeginPackage["DiffGeom`"] RadiusOfCurvature[{f_, g_}, t_] := (D[f,t]^2 + D[g,t]^2)^(3/2) / (D[g,t,t] D[f,t] - D[f,t,t] D[g,t]) Curvature[{f_, g_}, t_] := 1/RadiusOfCurvature[{f, g}, t] ArcLength[{f_, g_}, {t_, a_, b_}] := Integrate[Sqrt[D[f,t]^2 + D[g,t]^2], {t, a, b}] TangentVector[{f_, g_}, t_] := { D[f,t], D[g,t] } / Sqrt[D[f,t]^2 + D[g,t]^2] NormalVector[{f_, g_}, t_] := { -D[g,t], D[f,t] } / Sqrt[D[f,t]^2 + D[g,t]^2] Evolute[{f_, g_}, t_] := {f, g} + RadiusOfCurvature[{f, g}, t] NormalVector[{f, g}, t] CenterOfCurvature[{f_, g_}, t_] := Evolute[{f, g}, t] Volume[{f_, g_}, {t_, a_, b_}] := Pi Integrate[g^2 D[f,t], {t, a, b}] SurfaceArea[{f_, g_}, {t_, a_, b_}] := 2 Pi Integrate[g Sqrt[D[f,t]^2 + D[g,t]^2], {t, a, b}] (* Documentation *) RadiusOfCurvature::usage := "RadiusOfCurvature[{x, y}, t] gives the radius of curvature of a curve defined by parametric equations {x, y}." Curvature::usage := "Curvature[{x, y}, t] gives the curvature of a curve defined by parametric equations {x, y}." ArcLength::usage := "ArcLength[{x, y}, {t, tmin, tmax}] gives an expression for the arc length from t = tmin to t = tmax of a curve defined by parametric equations {x, y}." TangentVector::usage := "TangentVector[{x, y}, t] gives the tangent unit vector to a curve defined by parametric equations {x, y}." NormalVector::usage := "NormalVector[{x, y}, t] gives the normal unit vector to a curve defined by parametric equations {x, y}." Evolute::usage := "Evolute[{x, y}, t] gives the parametric equation of the evolute of the curve defined parametrically by {x, y}." CenterOfCurvature::usage := "CenterOfCurvature[{x, y}, t] is an alias for Evolute[{x, y}, t]." Volume::usage := "Volume[{x, y}, {t, tmin, tmax}] gives the volume of the solid of revolution generated by rotating the curve defined parametrically by {x, y} about the x-axis from t = tmin to t = tmax." SurfaceArea::usage := "SurfaceArea[{x, y}, {t, tmin, tmax}] gives the surface area of the solid of revolution generated by rotating the curve defined parametrically by {x, y} about the x-axis from t = tmin to t = tmax." EndPackage[ ]