11.07.2015 Views

Advanced Programming Guide

Advanced Programming Guide

Advanced Programming Guide

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

256 • Chapter 6: <strong>Programming</strong> with Maple Graphics6.6 Vector Field PlotsThis section describes the problem of plotting a vector field of two dimensionalvectors in the plane. The examples illustrate the tools available forplot objects on grids in two- and three-dimensional space.The command to plot a vector field has the following syntax.vectorfieldplot( F, r1, r2 , options )• The input, F, is a list of size two, giving the functions that specify thehorizontal and vertical components of the vector field.• The arguments r1 and r2 describe the domain grid of the vectors.• The three arguments F, r1, and r2 are similar in form to the inputyou need to use for plot3d.• The optional information includes any sensible specification that plotor plot3d allows. Thus, options of the form grid = [m,n], style =patch, and color = colorfunction are valid options.Drawing a VectorThe first problem is to draw a vector. Let [x, y] represent a point, thestarting point of the arrow, and [a, b], the components of the vector. Youcan determine the shape of an arrow by three independent parameters,t1, t2, and t3. Here t1 denotes the thickness of the arrow, t2 the thicknessof the arrow head, and t3 the ratio of the length of the arrow head incomparison to the length of the arrow itself.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!