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.

226 • Chapter 6: <strong>Programming</strong> with Maple GraphicsThe third example is again the graph of z = xy but this time incylindrical coordinates. The PLOT3D structure now contains a mesh ofpoints that make up the surface, along with the information that theplotting device should display the surface in a point style.> lprint( plot3d( x*y, x=0..1, y=0..2, grid=[3,2],> coords=cylindrical, style=point ) );PLOT3D(MESH(Array(1 .. 3,1 .. 2,1 .. 3,{(1, 2, 3) = 2., (2, 2, 1) = .877582561890372758, (2, 2, 2) = .479425\538604203006, (2, 2, 3) = 2., (3, 2, 1) = 1.0806046117\3627952, (3, 2, 2) = 1.68294196961579300, (3, 2, 3) =2.},datatype = float[8],storage = rectangular,order =C_order)),STYLE(POINT))Since the plot is not in Cartesian coordinates and there are nodefault labels, it follows that the PLOT3D structure does not contain anyAXESLABELS.The PLOT Data StructureYou can construct and manipulate a plotting data structure directly tocreate two- and three-dimensional plots. You need the correct arrangementof the geometric information inside a PLOT or PLOT3D function. Theinformation inside this function determines the objects that the plottingdevice displays. Here Maple evaluates the expression> PLOT( CURVES( [ [0,0], [2,1] ] ) );10.80.60.40.200.5 1 1.5 2and passes it to the Maple interface which determines that this is a plotdata structure. The Maple interface then dismantles the contents andpasses the information to a plot driver, which determines the graphicalinformation that it renders to the plotting device. In the latest example,the result is a single line from the origin to the point (2, 1). The CURVESdata structure consists of one or more lists of points each generating acurve, along with some optional arguments (for example, line style or linethickness information). Thus, the expression

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

Saved successfully!

Ooh no, something went wrong!