Directed Curves

Purpose:  Provides a wide variety of plotting and animation functions for illustrating the concepts of parameterized curves, position vectors, velocity vectors, and acceleration vectors.
Developer:  Dr Brad Kline, US Air Force Academy, CO 
File Name:  DirectedCurves.nb

Initialization Cells

\(BeginPackage["Graphics`CurvePlot`", \ "Graphics`Arrow`", \ 
      "Graphics`PlotField3D`"]; 

    
 (*\ Author : \ \ Bradford\ Kline\ *) 
 (*\ 
      Last\ \(Revision : \ \ June\ 1999\)\ *) 

Off[General::spell]; 

    Off[General::spell1]; 

Needs["Utilities`FilterOptions`"]
\)\(CombinedPlot::usage = 

      "CombinedPlot[{fx, fy, (fz)}, {t, tmin, tmax}, ({Fx, Fy, (Fz)}), ({x, y, (z)}),
(num), {Types}, options...] produces a directed parametric plot with x and y
(and optionally z) coordinates fx and fy (and fz) generated as functions
of t.  CombinedPlot displays num arrows/vectors along the curve.  The vector types are
entered into the list {Types} and may consist of any number of the types
{DirCur, Pos, Vel, Acc, Tan, Norm, Field}.  If the type 'Field' appears in the list {Types},
then the optional vector field {Fx, Fy, (Fz)} and list of independent variables
{x, y, (z)} must also appear as arguments.  The dimension of the coordinate
function list, the vector field, and the independent variable list must all agree.
The parameter num is optional and defaults to 5."; 


    CombinedAnimate::usage = 

      "CombinedAnimate[{fx, fy, (fz)}, {t, tmin, tmax}, ({Fx, Fy, (Fz)}), ({x, y, (z)}),
(num), {Types}, options...] generates a
sequence of num frames depicting the motion of an object traveling with
x and y (and optionally z) coordinates fx and fy (and fz) generated as functions of t.
CombinedAnimate displays num arrows/vectors along the curve as the animation
progresses.  The vector types are
entered into the list {Types} and may consist of any number of the types
{DirCur, Pos, Vel, Acc, Tan, Norm, Field}.  If the type 'Field' appears in the list {Types},
then the optional vector field {Fx, Fy, (Fz)} and list of independent variables
{x, y, (z)} must also appear as arguments.  The dimension of the coordinate
function list, the vector field, and the independent variable list must all agree.
The parameter num is optional and defaults to 5."; 


    DirectedCurvePlot::usage = 

      "DirectedCurvePlot[{fx, fy, (fz)}, {t, tmin, tmax}, (num), options...] produces a directed parametric plot with x and y (and optionally z) coordinates fx and fy
(and fz) generated as functions of t.  DirectedCurvePlot displays num direction arrows along the curve.  The parameter num is optional and defaults to 5."; 


    DirectedCurvePlot3D::usage\  = \ 
\ \ 
      "See usage of function DirectedCurvePlot."; 


    PositionPlot::usage = 

      "PositionPlot[{fx, fy, (fz)}, {t, tmin, tmax}, (num), options...] produces a parametric plot with x and y (and optionally z) coordinates fx and fy
(and fz) generated as functions of t.  PositionPlot displays num position vectors from the origin to various points along the curve.  The parameter num is optional and defaults to 5."; 
    

PositionPlot3D::usage\  = 
\ \ 
      "See usage of function PositionPlot."; 


    VelocityPlot::usage = 

      "VelocityPlot[{fx, fy, (fz)}, {t, tmin, tmax}, (num), options...] produces a directed parametric plot with x and y (and optionally z) coordinates fx and fy
(and fz) generated as functions of t.  VelocityPlot displays num velocity vectors along the curve.  The parameter num is optional and defaults to 5."; 


    VelocityPlot3D::usage = 
"See usage of function VelocityPlot."; 

    			
AccelerationPlot::usage = 

      "AccelerationPlot[{fx, fy, (fz)}, {t, tmin, tmax}, (num), options...] produces a directed parametric plot with x and y (and optionally z) coordinates fx and fy
(and fz) generated as functions of t.  AccelerationPlot displays num acceleration vectors along the curve.  The parameter num is optional and defaults to 5."; 


    AccelerationPlot3D::usage = 

      "See usage of function AccelerationPlot."; 


    AccCompPlot::usage = 

      "AccCompPlot[{fx, fy, (fz)}, {t, tmin, tmax}, (num), options...] produces a directed parametric plot with x and y (and optionally z) coordinates fx and fy
(and fz) generated as functions of t.  AccCompPlot displays num acceleration vectors along the curve, together with vectors representing the tangential and normal components
of acceleration.  The parameter num is optional and defaults to 5."; 


    AccCompPlot3D::usage = 
"See usage of function AccCompPlot."; 


    FieldCurvePlot::usage = 

      "FieldCurvePlot[{fx, fy, (fz)}, {t, tmin, tmax}, {Fx, Fy, (Fz)}, {x, y, (z)}, (num), options...] produces a directed plot with x and y (and optionally z) coordinates fx and fy (and fz) generated as functions of t, together with vectors from the vector field {Fx, Fy, (Fz)}, generated as functions of x and y (and z).  The function displays num field vectors along the curve.  The parameter num is optional and defaults to 5.  You may also enter {num1, num2} in place of (num) to specify num1 field vectors and num2 direction vectors along the curve.  The dimension of the coordinate
function list, the vector field, and the independent variable list must all agree."; 


    FieldCurvePlot3D::usage = 
"See usage of function FieldCurvePlot."; 
    

PositionAnimate::usage = 

      "PositionAnimate[{fx, fy, (fz)}, {t, tmin, tmax}, (num), options...] generates a
sequence of num frames depicting the motion of an object traveling with
x and y (and optionally z) coordinates fx and fy (and fz) generated as functions of t.
PositionAnimate displays
position vectors along the parametric curve as the animation progresses.
The parameter num is optional and defaults to 5."; 


    VelocityAnimate::usage = 

      "VelocityAnimate[{fx, fy, (fz)}, {t, tmin, tmax}, (num), options...] generates a
sequence of num frames depicting the motion of an object traveling with
x and y (and optionally z) coordinates fx and fy (and fz) generated as functions of t.
VelocityAnimate displays
velocity vectors along the parametric curve as the animation progresses.
The parameter num is optional and defaults to 5."; 


    AccelerationAnimate::usage = 

      "AccelerationAnimate[{fx, fy, (fz)}, {t, tmin, tmax}, (num), options...] generates a sequence of num frames depicting the motion of an object traveling with
