Two-dimensional

A two dimensional vector field associates a two-dimensional vector with each point in the plane (or a subset thereof). We may use the draw package to plot vector fields with Maxima.


\begin{lstlisting}[basicstyle={\ttfamily }]
load(draw);
\end{lstlisting}

Let us plot the 2D vector field $\mathbf{F}(x,y)=\langle \cos  y,x \rangle$.

The important parts of the following code are the first line where we specify that plotting should be done from -6 to 6 and in the vf2d line where we specify function values [cos(y),x] in the second list. The division by 6 in that same line is just to make the arrows smaller so that they may more easily be seen. The rest of the code is boilerplate and may be copied/pasted verbatim.


\begin{lstlisting}[basicstyle={\ttfamily }]
coord: setify(makelist(k,k,-4,4));
p...
...,k[2]),k,points2d);
apply(draw2d, append([color=blue], vect2));
\end{lstlisting}

See Figure BLANK.

Figure: A plot of the vector field $\mathbf{F}(x,y)=\langle \cos  y,x \rangle$
\includegraphics{vectorfield.eps}



G. Jay Kerns 2009-12-01