SetDirectory[NotebookDirectory[]]

Clear[OC]; OC[ff_,aa_]:=If[ff''[aa]==0,Line[{{aa,ff[aa]}-10{1,ff'[aa]},{aa,ff[aa]}+10{1,ff'[aa]}}],Circle[{aa,ff[aa]}+(((1+(((ff'[aa]))^2)))/(ff''[aa])){-ff'[aa],1},((((1+(((ff'[aa]))^2)))^(3/2))/(Abs[ff''[aa]]))]]

Clear[OCCe];OCCe[ff_,aa_]:=If[ff''[aa]==0,{100,100},{aa,ff[aa]}+(((1+(((ff'[aa]))^2)))/(ff''[aa])){-ff'[aa],1}]

OC[Sin[#]&,Pi]

OCCe[Sin[#]&,Pi/2]

figSinOCs=Plot[Sin[x],{x,-3Pi,3 Pi},PlotStyle->{{Thickness[0.004],RGBColor[0,0,.5]}},Prolog->{{GrayLevel[0.6],Thickness[0.001],Table[OC[Sin[#]&,x0],{x0,-8Pi,8Pi,(Pi/64)}]},
{RGBColor[0,0.5,0.5],PointSize[0.008],Table[Point[OCCe[Sin[#]&,x0]],{x0,-8Pi,8Pi,(Pi/128)}]}},PlotRange->{{-3Pi,3Pi},{-3Pi,3Pi}},Ticks->{Range[-3Pi,3Pi,(Pi/2)],Range[-3Pi,3Pi,(Pi/2)]},TicksStyle->Directive[Black,14],AspectRatio->Automatic,ImageSize->800]

(* Export["figSinOCs.png",figSinOCs]*)

Manipulate[Plot[Sin[x],{x,-3Pi,3 Pi},PlotStyle->{{Thickness[0.004],RGBColor[0,0,.5]}},Prolog->{{GrayLevel[0.7],Thickness[0.002],OC[Sin[#]&,x0]}},PlotRange->{{-3Pi,3Pi},{-3Pi,3Pi}},AspectRatio->Automatic],
{x0,-5Pi,5Pi,(Pi/64)}]

AniSinOCs=Table[Plot[Sin[x],{x,-3Pi,3 Pi},PlotStyle->{{Thickness[0.004],RGBColor[0,0,.5]}},Prolog->{{GrayLevel[0.6],Thickness[0.001],Table[OC[Sin[#]&,x0],{x0,-8Pi,Xend,(Pi/64)}]},
{RGBColor[0,0.5,0.5],PointSize[0.008],Table[Point[OCCe[Sin[#]&,x0]],{x0,-8Pi,Xend,(Pi/128)}]}},
Epilog->{{RGBColor[0,0.5,.5],Thickness[0.003],OC[Sin[#]&,Xend]}},
PlotRange->{{-3Pi,3Pi},{-3Pi,3Pi}},Ticks->{Range[-3Pi,3Pi,(Pi/2)],Range[-3Pi,3Pi,(Pi/2)]},TicksStyle->Directive[Black,14],AspectRatio->Automatic,ImageSize->800],{Xend,-4 Pi+(Pi/64),4 Pi,(Pi/16)}];

Length[%]

AniSinOCs[[67]]

(*  Export["AniSinOCs.gif",AniSinOCs,"GIF","AnimationRepetitions"->1,"ImageSize"->800,"DisplayDurations"->(((60/(Length[AniSinOCs])))&/@Range[Length[AniSinOCs]])]  *)

figSqOCs=Plot[(x^2),{x,-3,3},PlotStyle->{{Thickness[0.004],RGBColor[0,0,.5]}},Prolog->{{GrayLevel[0.8],Thickness[0.001],Table[OC[((#)^2)&,x0],{x0,-2,2,(1/64)}]}},Epilog-> {
{RGBColor[0,0.5,0.5],PointSize[0.01],Table[Point[OCCe[((#)^2)&,x0]],{x0,-5,5,(1/128)}]}},PlotRange->{{-3,3},{-1,4}},AspectRatio->Automatic,ImageSize->800]

(* Export["figSqOCs.png",figSqOCs] *)

AniSqOCs=Table[Plot[(x^2),{x,-3,3},PlotStyle->{{Thickness[0.004],RGBColor[0,0,.5]}},Prolog->{{GrayLevel[0.8],Thickness[0.001],Table[OC[((#)^2)&,x0],{x0,-2,Xend,(1/64)}]}},
Epilog-> {{RGBColor[0.0,0.5,0.5],Thickness[0.003],OC[((#)^2)&,Xend]},
{RGBColor[0,0.5,0.5],PointSize[0.01],Table[Point[OCCe[((#)^2)&,x0]],{x0,-5,Xend,(1/128)}]}},PlotRange->{{-3,3},{-1,4}},AspectRatio->Automatic,ImageSize->800],{Xend,-2,2,(1/32)}];

Length[%]

AniSqOCs[[56]]

(* Export["AniSqOCs.gif",AniSqOCs,"GIF","AnimationRepetitions"->1,"ImageSize"->800,"DisplayDurations"->(((60/(Length[AniSqOCs])))&/@Range[Length[AniSqOCs]])] *)

figCubeOCs=Plot[(x^3)-x,{x,-3,3},PlotStyle->{{Thickness[0.004],RGBColor[0,0,.5]}},Prolog->{{GrayLevel[0.8],Thickness[0.001],Table[OC[(((#)^3)-#)&,x0],{x0,-2,2,(1/64)}]}},Epilog-> {
{RGBColor[0,0.5,0.5],PointSize[0.01],Table[Point[OCCe[(((#)^3)-#)&,x0]],{x0,-5,5,(1/128)}]}},PlotRange->{{-3,3},{-3,3}},AspectRatio->Automatic,ImageSize->800]

(* Export["figCubeOCs.png",figCubeOCs] *)

AniCubeOCs=Table[Plot[(x^3)-x,{x,-3,3},PlotStyle->{{Thickness[0.004],RGBColor[0,0,.5]}},Prolog->{{GrayLevel[0.8],Thickness[0.001],Table[OC[(((#)^3)-#)&,x0],{x0,-2,Xend,(1/64)}]}},Epilog-> {
{RGBColor[0,0.5,0.5],Thickness[0.003],OC[(((#)^3)-#)&,Xend]},
{RGBColor[0.0,0.5,0.5],PointSize[0.01],Table[Point[OCCe[(((#)^3)-#)&,x0]],{x0,-5,Xend,(1/128)}]}},PlotRange->{{-3,3},{-3,3}},AspectRatio->Automatic,ImageSize->800],{Xend,-2,2,(1/32)}];

Length[AniCubeOCs]

AniCubeOCs[[23]]

(* Export["AniCubeOCs.gif",AniCubeOCs,"GIF","AnimationRepetitions"->1,"ImageSize"->800,"DisplayDurations"->(((60/(Length[AniCubeOCs])))&/@Range[Length[AniCubeOCs]])] *)