x and y (and optionally z) coordinates fx and fy (and fz) generated as functions of t.  AccelerationAnimate displays
acceleration vectors along the parametric curve, together with vectors representing the
tangential and normal components of acceleration, as the animation progresses.
The parameter num is optional and defaults to 5."; 


    AccCompAnimate::usage = 

      "AccelerationAnimate[{fx, fy, (fz)}, {t, tmin, tmax}, (num), options...] generates a sequence of num frames depicting the motion of an object traveling with
x and y (and optionally z) coordinates fx and fy (and fz) generated as functions of t.  AccelerationAnimate displays
acceleration vectors along the parametric curve as the animation progresses.
The parameter num is optional and defaults to 5."; 


    FieldCurveAnimate::usage = 

      "FieldCurveAnimate[{fx, fy, (fz)}, {t, tmin, tmax}, {Fx, Fy, (Fz)}, {x, y, (z)}, (num), options...] generates a
sequence of num frames depicting the motion of an object traveling with
x and y (and optionally z) coordinates fx and fy (and fz) generated as functions of t.
FieldCurveAnimate displays
vectors from the field {Fx, Fy, (Fz)}, generated as functions of x and y (and z), along the parametric curve as the animation progresses.  The parameter num is optional and defaults to 5.
The dimension of the coordinate function list, the vector field, and the independent variable list
must all agree."; 

