Space Curves, TNB, and the Kissing Circle

The Parabola

r[t_]={t,(t^2),0};WINDOW={{-4,4},{-2,10},{-1,1}};tRange={t,-2,2,0.1};xMin=-3;

(*The Derivative Vector and Norm of the Derivative Vector*)
rprime[t_]=D[r[t],t];
normrprime[t_]=(Sqrt[Simplify[rprime[t].rprime[t]]]);

(*The Tangent Vector*)
tanvec[t_]=((rprime[t])/(normrprime[t]));
normtanvec[t_]=(Sqrt[tanvec[t].tanvec[t]]);
tanvecprime[t_]=D[tanvec[t],t];
normtanvecprime[t_]=(Sqrt[tanvecprime[t].tanvecprime[t]]);

(*The Normal Vector*)
normal[t_]=((tanvecprime[t])/(normtanvecprime[t]));

(*The Binormal Vector*)
binormal[t_]=Cross[tanvec[t],normal[t]];

(*The Curvature*)
κ[t_]=((normtanvecprime[t])/(normrprime[t]));

(*The Radius*)
radius[t_]=(1/(κ[t]));

(*The Osculating Circle*)
kissingcircle[t_,θ_]:=r[t]+normal[t] radius[t]+radius[t](tanvec[t] Cos[θ]+normal[t] Sin[θ]);

(*Graphing Functions*)
PosVec[t_]:=Graphics3D[{Black,Arrow[{{0,0,0},r[t]}]}];
TanVec[t_]:=Graphics3D[{Red,Arrow[{r[t],r[t]+tanvec[t]}]}];
NorVec[t_]:=Graphics3D[{Green,Arrow[{r[t],r[t]+normal[t]}]}];
BiVec[t_]:=Graphics3D[{Blue,Arrow[{r[t],r[t]+binormal[t]}]}];
KissingCircle[t_]:=ParametricPlot3D[kissingcircle[t,θ],{θ,0,2π},PlotRange->WINDOW,Ticks->False];
SpaceCurve[t_]:=ParametricPlot3D[r[s],{s,xMin-0.1,t}];

Manipulate[

Which[
TEST=="r",
Show[PosVec[t],PlotRange->WINDOW,Ticks->False],
TEST=="r & curve",
Show[{ParametricPlot3D[r[s],{s,-.01,t},PlotRange->WINDOW,Ticks->False],PosVec[t]}],
TEST=="curve",
Show[{ParametricPlot3D[r[s],{s,-.01,t},PlotRange->WINDOW,Ticks->False]}],
TEST=="r & T",
Show[{PosVec[t],TanVec[t]},PlotRange->WINDOW,Ticks->False],
TEST=="T & curve",
Show[{ParametricPlot3D[r[s],{s,-.01,t},PlotRange->WINDOW,Ticks->False],TanVec[t]}],
TEST=="T & N",
Show[{TanVec[t],NorVec[t]},PlotRange->WINDOW,Ticks->False],
TEST=="T, N, & curve",
Show[{TanVec[t],NorVec[t],ParametricPlot3D[r[s],{s,-.01,t},PlotRange->WINDOW,Ticks->False]},PlotRange->WINDOW,Ticks->False],
TEST=="T, N, & B",
Show[{TanVec[t],NorVec[t],BiVec[t]},PlotRange->WINDOW,Ticks->False],
TEST=="T, N, B, & curve",
Show[{TanVec[t],NorVec[t],BiVec[t],ParametricPlot3D[r[s],{s,-.01,t},PlotRange->WINDOW,Ticks->False]},PlotRange->WINDOW,Ticks->False],
TEST=="kiss & curve",
Show[{KissingCircle[t],SpaceCurve[t]}],
TEST=="T, N, B, kiss, & curve",
Show[{TanVec[t],NorVec[t],BiVec[t],KissingCircle[t],ParametricPlot3D[r[s],{s,-.01,t},PlotRange->WINDOW,Ticks->False]},PlotRange->WINDOW,Ticks->False]
]
,
(*Manipulate Controllers*)
 Style["Space curves and the TNB System",Bold,12],(*Title*)
Style["",Plain,8],
{{TEST,"r & curve","Graph"},{"r","r & curve","curve","r & T","T & curve","T & N","T, N, & curve","T, N, & B","T, N, B, & curve","kiss & curve","T, N, B, kiss, & curve"}},
Evaluate[tRange],

(*Notes*)
Delimiter,
Style["",Plain,8],
Style["r: the position vector",Bold,8],
Style["T: the unit tangent vector",Plain,8],
Style["N: the unit normal vector",Plain,8],
Style["B: the binormal vector",Plain,8],
Style["curve: the space curve",Plain,8],
Style["kiss: the kissing circle",Plain,8],
ControlPlacement->Left
]

The Helix

