11.07.2015 Views

Advanced Programming Guide

Advanced Programming Guide

Advanced Programming Guide

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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

278 • Chapter 6: <strong>Programming</strong> with Maple GraphicsThe code in the springPlot procedure uses the short names of commandsfrom the plots and plottools packages to improve readability.You must either use long names or remember to load these two packagesbefore using springPlot.> with(plots): with(plottools):> springPlot(6);> display( springPlot(6) );For information on the commands in the plottools package relatedto graphics procedures, see section 6.5.6.9 <strong>Programming</strong> with ColorYou can color each type of object in the plot data structures, and addcolors to plotting routines. The color option allows you to specify colorsin the form of a solid color, by name, by RGB or HUE values, or via acolor function in the form of a Maple formula or function. Try each of thefollowing commands.> plot3d( sin(x*y), x=-3..3, y=-3..3, color=red );> plot3d( sin(x*y), x=-3..3, y=-3..3,> color=COLOUR(RGB, 0.3, 0.42, 0.1) );> p := (x,y) -> sin(x*y):> q := (x,y) -> if x < y then 1 else x - y end if:

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

Saved successfully!

Ooh no, something went wrong!