Begin["`Private`"]; 

    
 (*The\ following\ function\ redefines\ ParametricPlot\ so\ that\ it\ 
          automatically\ 
\ \ \ \ \ \ calls\ ParametricPlot3D\ if\ the\ input
          \ position\ vector\ is\ 3 - \(dimensional . \)*) 


    Unprotect[ParametricPlot]; 

    ParametricPlot[{xcoord_, ycoord_, zcoord_}, \ {t_, t0_, t1_}, \ 
        opts___Rule]\  := 

      ParametricPlot3D[{xcoord, ycoord, zcoord}, \ {t, t0, t1}, \ opts]\)\(Protect[ParametricPlot]; 

    
 (*\ List\ the\ options\ \(available . \)\ *) 


    Options[CombinedPlot]\  = \ 
      Flatten[{NOTICE -> "The following are defaults for 2-D curves", 
	
          Options[ParametricPlot], 
          NOTICE -> "The following are defaults for 3-D curves", 
	
          Options[ParametricPlot3D], 
          NOTICE -> "The following are defaults for 2-D vectors", 
	
          Options[Arrow], 
          NOTICE -> "The following are defaults for 3-D vectors", 
	
          Options[ListPlotVectorField3D]}]; 

    Options[CombinedAnimate]\  = \ Options[CombinedPlot]; 

    Options[DirectedCurvePlot]\  = \ Options[CombinedPlot]; 

    Options[PositionPlot]\  = \ Options[CombinedPlot]; 

    Options[VelocityPlot]\  = \ Options[CombinedPlot]; 

    Options[AccelerationPlot]\  = \ Options[CombinedPlot]; 

    Options[FieldCurvePlot]\  = \ Options[CombinedPlot]; 

    Options[PositionAnimate]\  = \ Options[CombinedPlot]; 

    Options[VelocityAnimate]\  = \ Options[CombinedPlot]; 

    Options[AccelerationAnimate]\  = \ Options[CombinedPlot]; 

    Options[FieldCurveAnimate]\  = \ Options[CombinedPlot]; 

    Options[Animate]\  = \ Options[CombinedPlot]; 

    
 (*MakeArrows\ returns\ an\ array\ of\ graphics\ arrows\ with

          DisplayFunction -> 
        Identity . \ \ MakeArrows\ makes\ use\ of\ the\ Standard
Packages\ 
          Graphics/Arrow . m\ and\ Graphics/PlotField3D . m . *) 



    MakeArrows[tail_, \ tip_, \ {t_, \ t0_, \ t1_}, \ num_, \ colorval_, \ 
        opts___]\  := 
\ \ \ 
      Module[{dimension, arrows, colorfun, x}, 
\ \ \ 
        dimension = Length[tail]; 

\ \ \ 
        Switch[dimension, 
	2, 
\ \ \ 
          Table[Graphics[{Hue[colorval], 
                Arrow[tail, tip, 
	Evaluate[FilterOptions[Arrow, opts]], 

                  \ \ \ \ \ \ \ \ HeadScaling -> Absolute, 
                  HeadWidth ->  .75]}], 

            	{t, t0 + \((t1 - t0)\)/\((2*num)\), t1, \((t1 - t0)\)/num}], 

          	3, 
\ \ \ 
          arrows = 
            Table[{tail, tip - tail}, {t, t0 + \((t1 - t0)\)/\((2*num)\), t1, 
                \((t1 - t0)\)/num}]; 
	colorfun[x_]\  := \ Hue[colorval]; 

          	ListPlotVectorField3D[arrows, 
	DisplayFunction -> Identity, 

            	Evaluate[FilterOptions[ListPlotVectorField3D, opts]], 
	
            ColorFunction -> colorfun, VectorHeads -> True]
	]
]
		\)\(PlotShell[position_, \ {t_, \ t0_, \ t1_}, \ vectorfield_List, 
        \ {x_, y_, z_}, 
\ \ \ num_Integer, \ type_String, \ opts___]\  := 

      \ \ \ Module[{curveplot, base, vector, temp, arrows, plotpoints, 
          plotrange, 
	shiftedposition, colorval, filtered}, 

\ \ \ 
        dimension = Length[position]; 
\ \ \ base = position; 
		
\ \ \ 
        Switch[type, 
	"DirCur", 
	
          Switch[dimension, 
	\ \ \ 2, 
	\ \ \ 
            plotpoints\  = \ 
              \(PlotPoints\  /. \ Flatten[{opts}]\)\  /. \ 
                Options[ParametricPlot]; 
	\ \ \ 
            plotrange\  = \ 
              FullOptions[
\ \ \ \ \ \ \ \ \ \ \ \ \ \ 
                ParametricPlot[position, \ {t, \ t0, \ t1}, 
		
                  DisplayFunction -> Identity, \ 

                  \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 
                  Evaluate[FilterOptions[ParametricPlot, opts]]], PlotRange], 
            
	\ \ \ 3, 
	\ \ \ 
            plotpoints\  = \ 
              \(PlotPoints\  /. \ Flatten[{opts}]\)\  /. PlotPoints -> 25; 

            	\ \ \ plotrange\  = \ 
              FullOptions[
\ \ \ \ \ \ \ \ \ \ \ \ \ \ 
                ParametricPlot3D[position, \ {t, \ t0, \ t1}, 
		
                  DisplayFunction -> Identity, 
		
                  Evaluate[FilterOptions[ParametricPlot3D, opts]]], PlotRange]
                
	]; 
	
          shiftedposition = 
            position /. 
              t -> \((t + \((t1 - t0)\)/\((20*\((plotpoints - 1)\))\))\); 
	
          If[dimension == 2, \ AppendTo[plotrange, {0, 0}]]; 
	
          vector\  = \ 
            Max[\((plotrange[\([1, 2]\)] - plotrange[\([1, 1]\)])\), 
		
                  \((plotrange[\([2, 2]\)] - plotrange[\([2, 1]\)])\), 
		
                  \((plotrange[\([3, 2]\)] - plotrange[\([3, 1]\)])\)]/
		
                \((\((130 - 40*dimension)\)*
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 
                    Sqrt[\((shiftedposition - position)\) . 
		
                        \((shiftedposition - position)\)])\)*
              \((shiftedposition\  - \ position)\); 
	colorval = 0.0, 

          			
	"Pos", 
	base = 0*position; 
	vector = position; 
          
	colorval = 0.1, 
			
	"Vel", 
	
          vector = D[position, t]; 
	colorval = 0.0, 
			
	"Acc", 
          
	vector = D[position, {t, 2}]; 
	colorval = 0.7, 

	
          "Tan", 
	
          vector = 
            \((D[position, t] . D[position, {t, 2}])\)/
                \((D[position, t] . D[position, t])\)\ *\ D[position, t]; 
	
          colorval = 0.9, 

	"Norm", 
	temp\  = \ base; 
	
          If[dimension == 2, AppendTo[temp, 0]]; 
	
          vector = 
            \((\((Cross[Cross[D[temp, t], D[temp, {t, 2}]], D[temp, t]])\) . 
                    
		D[temp, {t, 2}])\)/
		
                \((\((Cross[Cross[D[temp, t], D[temp, {t, 2}]], D[temp, t]])
                      \) . 
		\ 
                    \((Cross[Cross[D[temp, t], D[temp, {t, 2}]], D[temp, t]])
                      \))\)*
		
              Cross[Cross[D[temp, t], D[temp, {t, 2}]], D[temp, t]]; 
	
          If[dimension == 2, vector = {vector[\([1]\)], vector[\([2]\)]}]; 

          	colorval = 0.9, 
			
	"Field", 
	
          Switch[dimension, 
		2, 
		
            vector = 
              vectorfield /. {x -> position[\([1]\)], 
                  y -> position[\([2]\)]}, 
		3, 
		
            vector = 
              vectorfield /. {x -> position[\([1]\)], y -> position[\([2]\)], 
                  z -> position[\([3]\)]}]; 
	colorval = 0.8]; 

\ \ \ 
        curveplot\  = \ 
          ParametricPlot[position, \ {t, t0, t1}, 
		
            DisplayFunction -> Identity, 
		
            Evaluate[FilterOptions[ParametricPlot, opts]]]; \ \ 
\ \ \ 
        arrows\  = \ 
          MakeArrows[base, base + vector, {t, t0, t1}, num, colorval, opts]; 
        
\ \ \ 
\ \ \ Return[{curveplot, arrows}]
]
\)\(PlotShell[position_, \ {t_, \ t0_, \ t1_}, \ vectorfield_List, 
        \ {x_, y_, z_}, 
	num_Integer, \ type_List, \ opts___]\  := 

      \ \ \ \ Module[{plots, i, filtered}, 
	
        plots\  = \ 
          Table[PlotShell[position, \ {t, \ t0, \ t1}, \ vectorfield, \ 

              	{x, y, z}, \ num, \ ToString[type[\([i]\)]], 
	
              DisplayFunction -> Identity, \ opts], 
            \ {i, \ 1, \ Length[type]}]; 
	
        Switch[Length[position], 
	\ \ \ 2, 
	\ \ \ 
          filtered\  = \ FilterOptions[Graphics, opts], 
	\ \ \ 3, 

          	\ \ \ filtered\  = \ FilterOptions[Graphics3D, opts]]; 
	
        Show[plots, \ filtered, \ DisplayFunction -> $DisplayFunction]
]


    
 (*\ CombinedPlot\ *) 
\)\(CombinedPlot[position_, \ {t_, \ t0_, \ t1_}, \ vectorfield_List, 
        \ {x_, y_, z_}, 
	num_Integer, \ type_List, \ opts___]\  := 
\ \ \ 
      PlotShell[position, \ {t, \ t0, \ t1}, \ vectorfield, \ {x, y, z}, \ 
          num, \ type, \ opts] /; 
        NumberQ[N[t0]]\  && \ NumberQ[N[t1]]\  && \ IntegerQ[num]
\)\(CombinedPlot[position_, \ {t_, \ t0_, \ t1_}, \ vectorfield_List, 
        \ {x_, y_}, 
	num_Integer, \ type_List, \ opts___]\  := 
\ \ \ 
      CombinedPlot[position, \ {t, \ t0, \ t1}, \ vectorfield, \ {x, y, z}, \ 
        num, \ type, \ opts]
\)\(CombinedPlot[position_, \ {t_, \ t0_, \ t1_}, \ vectorfield_List, \ 
        vars_List, 
	type_List, \ opts___Rule]\  := 
\ \ \ 
      CombinedPlot[position, \ {t, \ t0, \ t1}, \ vectorfield, \ vars, 
	5, 
        \ type, \ opts]
\)\(CombinedPlot[position_, \ {t_, \ t0_, \ t1_}, \ num_Integer, \ 
        type_List, \ opts___Rule]\  := 
\ \ \ 
      CombinedPlot[position, \ {t, \ t0, \ t1}, \ {0, 0, 0}, \ {x, y, z}, \ 
        num, \ type, \ opts]
\)\(CombinedPlot[position_, \ {t_, \ t0_, \ t1_}, \ type_List, \ 
        opts___Rule]\  := 
\ \ \ 
      CombinedPlot[position, \ {t, \ t0, \ t1}, \ 5, \ type, \ opts]


    
 (*\ CombinedAnimate\ *) 
\)\(CombinedAnimate[position_, \ {t_, \ t0_, \ t1_}, \ vectorfield_List, \ 
        vars_List, \ 
\ \ \ \ num_Integer, \ type_List, \ opts___]\  := 

      \ \ \ 
      Module[{curveplot, \ arrows, \ particle, \ plotrange, \ a, dimension}, 
          
	dimension\  = \ Length[position]; 
	
          plotrange\  = \ 
            FullOptions[
\ \ \ \ \ \ \ \ 
              CombinedPlot[position, \ {t, t0, t1}, \ vectorfield, \ vars, 

                		num, \ type, \ DisplayFunction -> Identity, \ opts], 
              PlotRange]; 
	
          curveplot\  = \ 
            ParametricPlot[position, \ {t, t0, t1}, 
		
              DisplayFunction -> Identity, 
		
              Evaluate[FilterOptions[ParametricPlot, opts]]]; 
	
          Do[
	\ \ \ 
            a\  = \ t0\  + \ \((t1\  - \ t0)\)*\((2*j\  - \ 1)\)/\((2*num)\); 
            
	\ \ \ 
            Switch[dimension, 
		2, 
		
              particle\  = \ 
                Graphics[{PointSize[ .03], Point[position]}] /. t -> a, 
		
              3, 
		particle = 
                Graphics3D[{PointSize[ .03], Point[position]}] /. t -> a]; 

            	\ \ \ arrows\  = \ 
              CombinedPlot[position, 
                \ {t, t0, a + \((t1 - t0)\)/\((2*num)\)}, 
		vectorfield, 
                \ vars, \ j, \ type, 
		DisplayFunction -> Identity, \ 
                opts]; 
	
            Show[arrows, \ curveplot, \ particle, \ PlotRange -> plotrange, \ 
              
\ \ \ \ \ \ \ \ 	DisplayFunction -> $DisplayFunction], 
            \ {j, 1, num}]
\ \ ] /; 
        NumberQ[N[t0]]\  && \ NumberQ[N[t1]]\  && \ IntegerQ[num]
\)\(CombinedAnimate[position_, \ {t_, \ t0_, \ t1_}, \ vectorfield_List, 
        \ {x_, y_}, 
	num_Integer, \ type_List, \ opts___]\  := 
\ \ \ 
      CombinedAnimate[position, \ {t, \ t0, \ t1}, \ vectorfield, 
        \ {x, y, z}, \ num, \ type, \ opts]
\)\(CombinedAnimate[position_, \ {t_, \ t0_, \ t1_}, \ vectorfield_List, \ 
        vars_List, 
	type_List, \ opts___Rule]\  := 
\ \ \ 
      CombinedAnimate[position, \ {t, \ t0, \ t1}, \ vectorfield, \ vars, 
	
        5, \ type, \ opts]
\)\(CombinedAnimate[position_, \ {t_, \ t0_, \ t1_}, \ num_Integer, \ 
        type_List, \ opts___Rule]\  := 
\ \ \ 
      CombinedAnimate[position, \ {t, \ t0, \ t1}, \ {0, 0, 0}, \ {x, y, z}, 
        \ num, \ type, \ opts]
\)\(CombinedAnimate[position_, \ {t_, \ t0_, \ t1_}, \ type_List, \ 
        opts___Rule]\  := 
\ \ \ 
      CombinedAnimate[position, \ {t, \ t0, \ t1}, \ 5, \ type, \ opts]


    
 (*\ 2 - D\ commands\ *) 

 (*\ DirectedCurvePlot\ *) 
\)\(DirectedCurvePlot[position_, \ {t_, \ t0_, \ t1_}, \ num_Integer, \ 
        opts___Rule]\  := \ 
\ \ \ 
      CombinedPlot[position, \ {t, t0, t1}, \ num, \ {"DirCur"}, \ 
          opts] /; NumberQ[N[t0]]\  && \ NumberQ[N[t1]]\  && \ IntegerQ[num]

    \)\(DirectedCurvePlot[position_, \ tRange_List, \ opts___Rule]\  := 
\ \ \ 
      DirectedCurvePlot[position, \ tRange, \ 5, \ opts]


    
 (*\ PositionPlot\ *) 
\)\(PositionPlot[position_, \ {t_, \ t0_, \ t1_}, \ num_Integer, \ opts___]
        \  := 
\ \ \ 
      CombinedPlot[position, \ {t, t0, t1}, \ num, \ {"Pos"}, \ opts] /; 
        NumberQ[N[t0]]\  && \ NumberQ[N[t1]]\  && \ IntegerQ[num]
	\)\(PositionPlot[position_, \ tRange_List, \ opts___Rule]\  := 
\ \ \ 
      PositionPlot[position, \ tRange, \ 5, \ opts]


    
 (*\ VelocityPlot\ *) 
\)\(VelocityPlot[position_, \ {t_, \ t0_, \ t1_}, \ num_Integer, \ opts___]
        \  := \ \ 
\ \ \ 
      CombinedPlot[position, \ {t, t0, t1}, \ num, \ {"Vel"}, \ opts] /; 
        NumberQ[N[t0]]\  && \ NumberQ[N[t1]]\  && \ IntegerQ[num]
		\)\(VelocityPlot[position_, \ tRange_List, \ opts___Rule]\  := 
\ \ \ 
      VelocityPlot[position, \ tRange, \ 5, \ opts]


    
 (*\ AccelerationPlot\ *) 
\)\(AccelerationPlot[position_, \ {t_, \ t0_, \ t1_}, \ num_Integer, \ 
        opts___]\  := \ 
\ \ \ 
      CombinedPlot[position, \ {t, t0, t1}, \ num, \ {"Acc"}, \ opts] /; 
        NumberQ[N[t0]]\  && \ NumberQ[N[t1]]\  && \ IntegerQ[num]
\)\(AccelerationPlot[position_, \ tRange_List, \ opts___Rule]\  := 
\ \ \ 
      AccelerationPlot[position, \ tRange, \ 5, \ opts]


    
 (*\ AccCompPlot\ *) 
\)\(AccCompPlot[position_, \ {t_, \ t0_, \ t1_}, \ num_Integer, \ opts___]
        \  := \ 
\ \ \ 
      CombinedPlot[position, \ {t, t0, t1}, \ num, 
          \ {"Acc", \ "Tan", \ "Norm"}, \ opts] /; 
        NumberQ[N[t0]]\  && \ NumberQ[N[t1]]\  && \ IntegerQ[num]
\)\(AccCompPlot[position_, \ tRange_List, \ opts___Rule]\  := 
\ \ \ 
      AccCompPlot[position, \ tRange, \ 5, \ opts]


    
 (*\ FieldCurvePlot\ *) 
\)\(FieldCurvePlot[position_, \ {t_, \ t0_, \ t1_}, 
\ \ \ \ vectorfield_, 
        \ {x_, y_, z_}, \ {num1_Integer, \ num2_Integer}, \ opts___]\  := \ 

      \ \ \ Module[{plot1, plot2, filtered}, 
	
          plot1 = CombinedPlot[position, \ {t, t0, t1}, \ vectorfield, 
              \ {x, y, z}, 
		num1, \ {"Field"}, \ 
              DisplayFunction -> Identity, \ opts]; 
	
          plot2 = CombinedPlot[position, \ {t, t0, t1}, \ num2, 
              \ {"DirCur"}, 
\ \ \ \ \ \ \ \ 	
              DisplayFunction -> Identity, \ opts]; 
	
          Switch[Length[position], 
	\ \ \ 2, 
	\ \ \ 
            filtered\  = \ FilterOptions[Graphics, opts], 
	\ \ \ 3, 

            	\ \ \ filtered\  = \ FilterOptions[Graphics3D, opts]]; 
	
          Show[plot1, plot2, filtered, DisplayFunction -> $DisplayFunction]
            
] /; NumberQ[N[t0]]\  && \ NumberQ[N[t1]]\  && \ 
          IntegerQ[num1]\  && \ IntegerQ[num2]
\)\(FieldCurvePlot[position_, \ {t_, \ t0_, \ t1_}, \ vectorfield_List, 
        \ {x_, y_}, 
	{num1_Integer, \ num2_Integer}, \ opts___Rule]\  := 

      FieldCurvePlot[position, \ {t, \ t0, \ t1}, \ vectorfield, \ {x, y, z}, 
        
	{num1, \ num2}, \ opts]
\ \)\(FieldCurvePlot[position_, \ tRange_List, \ vectorfield_, \ vars_List, 

        	num1_Integer, \ opts___Rule]\  := 
\ \ \ 
      FieldCurvePlot[position, \ tRange, \ vectorfield, \ vars, \ {num1, 3}, 
        \ opts]
		\)\(FieldCurvePlot[position_, \ tRange_List, \ vectorfield_, \ vars_List, \ 
        
\ \ \ \ opts___Rule]\  := 
\ \ \ 
      FieldCurvePlot[position, \ tRange, \ vectorfield, \ vars, \ {5, 3}, \ 
        opts]


 (*\ PositionAnimate\ *) 
\)\(PositionAnimate[position_, \ {t_, \ t0_, \ t1_}, \ num_Integer, \ 
        opts___] := 
\ \ \ 
      CombinedAnimate[position, \ {t, \ t0, \ t1}, \ num, \ {"Pos"}, \ 
          opts] /; NumberQ[N[t0]]\  && \ NumberQ[N[t1]]\  && \ IntegerQ[num]

    \)\(PositionAnimate[position_, \ tRange_List, \ opts___Rule]\  := 
\ \ \ 
      PositionAnimate[position, \ tRange, \ 5, \ opts]


    
 (*\ VelocityAnimate\ *) 
\)\(VelocityAnimate[position_, \ {t_, \ t0_, \ t1_}, \ num_Integer, \ 
        opts___]\  := 
\ \ \ 
      CombinedAnimate[position, \ {t, \ t0, \ t1}, \ num, \ {"Vel"}, \ 
          opts] /; NumberQ[N[t0]]\  && \ NumberQ[N[t1]]\  && \ IntegerQ[num]

    \)\(VelocityAnimate[position_, \ tRange_List, \ opts___Rule]\  := 
\ \ \ 
      VelocityAnimate[position, \ tRange, \ 5, \ opts]


    
 (*\ AccelerationAnimate\ *) 
\)\(AccelerationAnimate[position_, \ {t_, \ t0_, \ t1_}, \ num_Integer, \ 
        opts___]\  := 
\ \ \ 
      CombinedAnimate[position, \ {t, \ t0, \ t1}, \ num, \ {"Acc"}, \ 
          opts] /; NumberQ[N[t0]]\  && \ NumberQ[N[t1]]\  && \ IntegerQ[num]

    \)\(AccelerationAnimate[position_, \ tRange_List, \ opts___Rule]\  := 

      \ \ \ AccelerationAnimate[position, \ tRange, \ 5, \ opts]


    
 (*\ AccCompAnimate\ *) 
\)\(AccCompAnimate[position_, \ {t_, \ t0_, \ t1_}, \ num_Integer, \ 
        opts___]\  := 
\ \ \ 
      CombinedAnimate[position, \ {t, \ t0, \ t1}, \ num, 
          \ {"Acc", \ "Tan", \ "Norm"}, \ opts] /; 
        NumberQ[N[t0]]\  && \ NumberQ[N[t1]]\  && \ IntegerQ[num]
\)\(AccCompAnimate[position_, \ tRange_List, \ opts___Rule]\  := 
\ \ \ 
      AccCompAnimate[position, \ tRange, \ 5, \ opts]


    
 (*\ FieldCurveAnimate\ *) 
\)\(FieldCurveAnimate[position_, \ {t_, \ t0_, \ t1_}, 
\ \ \ \ 
        vectorfield_, \ vars_List, \ {num1_Integer, \ num2_Integer}, \ 
        opts___]\  := \ 
\ \ \ \ 
      CombinedAnimate[position, \ {t, \ t0, \ t1}, \ vectorfield, \ vars, \ 
          num1, \ 
\ \ \ \ {"DirCur", \ "Field"}, \ opts] /; 
        NumberQ[N[t0]]\  && \ NumberQ[N[t1]]\  && \ IntegerQ[num1]\  && \ 
          IntegerQ[num2]
\)\(FieldCurveAnimate[position_, \ tRange_List, \ vectorfield_, \ 
        vars_List, \ num1_Integer, \ 
\ \ \ \ opts___Rule]\  := 
\ \ \ 
      FieldCurveAnimate[position, \ tRange, \ vectorfield, \ vars, 
        \ {num1, 3}, \ opts]
		\)\(FieldCurveAnimate[position_, \ tRange_List, \ vectorfield_, \ 
        vars_List, \ 
\ \ \ \ opts___Rule]\  := 
\ \ \ 
      FieldCurveAnimate[position, \ tRange, \ vectorfield, \ vars, \ {5, 3}, 
        \ opts]

\)DirectedCurvePlot3D  :=  DirectedCurvePlotPositionPlot3D  :=  PositionPlotVelocityPlot3D  :=  VelocityPlotAccelerationPlot3D  :=  AccelerationPlotAccCompPlot3D  :=  AccCompPlot\(FieldCurvePlot3D\  := \ FieldCurvePlot
\)\(End[\ ]; 

EndPackage[\ ]\)

