Frenet Frame

Manipulate[   
W1=Round[Norm[Nr[t]]   Norm[r'[t]]  ( r[t][[1]]Bn[t][[1]]+ r[t][[2]]Bn[t][[2]] +r[t][[3]]Bn[t][[3]]), 0.1];       {a1,b1,c1}=Round[Norm[Nr[t]] Norm[r'[t]] Bn[t], 0.1];
  If[ a1≠0,{A1,B1,C1,w1}=Round[ {a1,b1,c1,W1}/a1,0.1] ,     If[ b1≠0,{A1,B1,C1,w1}=Round[ {a1,b1,c1,W1}/b1 , 0.1] ,{A1,B1,C1,w1}=Round[ {a1,b1,c1,W1}/c1,0.1]]];
W2=Round[Norm[Nr[t]]  ( r[t][[1]]Nr[t][[1]]+ r[t][[2]]Nr[t][[2]] +r[t][[3]]Nr[t][[3]]), 0.1];
{a2,b2,c2}=Round[Norm[Nr[t]] Nr[t], 0.1];
If[ a2≠0,{A2,B2,C2,w2}=Round[ {a2,b2,c2,W2}/a2,0.1] ,     If[ b2≠0,{A2,B2,C2,w2}=Round[ {a2,b2,c2,W2}/b2 , 0.1] ,{A2,B2,C2,w2}=Round[ {a2,b2,c2,W2}/c2,0.1]]];
W3=Round[Norm[r'[t]]    ( r[t][[1]]Tn[t][[1]]+ r[t][[2]]Tn[t][[2]] +r[t][[3]]Tn[t][[3]]), 0.1];
{a3,b3,c3}=Round[Norm[r'[t]] Tn[t], 0.1];
If[ a3≠0,{A3,B3,C3,w3}=Round[ {a3,b3,c3,W3}/a3,0.1] ,     If[ b3≠0,{A3,B3,C3,w3}=Round[ {a3,b3,c3,W3}/b3 , 0.1] ,{A3,B3,C3,w3}=Round[ {a3,b3,c3,W3}/c3,0.1]]];

Grid[{{Text@Column[{
Row[{Style["r",Italic],"(",Style["t",Italic],") = {sin(",Style["t",Italic],"), cos(",Style["t",Italic],"), ",Style["t",Italic],"}"}],
 Labeled[  Framed[   Round[  Tn[t], 0.1]],     Style[ "unit tangent",RGBColor[.6,.73,.36],Bold],Top  ],
 Labeled[  Framed[Round[   Nr[t], 0.1]],     Style[ "unit normal",RGBColor[1,.47,0],Bold],Top  ],
 Labeled[ Framed[Round[    Bn[t], 0.1]],     Style[ "binormal",ColorData["HTML", "SlateBlue"],Bold],Top ],
 Row[{Style[ "osculating  ",RGBColor[.6,.73,.36],Bold],Style[ "plane ",RGBColor[1,.47,0],Bold]}],  Framed[Row[ {A1,Style["x",Italic],"+",B1,Style["y",Italic],"+",C1,Style["z",Italic]," = ",w1 }]] ,
  Row[{Style["rectifying  ",RGBColor[.6,.73,.36],Bold],Style["plane",ColorData["HTML", "SlateBlue"],Bold]}],   Framed[Row[ { A2,Style["x",Italic],"+",B2,Style["y",Italic],"+",C2,Style["z",Italic]," = ",w2  }]],
  Row[{Style[ "normal  " ,ColorData["HTML", "SlateBlue"],Bold],Style[ "plane   ",RGBColor[1,.47,0],Bold]}],    Framed[Row[{ A3,Style["x",Italic],"+",B3,Style["y",Italic],"+",C3,Style["z",Italic]," = ",w3  }]]
                }, Center],
Show[  
ParametricPlot3D[r[s],{s,0,2π },PlotStyle->{Cyan,Tube[dia]},PlotRange->{{-2,2},{-2,2},{-2,8}}],
ParametricPlot3D[Tooltip[OscPl[u,v,t], "osculating" ],{u,0,size},{v,0,size},PerformanceGoal->ControlActive["Speed","Quality"],PlotRange->{{-2,2},{-2,2},{-2,8}} ],
ParametricPlot3D[Tooltip[RecPl[u,v,t],"rectifying"],{u,0,size},{v,0,size},PlotRange->{{-2,2},{-2,2},{-2,8}} ],
ParametricPlot3D[Tooltip[NorPl[u,v,t],"binormal"],     {u,0,size},{v,0,size},PlotRange->{{-2,2},{-2,2},{-2,8}} ],
VectorFieldPlots`ListVectorFieldPlot3D[{{r[t],2size*Tn[t]}},VectorHeads->True,ColorFunction->(RGBColor[.6,.73,.36]&)],
VectorFieldPlots`ListVectorFieldPlot3D[{{r[t],2size*Nr[t]}},VectorHeads->True,ColorFunction->(RGBColor[1,.47,0]&)],
VectorFieldPlots`ListVectorFieldPlot3D[{{r[t],2size*Bn[t]}},VectorHeads->True,ColorFunction->(ColorData["HTML", "SlateBlue"]&)],
ImageSize->{440,370}]}},ItemSize->{{12,Automatic},Automatic}],

{{t,0},0,2π ,.1},
{{size,1.3, "scale"},0.5,2,.2},
{{dia,0.03,"tube"},0.01,0.5},

TrackedSymbols->Manipulate,
Initialization:>{
Get["VectorFieldPlots`"];
r[s_]:={Sin[s],Cos[s],s};
 Tn[s_]:= {((Cos[s])/(Sqrt[2])),-((Sin[s])/(Sqrt[2])),(1/(Sqrt[2]))}  ;
 Nr[s_]:=  {-Sin[s],-Cos[s],0}    ; 
 Bn[s_]:=  {((Cos[s])/(Sqrt[2])),-((Sin[s])/(Sqrt[2])),-(1/(Sqrt[2]))}  ; OscPl[p_,h_,s_]:=     {((p Cos[s])/(Sqrt[2]))+Sin[s]-h Sin[s],Cos[s]-h Cos[s]-((p Sin[s])/(Sqrt[2])),(p/(Sqrt[2]))+s} ; RecPl[p_,h_,s_]:=    {((h Cos[s])/(Sqrt[2]))+((p Cos[s])/(Sqrt[2]))+Sin[s],Cos[s]-((h Sin[s])/(Sqrt[2]))-((p Sin[s])/(Sqrt[2])),-(h/(Sqrt[2]))+(p/(Sqrt[2]))+s}  ;NorPl[p_,h_,s_]:=     {((h Cos[s])/(Sqrt[2]))+Sin[s]-p Sin[s],Cos[s]-p Cos[s]-((h Sin[s])/(Sqrt[2])),-(h/(Sqrt[2]))+s}  ;
}]

THIS NOTEBOOK IS THE SOURCE CODE FROM

"Frenet Frame" from The Wolfram Demonstrations Project
 http://demonstrations.wolfram.com/FrenetFrame/

Contributed by: Nick Bykov

A full-function Wolfram Mathematica 6 system is required to edit this notebook.
GET WOLFRAM MATHEMATICA 6 »

© The Wolfram Demonstrations Project & Contributors   |   Terms of Use   |   Make a new version of this Demonstration »