> restart;
>
Graphics Showcase
The purpose of this final worksheet in the calculus series is to showcase some spectacular graphics that Maple can create, particularly in polar, spherical and cylindrical coordinates.
We begin by displaying a surface, which some of you wanted to see, called a "monkey saddle"
Monkey's Saddle
>
You can obtain a "monkey saddle" as the graph of a function z=f(x,y). For example:
.
Let's plot the function.
> plot3d(x^3-2*x*y^2,x=-1..1,y=-1..1,axes=framed,scaling=constrained,orientation=[60,70]);
>
You can check by hand, or using Maple, that the function has a critical point at (0,0) at which the discriminant is 0. Hence, the second derivative test fails. You can easily see from the graph that the function has a saddle point at (0,0). Why a "monkey saddle"? The shape of the saddle is perfect for a monkey: there is room for a monkey's legs and for a monkey's tail.
>
Lissajous Figures
A Lissajous figure is a curve described by parametric equations
,
,
where a, b,
,
are constants. These curves occur in the study of electricity. Let's have Maple plot one of them.
> plot([4*sin(7*t),3*cos(11*t),t=0..2*Pi],color=blue);
>
Plots in Polar Coordinates
Maple can plot some beautiful curves in polar coordinates. You should know, however, that Maple follows most mathematical books, and interprets polar coordinates (
,
) in a slightly different way than our text presented them. The r coordinate can have negative values. How? You consider the whole x-axis as you polar axis and not just the positive part of it. To obtain a pair of polar coordinates of a given point P, you rotate the polar axis through an angle
until the axis hits the point P. If it is the negative half of the polar axis that hits P, a pair (-r,
) is considered a pair of polar coordinates of P, where r is the distance of P from the origin. For example, the point P=(-1,-1) has polar coordinates (
,
), as well as (
,
). If you have an equation in polar coordinates, say
, the curve satisfying this equation is understood as the set of all points that have at least one pair of polar coordinates (r,
) satisfying the equation.
The command polarplot , as well as the sphereplot and the cylinderplot used below, is contained in the plots package.
> with(plots):
>
Since many interesting curves have polar equations of the form
, if you use the syntax
polarplot(expr(theta), theta=a..b),
Maple automatically assumes that you want to plot the equation r=expr(theta). Let's plot the curve described by
.
> polarplot(sin(theta)+(sin(5*theta/2))^3,theta=0..4*Pi,color=blue);
>
Plots in Cylindrical Coordinates
Again, the most interesting surfaces in cylindrical coordinates have equations
. Hence, if you use syntax
cylinderplot(expr(theta,z),theta=a..b,z=c..d)
, Maple automatically assumes you want to plot r=expr(theta,z). You can change the names of the letters, but remember, that the first range always applies to the angle
, the second to the z coordinate. Let's plot the equation
. Knowing that
in cylindrical coordinates will produce a cone (Why?), we can anticipate that the equation will produce a "warped cone" of some sort.
> cylinderplot((1+0.5*cos(3*theta))*z,theta=0..2*Pi,z=0..6,axes=framed,grid=[35,35],style=patchcontour);
>
An interesting looking vase!
>
Plots in Spherical Coordinates
Here we can get some really interesting surfaces. Again, the convention is the same:
sphereplot(expr(theta,phi),theta=a..b,phi=c..d)
will plot the equation ro =expr(theta,phi). Let's plot
.
> sphereplot(1.3^(theta)*sin(phi),theta=-1..2*Pi,phi=0..Pi,axes=framed);
>
Looks like a shell!
There are many more options for plotting in nonrectangular coordinate systems than the ones presented above. Explore Maple Help if you want to learn about them.
>
Homework Problems
Guess what? There are no homework problems for this worksheet. We just wanted to show you some really nice looking graphics. We hope that you will continue using Maple, or another computer algebra system, to help you in understanding and visualizing mathematical concepts. Good luck!
This MTH 243 Maple Worksheet written by D. Abrahamson, B. Kaskosz, and L. Pakula, Copyright 1999.
>