We calculate the parametric curve {t^2,t}
tangent vector and then calculate the ArcLength
from 0
to t0
then we get the point {0,s[t0]}
in y-axis.
c[t_] = {t^2, t};
s[t_] = ArcLength[c[τ], {τ, 0, t}];
t0 = .5;
Show[ParametricPlot[c[t], {t, 0, 1}],
Graphics[Arrow[{c[t], c[t] + Normalize[c'[t]]}]] /. t -> t0,
PlotRange -> All]
After that we translate the curve along the direction{0, s[t0]} - c[t0]
and then rotate it around {0,s[t0]}
so that the tangent vector become the new direction {0,1}
which along y-axis;
c[t_] = {t^2, t};
s[t_] = ArcLength[c[τ], {τ, 0, t}];
r[t_, t0_] :=
RotationTransform[{c'[t0], {0, 1}}, {0, s[t0]}][
c[t] + {0, s[t0]} - c[t0]];
Manipulate[
ParametricPlot[r[t, t0], {t, 0, 1}, AspectRatio -> Automatic,
PlotRange -> {{0, 1}, {0, 2}}], {t0, 0, 1}]
New Edition
We generalize the idea from above to deal with two parametric curves. Here we use NDSolve
to handle the re-parametric equation of curve
$$\begin{cases}\frac{\mathrm{d}s}{\mathrm{d}t}=|r'(t)|\\s(0)=0\end{cases}$$
and thanks @Daniel Huber provide FunctionInterpolation
to increasing the speed.
r1[t_] = {1.5 + 1.5 Cos[π - t], Sin[π - t]}; t1 =
FunctionInterpolation[
InverseFunction[
NDSolve[{s1'[t] == Norm[r1'[t]], s1[0] == 0},
s1, {t, 0, 100}][[1, 1, 2]]][x], {x, 0, 50}] // Quiet;
r2[t_] = {t^2, 3 t};
t2 = FunctionInterpolation[
InverseFunction[
NDSolve[{s2'[t] == Norm[r2'[t]], s2[0] == 0},
s2, {t, 0, 100}][[1, 1, 2]]][x], {x, 0, 50}] // Quiet;
Animate[Show[ParametricPlot[{r1[t1[s]], r2[t2[s]]}, {s, 0, 20}],
Graphics[Arrow[{r1[t1[s]], r1[t1[s]] + D[r1[t1[s]], s]} /.
s -> s0]],
Graphics[Arrow[{r2[t2[s]], r2[t2[s]] + D[r2[t2[s]], s]} /.
s -> s0]]], {s0, 0, 20}, DefaultDuration -> 10]
r1[t_] = {1.5 + 1.5 Cos[π - t], Sin[π - t]}; t1 =
FunctionInterpolation[
InverseFunction[
NDSolve[{s1'[t] == Norm[r1'[t]], s1[0] == 0},
s1, {t, 0, 100}][[1, 1, 2]]][x], {x, 0, 50}] // Quiet;
r2[t_] = {t^2, 3 t};
t2 = FunctionInterpolation[
InverseFunction[
NDSolve[{s2'[t] == Norm[r2'[t]], s2[0] == 0},
s2, {t, 0, 100}][[1, 1, 2]]][x], {x, 0, 50}] // Quiet;
trans[ss_, ss0_] :=
RotationTransform[{D[r1[t1[s]], s], D[r2[t2[s]], s]} /. s -> ss0,
r2[t2[ss0]]][r1[t1[ss]] + r2[t2[ss0]] - r1[t1[ss0]]];
curves = ParametricPlot[{r1[t1[s]], r2[t2[s]]}, {s, 0, 20}];
Animate[Show[curves,
ParametricPlot[trans[ss, ss0], {ss, 0, 3 π}]], {ss0, 0, 20},
DefaultDuration -> 10]