The initialization cells in this notebook define a package that facilitates plotting of various directed curves in the xy-plane.  The package defines six plotting functions:  DirectedCurvePlot, PositionPlot, VelocityPlot, AccelerationPlot, AccCompPlot, and FieldCurvePlot, together with animated counterparts for the latter five:  PositionAnimate, VelocityAnimate, AccelerationAnimate, AccCompAnimate, and FieldCurveAnimate.  The package defines a "smart" version of the standard Mathematica function ParametricPlot that automatically calls ParametricPlot3D if the input parameterization is 3-dimensional.  The five plotting functions work exactly in the same manner as ParametricPlot and ParametricPlot3D, except that they also display various direction arrows along the parameterized curve.  The four animation functions work in the same manner as their plotting counterparts, except that they generate a sequence of plots--one for each displayed vector.  All of the above functions call two "master" functions:  CombinedPlot and CombinedAnimate, which, while less user-friendly than the specific functions above, provide the user more versatile combinations of vectors.

ParametricPlot is modified to call either ParametricPlot or ParametricPlot3D, depending on the dimension of the input vector.

DirectedCurvePlot displays short arrows along the parametric curve that merely indicate the direction of traversal.  The arrows do not rely on any differentiability properties of the curve.

PositionPlot and PositionAnimate display the parametric curve together with position vectors based at the origin pointing to various positions along the curve.

