Vector Quanitites
Example 2

Dr. Therese Shelton
Southwestern University
Georgetown, TX

Set up

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_]:=2;
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=1.;  zmax=3.;

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=10;
deltat=N[(tmax-tmin)/numInt]

Manipulate[Show[{part[q],Graphics3D[{
{color1,AbsoluteThickness[.02],Line[{{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_]=t;

Clear[UnitTan,PrinNorm,Binormal]

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

UnitTan'[t]

Mag[UnitTan'[t]]

so, T '[t] has magnitude1

PrinNorm[t_]=UnitTan'[t]/1

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

Simplify[1/t]

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

Simplify[%]

manual cross product

Binormal[t_]={0,0,-1}

defining vectors

Clear[tanVec,normVec,binormVec];
tanVec[q_]:=Line[{xVec[q],xVec[q]+UnitTan[q]}];
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

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}]

torsion

Binormal'[t]

rate of change of the binormal vector wrt arclength

Binormal'[t]/Speed[t]

this is also    - τ times the principal normal vector

PrinNorm[t]

so 0=  -τ, or  τ= 0