5
$\begingroup$

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.

$\endgroup$
2
  • 2
    $\begingroup$ You can either use NDSolve[] on the Frenet-Serret equations (like what was done here), or construct a Bishop frame instead (like what was done here). $\endgroup$
    – J. M.'s torpor
    Mar 1 at 9:38
  • $\begingroup$ @J. M. thank you, I'll have a go $\endgroup$
    – martin
    Mar 1 at 9:41
9
$\begingroup$

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

$\endgroup$
1
  • $\begingroup$ great! thanks :) $\endgroup$
    – martin
    Mar 1 at 11:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.