r[t_]={Cos[t],Sin[t],t};WINDOW={{-3,3},{-3,3},{-1,6π}};tRange={{t,3π},0,24,0.2};xMin=0;

(*The Derivative Vector and Norm of the Derivative Vector*)
rprime[t_]=D[r[t],t];
normrprime[t_]=(Sqrt[Simplify[rprime[t].rprime[t]]]);

(*The Tangent Vector*)
tanvec[t_]=((rprime[t])/(normrprime[t]));
normtanvec[t_]=(Sqrt[tanvec[t].tanvec[t]]);
tanvecprime[t_]=D[tanvec[t],t];
normtanvecprime[t_]=(Sqrt[tanvecprime[t].tanvecprime[t]]);

(*The Normal Vector*)
normal[t_]=((tanvecprime[t])/(normtanvecprime[t]));

(*The Binormal Vector*)
binormal[t_]=Cross[tanvec[t],normal[t]];

(*The Curvature*)
κ[t_]=((normtanvecprime[t])/(normrprime[t]));

(*The Radius*)
radius[t_]=(1/(κ[t]));

(*The Osculating Circle*)
kissingcircle[t_,θ_]:=r[t]+normal[t] radius[t]+radius[t](tanvec[t] Cos[θ]+normal[t] Sin[θ]);

(*Graphing Functions*)
PosVec[t_]:=Graphics3D[{Black,Arrow[{{0,0,0},r[t]}]}];
TanVec[t_]:=Graphics3D[{Red,Arrow[{r[t],r[t]+tanvec[t]}]}];
NorVec[t_]:=Graphics3D[{Green,Arrow[{r[t],r[t]+normal[t]}]}];
BiVec[t_]:=Graphics3D[{Blue,Arrow[{r[t],r[t]+binormal[t]}]}];
KissingCircle[t_]:=ParametricPlot3D[kissingcircle[t,θ],{θ,0,2π},PlotRange->WINDOW,Ticks->False];
SpaceCurve[t_]:=ParametricPlot3D[r[s],{s,xMin-0.1,t}];

Manipulate[

Which[
TEST=="r",
Show[PosVec[t],PlotRange->WINDOW,Ticks->False],
TEST=="r & curve",
Show[{ParametricPlot3D[r[s],{s,-.01,t},PlotRange->WINDOW,Ticks->False],PosVec[t]}],
TEST=="curve",
Show[{ParametricPlot3D[r[s],{s,-.01,t},PlotRange->WINDOW,Ticks->False]}],
TEST=="r & T",
Show[{PosVec[t],TanVec[t]},PlotRange->WINDOW,Ticks->False],
TEST=="T & curve",
Show[{ParametricPlot3D[r[s],{s,-.01,t},PlotRange->WINDOW,Ticks->False],TanVec[t]}],
TEST=="T & N",
Show[{TanVec[t],NorVec[t]},PlotRange->WINDOW,Ticks->False],
TEST=="T, N, & curve",
Show[{TanVec[t],NorVec[t],ParametricPlot3D[r[s],{s,-.01,t},PlotRange->WINDOW,Ticks->False]},PlotRange->WINDOW,Ticks->False],
TEST=="T, N, & B",
Show[{TanVec[t],NorVec[t],BiVec[t]},PlotRange->WINDOW,Ticks->False],
TEST=="T, N, B, & curve",
Show[{TanVec[t],NorVec[t],BiVec[t],ParametricPlot3D[r[s],{s,-.01,t},PlotRange->WINDOW,Ticks->False]},PlotRange->WINDOW,Ticks->False],
TEST=="kiss & curve",
Show[{KissingCircle[t],SpaceCurve[t]}],
TEST=="T, N, B, kiss, & curve",
Show[{TanVec[t],NorVec[t],BiVec[t],KissingCircle[t],ParametricPlot3D[r[s],{s,-.01,t},PlotRange->WINDOW,Ticks->False]},PlotRange->WINDOW,Ticks->False]
]
,
(*Manipulate Controllers*)
 Style["Space curves and the TNB System",Bold,12],(*Title*)
Style["",Plain,8],
{{TEST,"r & curve","Graph"},{"r","r & curve","curve","r & T","T & curve","T & N","T, N, & curve","T, N, & B","T, N, B, & curve","kiss & curve","T, N, B, kiss, & curve"}},
Evaluate[tRange],

(*Notes*)
Delimiter,
Style["",Plain,8],
Style["r: the position vector",Bold,8],
Style["T: the unit tangent vector",Plain,8],
Style["N: the unit normal vector",Plain,8],
Style["B: the binormal vector",Plain,8],
Style["curve: the space curve",Plain,8],
Style["kiss: the kissing circle",Plain,8],
ControlPlacement->Left
]

The Sine Curve

