Vector Quanitites
Example 3

Dr. Therese Shelton
Southwestern University
Georgetown, TX

Clear[color1,color2,color3,col1,col2,col3]
color1=RGBColor[1.,0.,0.];   color2=RGBColor[0.,1.,0.];  color3=RGBColor[0.,0.,1.];
col1="red";  col2="green";col3="blue";

Clear[Mag];
Mag[{a_,b_,c_}]=(Sqrt[ (a^2)+ (b^2)+ (c^2)]);

Clear[x,y,z,xVec];
x[t_]:=Sin[t] - t * Cos[t];
 y[t_]:=Cos[t]+t * Sin[t];
z[t_]:= 2t;
xVec[t_]:={x[t],y[t],z[t]};

Clear[tmin,tmax, xmin,xmax,ymin,ymax,zmin,zmax];
tmin=0.25;tmax=4 π;

{Plot[x[t],{t,tmin,tmax}], Plot[y[t],{t,tmin,tmax}], Plot[z[t],{t,tmin,tmax}]}

xmin = -15.; xmax=10.;  ymin=-13.;  ymax=8.;     zmin=0.;  zmax=25.;

A static plot

Clear[plotAll];
plotAll=ParametricPlot3D[{x[t],y[t],z[t]},{t,tmin,tmax},PlotRange->{{xmin,xmax},{ymin,ymax},{zmin,zmax}},AxesLabel->{"   x[t]  ","  y[t]  ","  z[t]  "}]

Animation of position vectors tracing the curve

Clear[part];
part[q_]:=ParametricPlot3D[ xVec[t],{t,tmin,q},
DisplayFunction->Identity];

Clear[numInt,deltat];
numInt=50;
deltat=N[(tmax-tmin)/numInt]

Table[Show[{part[q],Graphics3D[{
{color1,AbsoluteThickness[.02],Arrow[{{0,0,0},{x[q],y[q],z[q]}}]}
                 }] },
PlotRange-> {{xmin,xmax},{ymin,ymax},{zmin,zmax}},Axes->Automatic,AxesLabel->{" x "," y ", " z "},
DisplayFunction->$DisplayFunction],

{q,tmin +10deltat, tmax, 10deltat}]

Manipulate[Show[{part[q],Graphics3D[{
{color1,AbsoluteThickness[.02],Arrow[{{0,0,0},{x[q],y[q],z[q]}}]}
                 }] },
PlotRange-> {{xmin,xmax},{ymin,ymax},{zmin,zmax}},Axes->Automatic,AxesLabel->{" x "," y ", " z "},
DisplayFunction->$DisplayFunction],

{q,tmin + deltat, tmax, deltat}]

Calculations of other vector quantities

Clear[Vel,Speed]
Vel[t_]=xVec'[t]
Speed[t_]=Mag[Vel[t]]

Simplify[%]

Speed[t_]=(Sqrt[4+(t^2)]);

Clear[UnitTan,PrinNorm,Binormal]

UnitTan[t_]=Vel[t]/Speed[t]

calculations for the princiipal unit normal vector

UnitTan'[t]

Together[%]

Mag[%]

Simplify[%]

We simplify this to  |  (((2+(t^2)))/((4+(t^2))))|.

{((4 t Cos[t]+(t^3) Cos[t]+4 Sin[t])/(((4+(t^2)))^(3/2))),((4 Cos[t]-4 t Sin[t]-(t^3) Sin[t])/(((4+(t^2)))^(3/2))),-((2 t)/(((4+(t^2)))^(3/2)))}/(((2+(t^2)))/((4+(t^2))))

Simplify[%]

PrinNorm[t_]={((t (4+(t^2)) Cos[t]+4 Sin[t])/((2+(t^2)) (Sqrt[4+(t^2)]))),((4 Cos[t]-t (4+(t^2)) Sin[t])/((2+(t^2)) (Sqrt[4+(t^2)]))),-((2 t)/((2+(t^2)) (Sqrt[4+(t^2)])))}

curvature = Mag[UnitTan'[t]] / (absolute value of speed)

Simplify[(((2+(t^2)))/((4+(t^2))))/(Sqrt[4+(t^2)])]

Cross[UnitTan[t],PrinNorm[t]]

Simplify[%]

Binormal[t_]={((2 (-Cos[t]+t Sin[t]))/(2+(t^2))),((2 (t Cos[t]+Sin[t]))/(2+(t^2))),-((t^2)/(2+(t^2)))}

defining vectors

Clear[tanVec,normVec,binormVec];
tanVec[q_]:=Line[{xVec[q],xVec[q]+UnitTan[q]}]; 
(* use {Arrowheads[.03],Arrow[{xVec[q],xVec[q]+UnitTan[q]}]} to see an arrow *)
normVec[q_]:=Line[{xVec[q],xVec[q]+PrinNorm[q]}];
binormVec[q_]:=Line[{xVec[q],xVec[q]+Binormal[q]}];

demo of a single frame with the T, N, B vectors

q=(tmax-tmin)/2.
Show[{part[q],
Graphics3D[{{color1,AbsoluteThickness[.02],tanVec[q]}}],
Graphics3D[{{color2,AbsoluteThickness[.02],normVec[q]}}],
Graphics3D[{{color3,AbsoluteThickness[.02],binormVec[q]}}] },
PlotRange-> {{xmin,xmax},{ymin,ymax},{zmin,zmax}},Axes->Automatic,AxesLabel->{" x "," y ", " z "},
DisplayFunction->$DisplayFunction]

animation of the moving coordinate system

Table[Show[{part[q],
Graphics3D[{{color1,AbsoluteThickness[.02],tanVec[q]}}],
Graphics3D[{{color2,AbsoluteThickness[.02],normVec[q]}}],
Graphics3D[{{color3,AbsoluteThickness[.02],binormVec[q]}}] },
PlotRange-> {{xmin,xmax},{ymin,ymax},{zmin,zmax}},Axes->Automatic,AxesLabel->{" x "," y ", " z "},
DisplayFunction->$DisplayFunction],
{q,tmin + 10deltat, tmax, 10deltat}]

Manipulate[Show[{part[q],
Graphics3D[{{color1,AbsoluteThickness[.02],tanVec[q]}}],
Graphics3D[{{color2,AbsoluteThickness[.02],normVec[q]}}],
Graphics3D[{{color3,AbsoluteThickness[.02],binormVec[q]}}] },
PlotRange-> {{xmin,xmax},{ymin,ymax},{zmin,zmax}},Axes->Automatic,AxesLabel->{" x "," y ", " z "},
DisplayFunction->$DisplayFunction],
{q,tmin + deltat, tmax, deltat}]