VelocityPlot and VelocityAnimate display the parametric curve together with velocity vectors based along the curve.  The curve must be differentiable along its entire length.

AccelerationPlot and AccelerationAnimate display the parametric curve together with acceleration vectors based along the curve.  The curve must be twice-differentiable along its entire length.

AccCompPlot and AccCompAnimate display the parametric curve together with acceleration vectors and the tangential and normal components of acceleration based along the curve.  The curve must be twice-differentiable along its entire length.

FieldCurvePlot and FieldCurveAnimate display the parametric curve together with vectors from a chosen vector field based along the curve.

CombinedPlot and CombinedAnimate display the parametric curve together with any number of the various vector options given by the functions above.

A "smart" ParametricPlot

ParametricPlot has been slightly modified to accommodate either 2- or 3-dimensional input vectors.  If the input vector is 2-dimensional, ParametricPlot works in exactly the same manner as the standard Mathematica version:

ParametricPlot[{Sin[t], Cos[t]}, {t, 0, 2  Pi}, 
      AspectRatio -> Automatic, AxesLabel -> {"x", "y"}];

If, on the other hand, the input curve is 3-dimensional, ParametricPlot works in the same manner as the standard Mathematica function ParametricPlot3D.  Note that, in this case, ParametricPlot accepts the same options as does ParametricPlot3D:

