Curves In Space

Code

graphics[time_]:=(
v=r[time];
point={Blue,PointSize[0.02],Point[v]};vector=If[showVector,{Red,Thickness[0.008],Arrow[{{0,0,0},v}]},{}];Show[Graphics3D[{point,vector,Text[x,{3.2,0,0}],Text[y,{0,3.2,0}],Text[z,{0,0,3.2}]}],ParametricPlot3D[r[s],{s,parameterStart,time},PlotStyle->{Orange,Thickness[0.008]}],Axes->True,AxesOrigin->{0,0,0},PlotRange->{{-3,3},{-3,3},{-3,3}},Boxed->False,ViewPoint->{20,4,8}])

Graphics

Change r(t) below to change the curve plotted.
Use either one of the three names defined below,
or try your own equation!

toroidalSpiral[t_]:= {(2+Sin[3 t]) Cos[t], (2+Sin[3 t]) Sin[t], Cos[3 t]};
twistedCubic[t_]:={ t,t^3/18,t^2/3};
nonSmoothCurve[t_]:={t^4/30, t^3/10, t^2/5};

r[t_] := twistedCubic[t];
showVector=True;

(*Display Parameters*)
parameterStart=-3.1;

frames = Table[Image[graphics[t]],{t,-3,3,.25}];
ListAnimate[frames]

(*The animation for the example online is generated with
r[t_] := {t,t,2t^2};
showVector=True;
parameterStart = -1.2;
frames = Table[Image[Show[graphics[t],Plot3D[x^2+y^2,{x,-1.2,1.2},{y,-1.2,1.2},Mesh->None,PlotStyle->Opacity[0.5]]]],{t,-1.1,1.2,.1}];
ListAnimate[frames]

Different Parameterizations

Code

graphics[time_]:=(v1=r1[time];
v2 = r2[time];
point1={PointSize[0.02],Point[v1]};
point2 ={PointSize[0.02],Point[v2]};
vector1 = {Red,Thickness[0.008],Arrow[{{0,0,0},v1}]};
vector2 = {Blue,Thickness[0.008],Arrow[{{0,0,0},v2}]};
Show[Graphics3D[{point1,point2,vector1,vector2,Text[x,{3.2,0,0}],Text[y,{0,3.2,0}],Text[z,{0,0,3.2}]}],ParametricPlot3D[r1[s],{s,0,2 Pi},PlotStyle->{Orange,Thickness[0.008]}],Axes->True,AxesOrigin->{0,0,0},PlotRange->{{-3,3},{-3,3},{-3,3}},Boxed->False,ViewPoint->{20,4,8}])

Graphics

r1[t_] := {(2+Sin[3 t]) Cos[t], (2+Sin[3 t]) Sin[t], Cos[3 t]};
r2[t_] := r1[2 t];
frames = Table[Image[graphics[t]],{t,0,2Pi,Pi/24}];
ListAnimate[frames]

Export["13_1differentParameterizations.gif",frames,"DisplayDurations"->Table[1/12,{i,1,Length[frames]}]]