Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Maple Graphing Commands and Options: 2D and 3D Graphs, Animation, Exams of Differential Equations

An overview of maple commands and options related to 2d and 3d graphics, including examples of common options such as axes, color, filled, font, labels, legend, linestyle, style, symbol, symbolsize, thickness, tickmarks, title, titlefont, view, and animation. The document also includes examples of maple commands for 2d and 3d animation.

Typology: Exams

Pre 2010

Uploaded on 08/16/2009

koofers-user-t85-1
koofers-user-t85-1 🇺🇸

10 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Graphing in Maple
Here we give a selection of maple commands involved with Maple’s graphics pack-
age.
2-D Graphics
If we type
[>plot(sin(x),x=0.. 2 Pi);
then maple will give a graph of the function sin xon [0, 2π]If we type
[>plot([sin(x),cos(x)],x=0.. 2 Pi);
then maple will give two graphs superimposed, the function sin xand cos xon [0, 2π]
If we type
[>plot([2t2,tt3,t=2..2]);
then maple will us a plot of the parametric equations
x=2t2,y=tt3.
If we wish to make the graph larger or smaller, left click your mouse arrow in the middle
of the picture and maple will put a box around it. Then you can make the box as large or
as small as you wish. There are several options that we will discuss. To be able to get this
list, if we type
[>?plot;
Maple will take us to a help menu where all sorts of information can be found includ-
ing options (see the bottom for See Also).
1
pf3
pf4
pf5

Partial preview of the text

Download Maple Graphing Commands and Options: 2D and 3D Graphs, Animation and more Exams Differential Equations in PDF only on Docsity!

Graphing in Maple

Here we give a selection of maple commands involved with Maple’s graphics pack- age.

2-D Graphics

If we type [> plot(sin(x), x = 0.. 2 ∗ Pi);

then maple will give a graph of the function sin x on [0, 2 π ] If we type [> plot([sin(x), cos(x)], x = 0.. 2 ∗ Pi);

then maple will give two graphs superimposed, the function sin x and cos x on [0, 2 π ] If we type [> plot([ 2 − t^2 , t − t^3 , t = −2..2]);

then maple will us a plot of the parametric equations

x = 2 − t^2 , y = t − t^3.

If we wish to make the graph larger or smaller, left click your mouse arrow in the middle of the picture and maple will put a box around it. Then you can make the box as large or as small as you wish. There are several options that we will discuss. To be able to get this list, if we type [> ?plot;

Maple will take us to a help menu where all sorts of information can be found includ- ing options (see the bottom for See Also ).

Common Options

axes Specifies the type of axes, one of FRAME, BOXED, NORMAL and NONE. Example [> plot(sin(x), x = 0.. 2 ∗ Pi, axes = BOXED);

axesfont Specifies the [family,style,size], where family is one of TIMES, COURIER, HELVETICA and SYMBOL. For TIMES, style may be one from ROMAN, BOLD, ITALIC or BOLDITALIC, For HELVETICA and COURIER style may be omitted or select of of BOLD, OBLIQUE or BOLDOBLIQUE. SYMBOL doesn’t accept a style option. The final value, size, is the point size to be used. Example [> plot(sin(x), x = 0.. 2 ∗ Pi, axes f ont = [TI MES, ITALICS, 16]);

color Allows the user to specify the color of the curves to be plotted. The spelling ”colour” may also be used. For details, see it plot,color.. Example [> plot(sin(x), x = 0.. 2 ∗ Pi, color = blue);

filled If the filled option is set to true, the area between the curve and the x-axis is given a solid color. This option is valid only with the following commands: plot, contourplot, implicitplot, listcontplot, polarplot, and semilogplot. Example [> plot(sin(x), x = 0.. 2 ∗ Pi, color = blue, f illed = true);

font Same as axesfont except for text objects in the plot.

labels = [x,y] This option specifies labels for the axes. The values of x and y must be strings. The default

[> plot([sin(x), cos(x)], x = 0.. 2 ∗ Pi, style = [POINT, LINE], symbol = [DI AMOND], symbolsize = 16 ); Example [> plot([sin(x), cos(x)], x = 0.. 2 ∗ Pi, style = POINT, symbol = [CROSS, CIRCLE], symbolsize = 16 );

thickness=n This option specifies the thickness of lines in the plot. The thickness n must be a non- negative integer. The default thickness is 0.

tickmarks=[m, n] This option specifies that a reasonable number of points no less than m and n should be marked along the x-axis and y-axis, respectively. Both m and n must be either a positive integer or the name ’default’. If tick marks are desired along only one axis, use xtickmarks or ytickmarks instead.

title=t The title for the plot. The value t must be a character string. The default is no title. You can create multi-line titles for standard plots. Use the characters n in the character string to denote the start of a new title line.

titlefont=l Font for the title of the plot, specified in the same manner as font. Example [> plot(sin(x), x = 0.. 2 ∗ Pi, tickmarks = [3, 2], title = ”y = sin(x)Curve”);

view=[xmin..xmax, ymin..ymax] This option indicates the minimum and maximum coordinates of the curve to be dis- played on the screen. The default is the entire curve. Example [> plot(tan(x), x = 0.. 2 ∗ Pi, view = [0..2 ∗ Pi, −5..5]);

3-D Graphics

If we type [> plot 3 d((x^2 − y^2 )/(x^2 + y^2 ), x = −1..1, y = −1..1);

then maple will give a 3d graph of the function z = x (^2) −y 2 x^2 +y^2 on^ [−1, 1]^ ×^ [−1, 1]. A really nice feature is if we left click on the picture and hold it down, we get real time rotation. many of the options are similar and can be viewed using Example [> ?plot 3 d;

2-D Animation

Maple also has an animation feature in its graphics package. However, we need to call in the entire plots package. To do this we use the Maple command [> with(plots) :

If we type [> animate(exp(−(x + t)^2 , x = −10..10, t = 0..5, f rames = 50 );

we will get the initial profile at t = 0 on [−10, 10] and we can evolve the picture from t = 0 to t = 5 and there will be a total of 50 snap shots. We can also have animated parametric plots Example [> animate([r ∗ cos(t), r ∗ sin(t), t = 0..5], r = 0..1, f rames = 50 );

In both examples, once we execute the maple command, we need to left click on the pic- ture. At that point, at the top of the screen you will find tape recorder type controls. These can be used to go forward, backward. You can single step through the frames etc. We can also animate in 3d. The following is an example. Please note the with(plots) command still need to be used. Example [> with(plots); [> (animate 3 d(cos(t ∗ x) ∗ sin(t ∗ y), x = −Pi..Pi, y = −Pi..Pi, t = 1..2, color = cos(x ∗ y));