# How to reparametrize a curve by arclength using Mathematica? [duplicate]

There are some formulas in Differential Geometry that require a curve to be parametrized by arc length. Suppose we have a curve $\alpha(t)$, given by

alpha[t_] := {f1[t], f2[t], f3[t]}.


Now, my question is: if I wanted to reparametrize by arc length the procedure would be:

1. Compute $\alpha'(t)$ and integrate $s(t) = \int_0^t |\alpha'(\tau)|^2 \mathrm{\tau}$
2. Invert $s(t)$ to obtain $t = t(s)$.
3. Define a new curve $\beta(s) = \alpha(t(s))$.

How could I do this with mathematica? There are procedures there like inverting which I'm unsure how would be used.

On the other hand since this is a quite common use case I believe there might be some easier way to do with Mathematica.

How could I do this? How can I get a curve and reparametrize by arc length with Mathematica?

• Related – corey979 Dec 14 '16 at 23:55
• Would you be satisfied with a numerical solution, i.e. representing $t(s)$ as anInterpolatingFunction? Or do you need an analytic form for $t(s)$? – Jason B. Dec 15 '16 at 0:48
• "There are some formulas in Differential Geometry that require a curve to be parametrized by arc length." - not necessarily; those formulae can in most cases be modified for general parameters. Note that most integrals do not have neat closed forms, much less their inverses, so you'll be using NDSolve[] most of the time, as alluded by Jason's comment. See this related question. – J. M. is in limbo Dec 15 '16 at 1:29

I post this to illustrate some functions, e.g. ArcLengthand Interpolation that may be helpful. In the following a "three-petalled rose" is used to show 2 parametrizations (polar:green, arclength: red). The arc length parametrization is approximated by interpolation

r[t_] := RotationMatrix[Pi/4, {1, 0, 0}].{Cos[t] Sin[3 t],
Sin[t] Sin[3 t], 0}
arc[t_] := ArcLength[r[u], {u, 0, t}];
if[n_, step_] :=
Interpolation[Table[{arc[j], r[j][[n]]}, {j, 0, 2 Pi, step}]]
{xs, ys, zs} = if[#, 0.1] & /@ Range[3];
ra[u_] := {xs[u], ys[u], zs[u]};
anim = Table[Show[ParametricPlot3D[r[t], {t, 0, 2 Pi}],
Graphics3D[{Red, PointSize[0.04], Point[ra[p]]}]],
{p, 0, 0.95 arc[2 Pi], 0.05}];
anim2 = Table[Show[ParametricPlot3D[r[t], {t, 0, 2 Pi}],
Graphics3D[{Green, PointSize[0.04], Point[r[p]]}]],
{p, 0, 2 Pi, 0.05}];


Polar parametrization:

Arclength parametrization:

It is not perfect. Comparing 'speeds' along curve:

Plot[Evaluate[Sqrt[D[r[t], t].D[r[t], t]]], {t, 0, 2 Pi}]
Plot[Evaluate[Sqrt[D[ra[t], t].D[ra[t], t]]], {t, 0, 0.95 arc[2 Pi]},
PlotRange -> {0, 1.5}]