ParametricPlot[{Sin[t], Cos[t], Cos[t]}, {t, 0, 2  Pi}, 
      AspectRatio -> Automatic, AxesLabel -> {"x", "y", "z"}, 
      ViewPoint -> {1.861,  2.824,  0.110}];

DirectedCurvePlot

Evaluate the following for a brief description of the syntax for DirectedCurvePlot:

?DirectedCurvePlot

Here is the unit circle traversed counter-clockwise:

DirectedCurvePlot[{Cos[t], Sin[t]}, {t, 0, 2 Pi}];

DirectedCurvePlot allows inclusion of the same options available for ParametricPlot:

DirectedCurvePlot[{Cos[t], Sin[t]}, {t, 0, 2 Pi}, 
      AspectRatio -> Automatic, AxesLabel -> {"x", "y"}];

We may also enter options for the displayed arrows.  The options available are the same as those for the standard add-on package `Arrow`.  DirectedCurvePlot filters all options so that curve options are applied to the curve and arrow options are applied to the arrows:

DirectedCurvePlot[{Cos[t], Sin[t]}, {t, 0, 2 Pi}, 
      AspectRatio -> Automatic, HeadWidth ->  .4, 
      AxesLabel -> {"x", "y"}];

The number of arrows defaults to 5.  We can change the number of arrows by entering an integer immediately following the domain of t-values:

DirectedCurvePlot[{Cos[t], Sin[t]}, {t, 0, 2  Pi}, 20, 
      AspectRatio -> Automatic, AxesLabel -> {"x", "y"}];

If we enter the t-values in reverse order, Mathematica traverses the curve in the opposite direction.  DirectedCurvePlot indicates such a "reverse-time" traversal:

DirectedCurvePlot[{Cos[t], Sin[t]}, {t, 2  Pi, 0}, 
      AspectRatio -> Automatic, AxesLabel -> {"x", "y"}];

DirectedCurvePlot does not require differentiability of the parameterized curve:

DirectedCurvePlot[{t, Abs[t]}, {t, -2, 2}, 6, 
      AspectRatio -> Automatic, AxesLabel -> {"x", "y"}];

DirectedCurvePlot also handles 3-dimensional input curves (in this case, the options for the arrows are the same as those for the standard add-on function ListPlotVectorField3D from the package `PlotField3D`):

DirectedCurvePlot[{Cos[t], Sin[t], t}, {t, 0, 2  Pi}];

DirectedCurvePlot allows inclusion of the same options that are available for ParametricPlot3D:

DirectedCurvePlot[{Cos[t], Sin[t], t}, {t, 0, 2 Pi}, Boxed -> False, 
      Axes -> None, ViewPoint -> {0.975,  -0.197,  3.234}];

The number of arrows defaults to 5.  We can change the number of arrows by entering an integer immediately following the domain of t-values:

DirectedCurvePlot[{Cos[t], Sin[t], t}, {t, 0, 2 Pi}, 17, 
      Boxed -> False, Axes -> None, 
      ViewPoint -> {0.975,  -0.197,  3.234}];

We may easily combine plots of vector fields with directed curve plots:

