Example 7.3.1

This manipulation illustrates the TNB frame (unit tangent vector, unit normal vector, unit binormal vector) to a curve in three dimensional space. Simply enter in your curve formula (which must be a function of t, so don't use t as a variable elsewhere!) and  the range of t-values for the curve to be shown in the graph.  You can then move the TNB frame along the curve using the provided slider, enter in a specific t-value, and select to show or hide any of the three vectors.

The unit tangent vector is shown in red, the unit normal vector is blue, and the unit binormal vector is in green.

You can rotate the graph as you would any three-dimensional Mathematica graphic.

TNBFrame[r_, {t_,a_,b_},u_,t1_,valflag_,tflag_,nflag_,bflag_]:=
Block[ {rx,ry,rz,dr,tan,norm,binorm,xmin,xmax,ymin,ymax,zmin,zmax,sorted,tval,parts,point},
(* Define the components of r, the "t-value", and the point *)
rx=r[[1]];
ry=r[[2]];
rz=r[[3]];
tval=If [valflag,t1,a+u(b-a)];
point=N[r /. t->tval];
(* Determine ranges for the plot *)
sorted=Union[ Table[rx,{t,a,b,.01}]];
{xmin,xmax}={sorted[[1]]-1,sorted[[-1]]+1};
sorted=Union[ Table[ ry,{t,a,b,.01}]];
{ymin,ymax}={sorted[[1]]-1,sorted[[-1]]+1};
sorted=Union[ Table[rz,{t,a,b,.01}]];
{zmin,zmax}={sorted[[1]]-1,sorted[[-1]]+1};
(* Create the TNB vectors *)
tan=Evaluate[D[r,t]/Sqrt[ D[r,t].D[r,t]]];
norm=Evaluate[ D[tan,t]/Sqrt[D[tan,t].D[tan,t]]];
binorm=Cross[tan,norm];
(* Create the raw graphics *)
parts=Flatten[{ PointSize[.02], Point[point], Red,If[tflag,Arrow[ {point,point+(tan/. t->tval)}],{}],Blue,If[nflag,Arrow[{point,point+(norm/. t-> tval)}],{}], Darker[Green], If[bflag, Arrow[{point, point+(binorm/. t->tval)}],{}]}];
(* Create/display the final graphic *)
Show[ ParametricPlot3D[r,{t,a,b}, AxesLabel->{"x","y","z"}, PlotRange->{{xmin,xmax},{ymin,ymax},{zmin,zmax}}], Graphics3D[parts] ]
];

Manipulate[ TNBFrame[ r,{t,a,b},u,t1,valflag,tflag,nflag,bflag],{{r,{Cos[3t],Sin[2t],Cos[2t]},"Curve Formula in {x,y,z} format"}},{{a,0,"Starting t-value"}},{{b,2Pi, "Final t-value"}},
{{valflag,False,"Use the value below rather than the slider"},{True,False}},
{{t1,Pi,"Plot the frame at the specific value"}},{{u,0,"Point Slider"},0,1,.01},{{tflag,True,"Show Unit Tangent Vector"},{True,False}},{{nflag,True,"Show Unit Normal Vector"},{True,False}},{{bflag,True,"Show Unit Binormal Vector"},{True,False}},ControlPlacement-> Top, SaveDefinitions->True]