r[t_]={t,Sin[t],0};WINDOW={{0,4π},{-2,2},{-1,1}};tRange={t,0.2,24,0.2};xMin=0;

(*The Derivative Vector and Norm of the Derivative Vector*)
rprime[t_]=D[r[t],t];
normrprime[t_]=(Sqrt[Simplify[rprime[t].rprime[t]]]);

(*The Tangent Vector*)
tanvec[t_]=((rprime[t])/(normrprime[t]));
normtanvec[t_]=(Sqrt[tanvec[t].tanvec[t]]);
tanvecprime[t_]=D[tanvec[t],t];
normtanvecprime[t_]=(Sqrt[tanvecprime[t].tanvecprime[t]]);

(*The Normal Vector*)
normal[t_]=((tanvecprime[t])/(normtanvecprime[t]));

(*The Binormal Vector*)
binormal[t_]=Cross[tanvec[t],normal[t]];

(*The Curvature*)
κ[t_]=((normtanvecprime[t])/(normrprime[t]));

(*The Radius*)
radius[t_]=(1/(κ[t]));

(*The Osculating Circle*)
kissingcircle[t_,θ_]:=r[t]+normal[t] radius[t]+radius[t](tanvec[t] Cos[θ]+normal[t] Sin[θ]);

(*Graphing Functions*)
PosVec[t_]:=Graphics3D[{Black,Arrow[{{0,0,0},r[t]}]}];
TanVec[t_]:=Graphics3D[{Red,Arrow[{r[t],r[t]+tanvec[t]}]}];
NorVec[t_]:=Graphics3D[{Green,Arrow[{r[t],r[t]+normal[t]}]}];
BiVec[t_]:=Graphics3D[{Blue,Arrow[{r[t],r[t]+binormal[t]}]}];
KissingCircle[t_]:=ParametricPlot3D[kissingcircle[t,θ],{θ,0,2π},PlotRange->WINDOW,Ticks->False];
SpaceCurve[t_]:=ParametricPlot3D[r[s],{s,xMin-0.1,t}];

Manipulate[

Which[
TEST=="r",
Show[PosVec[t],PlotRange->WINDOW,Ticks->False],
TEST=="r & curve",
Show[{ParametricPlot3D[r[s],{s,-.01,t},PlotRange->WINDOW,Ticks->False],PosVec[t]}],
TEST=="curve",
Show[{ParametricPlot3D[r[s],{s,-.01,t},PlotRange->WINDOW,Ticks->False]}],
TEST=="r & T",
Show[{PosVec[t],TanVec[t]},PlotRange->WINDOW,Ticks->False],
TEST=="T & curve",
Show[{ParametricPlot3D[r[s],{s,-.01,t},PlotRange->WINDOW,Ticks->False],TanVec[t]}],
TEST=="T & N",
Show[{TanVec[t],NorVec[t]},PlotRange->WINDOW,Ticks->False],
TEST=="T, N, & curve",
Show[{TanVec[t],NorVec[t],ParametricPlot3D[r[s],{s,-.01,t},PlotRange->WINDOW,Ticks->False]},PlotRange->WINDOW,Ticks->False],
TEST=="T, N, & B",
Show[{TanVec[t],NorVec[t],BiVec[t]},PlotRange->WINDOW,Ticks->False],
TEST=="T, N, B, & curve",
Show[{TanVec[t],NorVec[t],BiVec[t],ParametricPlot3D[r[s],{s,-.01,t},PlotRange->WINDOW,Ticks->False]},PlotRange->WINDOW,Ticks->False],
TEST=="kiss & curve",
Show[{KissingCircle[t],SpaceCurve[t]}],
TEST=="T, N, B, kiss, & curve",
Show[{TanVec[t],NorVec[t],BiVec[t],KissingCircle[t],ParametricPlot3D[r[s],{s,-.01,t},PlotRange->WINDOW,Ticks->False]},PlotRange->WINDOW,Ticks->False]
]
,
(*Manipulate Controllers*)
 Style["Space curves and the TNB System",Bold,12],(*Title*)
Style["",Plain,8],
{{TEST,"r & curve","Graph"},{"r","r & curve","curve","r & T","T & curve","T & N","T, N, & curve","T, N, & B","T, N, B, & curve","kiss & curve","T, N, B, kiss, & curve"}},
Evaluate[tRange],

(*Notes*)
Delimiter,
Style["",Plain,8],
Style["r: the position vector",Bold,8],
Style["T: the unit tangent vector",Plain,8],
Style["N: the unit normal vector",Plain,8],
Style["B: the binormal vector",Plain,8],
Style["curve: the space curve",Plain,8],
Style["kiss: the kissing circle",Plain,8],
ControlPlacement->Left
]

The Trefoil Knot