\(Needs["Graphics`PlotField`"]
\)\(f[x_, y_]\  = \ {\(-y\), x}; 

    fieldplot = 
      PlotVectorField[f[x, y], {x, \(-2\), 2}, {y, \(-2\), 2}, Axes -> True, 
        AxesLabel -> {"x", "y"}]; 

    curveplot = 
      DirectedCurvePlot[{Cos[t], Sin[t]}, {t, 0, 2  Pi}, 
        AspectRatio -> Automatic]; 
Show[fieldplot, curveplot]; \)

PositionPlot

Evaluate the following for a brief description of the syntax for PositionPlot:

?PositionPlot

PositionPlot displays a parametric curve in the xy-plane together with a number of position vectors pointing from the origin to various positions along the curve:

PositionPlot[{Cos[t], Sin[t]}, {t, 0, 2  Pi}];

We may enter the same options for PositionPlot that are available for ParametricPlot:

PositionPlot[{Cos[t], Sin[t]}, {t, 0, 2  Pi}, 
      AspectRatio -> Automatic, AxesLabel -> {"x", "y"}];

The number of displayed vectors defaults to 5.  We can specify the number of vectors by entering an optional integer immediately following the domain of t-values:

PositionPlot[{Cos[t], Sin[t]}, {t, 0, 2  Pi}, 25, 
      AspectRatio -> Automatic, AxesLabel -> {"x", "y"}];

PositionPlot also handles 3-dimensional input curves.  (Note:  Arrowheads are scaled to match the size of the vector by ListPlotVectorField3D in the standard package PlotField3D.)

PositionPlot[{Cos[t], Sin[t], t}, {t, 0, 2  Pi}, 8, 
      AspectRatio -> Automatic, AxesLabel -> {"x", "y", "z"}];

VelocityPlot

Evaluate the following for a brief description of the syntax for VelocityPlot:

?VelocityPlot

VelocityPlot works much the same way as does DirectedCurvePlot, except that mere direction arrows along the curve are replaced with velocity vectors:

VelocityPlot[{Cos[t], Sin[t]}, {t, 0, 2  Pi}];

The number of displayed velocity vectors defaults to 5.  Again, we can specify the number of vectors by entering an optional integer immediately following the domain of t-values:

VelocityPlot[{Cos[t], Sin[t]}, {t, 0, 2  Pi}, 25];

We may enter the same options for VelocityPlot that are available for ParametricPlot:

VelocityPlot[{Cos[t], Sin[t]}, {t, 0, 2  Pi}, 25, 
      AspectRatio -> Automatic, AxesLabel -> {"x", "y"}];

VelocityPlot also handles 3-dimensional input curves:

VelocityPlot[{Cos[t], Sin[t], t}, {t, 0, 2  Pi}, 8];

VelocityPlot may be used to show the varying speed of an object along its path of travel:

VelocityPlot[{Cos[Sqrt[t]], Sin[Sqrt[t]]}, {t, 0, (Pi)^2}, 10, 
      AspectRatio -> Automatic, AxesLabel -> {"x", "y"}];

AccelerationPlot

Evaluate the following for a brief description of the syntax for AccelerationPlot:

?AccelerationPlot

AccelerationPlot works exactly the same way as does VelocityPlot, except that the velocity vectors are replaced with acceleration vectors:

AccelerationPlot[{Cos[t/2], Sin[t/2]}, {t, 0, 4  Pi}, 10, 
      AspectRatio -> Automatic, AxesLabel -> {"x", "y"}];

AccelerationPlot handles 3-dimensional input curves:

AccelerationPlot[{Cos[t], Sin[t], t}, {t, 0, 2  Pi}, 8, 
      ViewPoint -> {2.034,  2.703,  -0.093}];

VelocityPlot and AccelerationPlot may be used together.  (For a more compact method of accomplishing this, see the section on CombinedPlot.)

\(velocity = 
      VelocityPlot[{Cos[Sqrt[t]], Sin[Sqrt[t]]}, {t, 0, \((Pi)\)^2}, 10, 
        AspectRatio -> Automatic, AxesLabel -> {"x", "y"}]; 

    acceleration = 
      AccelerationPlot[{Cos[Sqrt[t]], Sin[Sqrt[t]]}, {t, 0, \((Pi)\)^2}, 10, 
        AspectRatio -> Automatic, AxesLabel -> {"x", "y"}]; 

    Show[velocity, acceleration]; \)

AccCompPlot

Evaluate the following for a brief description of the syntax for AccCompPlot:

?AccCompPlot

AccCompPlot is identical to AccelerationPlot, except that the tangential and normal components of acceleration are also included:

AccCompPlot[{t, t^2}, {t, 0, 1}, AspectRatio -> Automatic, 
      AxesLabel -> {"x", "y"}, PlotRange -> All];

Keep in mind that certain parameterizations yield 0 tangential or normal components of acceleration.  In this case, it will appear that AccCompPlot has failed to work properly:

AccCompPlot[{Cos[t/2], Sin[t/2]}, {t, 0, 2  Pi}, 8, 
      AspectRatio -> Automatic, AxesLabel -> {"x", "y"}, 
      PlotRange -> All];

AccCompPlot handles 3-dimensional input curves:

AccCompPlot[{Cos[Sqrt[t]], Sin[Sqrt[t]], t}, {t, 0, Pi/2}, 
      ViewPoint -> {2.034,  2.703,  -0.093}, PlotRange -> All];

FieldCurvePlot

Evaluate the following for a brief description of the syntax for FieldCurvePlot:

?FieldCurvePlot

The following cell plots the unit circle together with 5 vectors of the vector field f[x,y] = {y,x}.  (Note that we must enter a vector of independent variables into FieldCurvePlot.  These independent variables must be the same as those in the definition of the vector field.)

\(Clear[f, x, y]; 
f[x_, y_] = {y, x}; 

    FieldCurvePlot[{Cos[t], Sin[t]}, {t, 0, 2  Pi}, f[x, y], {x, y}]; \)

We may add any options allowable in ParametricPlot:

\(Clear[f, x, y]; 
f[x_, y_] = {y, x}; 

    FieldCurvePlot[{Cos[t], Sin[t]}, {t, 0, 2  Pi}, f[x, y], {x, y}, 
      AxesLabel -> {"x", "y"}, AspectRatio -> Automatic]; \)

We may also add an optional integer following the list of independent variables to change the number of vectors displayed:

\(Clear[f, x, y]; 
f[x_, y_] = {y, x}; 

    FieldCurvePlot[{Cos[t], Sin[t]}, {t, 0, 2  Pi}, f[x, y], {x, y}, 25, 
      AxesLabel -> {"x", "y"}, AspectRatio -> Automatic]; \)

