5

As an extension of this question, is it possible to find the unit tangent, normal, and binormal vectors for an interpolated function? eg

pts = {{1, 1, -1}, {2, 2, 1}, {3, 3, -1}, {3, 4, 1}};
f = Interpolation[Transpose[{N@Range[0, 1, 1/(Length[pts] - 1)], pts}]];

Length@Last@FrenetSerretSystem[f[t], t] outputs 2.

Motivation is as this question.

martin
  • 8,678
  • 4
  • 23
  • 70

1 Answers1

9

First we get you interpolating function:

pts = {{1, 1, -1}, {2, 2, 1}, {3, 3, -1}, {3, 4, 1}};
f = Interpolation[Transpose[{N@Range[0, 1, 1/(Length[pts] - 1)], pts}]];

Then we calculate the tangent, nornal and binormal:

utan[t_] = f'[t]/Norm[f'[t]];
normal[t_] = Module[{fu, x}, fu[x_] = f''[x] - (f''[x].utan[x]) utan[x]; 
   fu[t]/Norm[fu[t]]];
binormal[t_] = Cross[utan[t], normal[t]];

And finally we make an interactive plot:

Manipulate[
 Show[{ParametricPlot3D[f[x], {x, 0, 1}],
   Graphics3D[{Arrow[{f[t], f[t] + utan[t]}], Red, 
     Arrow[{f[t], f[t] + normal[t]}], Green, 
     Arrow[{f[t], f[t] + binormal[t]}]}]
   }, PlotRange -> {{0, 4}, {0, 4}, {-2, 2}}], {t, 0, 1}]

enter image description here

Daniel Huber
  • 51,463
  • 1
  • 23
  • 57