r[t_]={(2+Cos[(3/2)t])Cos[t],(2+Cos[(3/2)t])Sin[t],Sin[(3/2)t]};WINDOW={{-5.5,5.5},{-5.5,5.5},{-3,3}};tRange={t,0,24,0.2};xMin=0;

(*The Derivative Vector and Norm of the Derivative Vector*)
rprime[t_]=D[r[t],t];
normrprime[t_]=(Sqrt[Simplify[rprime[t].rprime[t]]]);

(*The Tangent Vector*)
tanvec[t_]=((rprime[t])/(normrprime[t]));
normtanvec[t_]=(Sqrt[tanvec[t].tanvec[t]]);
tanvecprime[t_]=D[tanvec[t],t];
normtanvecprime[t_]=(Sqrt[tanvecprime[t].tanvecprime[t]]);

(*The Normal Vector*)
normal[t_]=((tanvecprime[t])/(normtanvecprime[t]));

(*The Binormal Vector*)
binormal[t_]=Cross[tanvec[t],normal[t]];

(*The Curvature*)
κ[t_]=((normtanvecprime[t])/(normrprime[t]));

(*The Radius*)
radius[t_]=(1/(κ[t]));

(*The Osculating Circle*)
kissingcircle[t_,θ_]:=r[t]+normal[t] radius[t]+radius[t](tanvec[t] Cos[θ]+normal[t] Sin[θ]);

(*Graphing Functions*)
PosVec[t_]:=Graphics3D[{Black,Arrow[{{0,0,0},r[t]}]}];
TanVec[t_]:=Graphics3D[{Red,Arrow[{r[t],r[t]+tanvec[t]}]}];
NorVec[t_]:=Graphics3D[{Green,Arrow[{r[t],r[t]+normal[t]}]}];
BiVec[t_]:=Graphics3D[{Blue,Arrow[{r[t],r[t]+Cross[tanvec[t],normal[t]]}]}];
KissingCircle[t_]:=ParametricPlot3D[kissingcircle[t,θ],{θ,0,2π},PlotRange->WINDOW,Ticks->False];
SpaceCurve[t_]:=ParametricPlot3D[r[s],{s,xMin-0.1,t}];

Manipulate[

Which[
TEST=="r",
Show[PosVec[t],PlotRange->WINDOW,Ticks->False],
TEST=="r & curve",
Show[{ParametricPlot3D[r[s],{s,-.01,t},PlotRange->WINDOW,Ticks->False],PosVec[t]}],
TEST=="curve",
Show[{ParametricPlot3D[r[s],{s,-.01,t},PlotRange->WINDOW,Ticks->False]}],
TEST=="r & T",
Show[{PosVec[t],TanVec[t]},PlotRange->WINDOW,Ticks->False],
TEST=="T & curve",
Show[{ParametricPlot3D[r[s],{s,-.01,t},PlotRange->WINDOW,Ticks->False],TanVec[t]}],
TEST=="T & N",
Show[{TanVec[t],NorVec[t]},PlotRange->WINDOW,Ticks->False],
TEST=="T, N, & curve",
Show[{TanVec[t],NorVec[t],ParametricPlot3D[r[s],{s,-.01,t},PlotRange->WINDOW,Ticks->False]},PlotRange->WINDOW,Ticks->False],
TEST=="T, N, & B",
Show[{TanVec[t],NorVec[t],BiVec[t]},PlotRange->WINDOW,Ticks->False],
TEST=="T, N, B, & curve",
Show[{TanVec[t],NorVec[t],BiVec[t],ParametricPlot3D[r[s],{s,-.01,t},PlotRange->WINDOW,Ticks->False]},PlotRange->WINDOW,Ticks->False],
TEST=="kiss & curve",
Show[{KissingCircle[t],SpaceCurve[t]}],
TEST=="T, N, B, kiss, & curve",
Show[{TanVec[t],NorVec[t],BiVec[t],KissingCircle[t],ParametricPlot3D[r[s],{s,-.01,t},PlotRange->WINDOW,Ticks->False]},PlotRange->WINDOW,Ticks->False]
]
,
(*Manipulate Controllers*)
 Style["Space curves and the TNB System",Bold,12],(*Title*)
Style["",Plain,8],
{{TEST,"r & curve","Graph"},{"r","r & curve","curve","r & T","T & curve","T & N","T, N, & curve","T, N, & B","T, N, B, & curve","kiss & curve","T, N, B, kiss, & curve"}},
Evaluate[tRange],

(*Notes*)
Delimiter,
Style["",Plain,8],
Style["r: the position vector",Bold,8],
Style["T: the unit tangent vector",Plain,8],
Style["N: the unit normal vector",Plain,8],
Style["B: the binormal vector",Plain,8],
Style["curve: the space curve",Plain,8],
Style["kiss: the kissing circle",Plain,8],
ControlPlacement->Left
]