If we desire more direction vectors, we enter a list of integers:

\(Clear[f, x, y]; 
f[x_, y_] = {y, x}; 

    FieldCurvePlot[{Cos[t], Sin[t]}, {t, 0, 2  Pi}, f[x, y], {x, y}, {25, 7}, 
      AxesLabel -> {"x", "y"}, AspectRatio -> Automatic]; \)

FieldCurvePlot also works for 3-dimensional input curves.  Note however that all three vectors (the parametrized curve, the vector field, and the independent variable list) must all have dimension 3:

\(Clear[f, x, y, z]; 
f[x_, y_, z_] = {y, \(-x\), 0}; 

    FieldCurvePlot[{Cos[t], Sin[t], t}, {t, 0, 2  Pi}, 
      f[x, y, z], {x, y, z}, {25, 7}, 
      AxesLabel -> {"x", "y", "z"}, AspectRatio -> Automatic]; 
    \)

We may also add a plot of the "entire" vector field.  However, note that PlotVectorField scales the vectors to a smaller size:

\(Needs["Graphics`PlotField3D`"]
\)\(Clear[f, x, y, z]; 
f[x_, y_, z_] = {y, \(-x\), 0}; 

    curveplot = 
      FieldCurvePlot[{Cos[t], Sin[t], t}, {t, 0, 2  Pi}, 
        f[x, y, z], {x, y, z}, 25, AxesLabel -> {"x", "y", "z"}, 
        AspectRatio -> Automatic]; 

    fieldplot = 
      PlotVectorField3D[
        f[x, y, z], {x, \(-2\), 2}, {y, \(-2\), 2}, {z, 0, 7}]; 

    Show[curveplot, fieldplot, ViewPoint -> {2.034, \ 2.703, \ \(-0.093\)}]; 
    \)

Animation Functions

Each of the latter five plotting functions above has an animation counterpart.  The syntax for each of the animation functions is exactly the same as that of its plotting counterpart.  Here are four examples:

PositionAnimate[{Cos[t], Sin[t]}, {t, 0, 2  Pi}, 12, 
      AspectRatio -> Automatic, AxesLabel -> {"x", "y"}];

VelocityAnimate[{Cos[t], Sin[t]}, {t, 0, 2  Pi}, 12, 
      AspectRatio -> Automatic, AxesLabel -> {"x", "y"}];

AccelerationAnimate[{Cos[t], Sin[t]}, {t, 0, 2  Pi}, 12, 
      AspectRatio -> Automatic, AxesLabel -> {"x", "y"}];

FieldCurveAnimate[{Cos[t], Sin[t]}, {t, 0, 2  Pi}, {y, x}, {x, y}, 
      12, AspectRatio -> Automatic, AxesLabel -> {"x", "y"}];

The animation functions extend to 3 dimensions as well:

VelocityAnimate[{Cos[t], Cos[t], Sin[t]}, {t, 0, 2  Pi}, 12, 
      AspectRatio -> Automatic, AxesLabel -> {"x", "y", "z"}];

CombinedPlot and CombinedAnimate

CombinedPlot and CombinedAnimate are the "master" functions of the CurvePlot package.  While somewhat less user-friendly than the other, more specialized functions, CombinedPlot and CombinedAnimate allow the user to combine any number of the different types of vectors in the same plot or animation sequence.

Evaluate the following for a brief description of the syntax of CombinedPlot:

?CombinedPlot

CombinedPlot may be used to generate a VelocityPlot, for example.  The syntax is the same as that of VelocityPlot, with the one exception that the Type "Vel" must be included in a list immediately following the optional parameter num.  The Type "Vel" must be enclosed in braces, as CombinedPlot expects a list of Types:

CombinedPlot[{Cos[t/2], Sin[t/2]}, {t, 0, 2  Pi}, 10, {Vel}, 
      AspectRatio -> Automatic, AxesLabel -> {"x", "y"}];

A simple change of the Type "Vel" to the Type "Acc" replaces velocity vectors with acceleration vectors:

CombinedPlot[{Cos[t/2], Sin[t/2]}, {t, 0, 2  Pi}, 10, {Acc}, 
      AspectRatio -> Automatic, AxesLabel -> {"x", "y"}];

The true power of CombinedPlot is that it allows us to display a number of different vectors together in the same plot without having to call several different specialized functions.  For example, earlier it was noted that we could plot velocity vectors and acceleration vectors together using the following three commands:

\(velocity = 
      VelocityPlot[{Cos[Sqrt[t]], Sin[Sqrt[t]]}, {t, 0, \((Pi)\)^2}, 10, 
        AspectRatio -> Automatic, AxesLabel -> {"x", "y"}]; 

    acceleration = 
      AccelerationPlot[{Cos[Sqrt[t]], Sin[Sqrt[t]]}, {t, 0, \((Pi)\)^2}, 10, 
        AspectRatio -> Automatic, AxesLabel -> {"x", "y"}]; 

    Show[velocity, acceleration]; \)

We may accomplish the same objective using CombinedPlot with the two Types "Vel" and "Acc":

CombinedPlot[{Cos[Sqrt[t]], Sin[Sqrt[t]]}, {t, 0, (Pi)^2}, 
      10, {Vel, Acc}, AspectRatio -> Automatic, 
      AxesLabel -> {"x", "y"}];

CombinedPlot allows us to plot as many vectors together as we desire:

CombinedPlot[{Cos[Sqrt[t]], Sin[Sqrt[t]]}, {t, 0, (Pi)^2}, 
      10, {Vel, Acc, Pos, DirCur}, AspectRatio -> Automatic, 
      AxesLabel -> {"x", "y"}];

If the Type "Field" is included in the list, then a vector field and the independent variables must also be included after the domain of parameter values:

CombinedPlot[{Cos[Sqrt[t]], Sin[Sqrt[t]]}, {t, 0, (Pi)^2}, {y, 
        x}, {x, y}, 10, {Vel, Field}, AspectRatio -> Automatic, 
      AxesLabel -> {"x", "y"}];

The syntax for CombinedAnimate is exactly the same as that for CombinedPlot:

?CombinedAnimate

CombinedAnimate provides the only reasonable method of animating several different vectors together:

CombinedAnimate[{Cos[Sqrt[t]], Sin[Sqrt[t]]}, {t, 0, (Pi)^2}, 
      10, {Vel, Acc}, AspectRatio -> Automatic, 
      AxesLabel -> {"x", "y"}];