This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ta=0..2*Pi, z=0..1 ); The cylinderplot command also accepts parametrized plots. The syntax is similar to that of parametrized plots in Cartesian (ordinary) coordinates. See this section, page 121. cylinderplot( [ r-expr, theta-expr, z-expr ], parameter1 =range, parameter2 =range ) The following is a plot of r = st, θ = s, and z = cos(t2 ).
> cylinderplot( [s*t, s, cos(t^2)], s=0..Pi, t=-2..2 ); Reﬁning Plots
To create a smoother or more precise plot, calculate more points. Use the grid option grid=[m, n ] where m is the number of points for the ﬁrst coordinate, and n is the number of points for the second coordinate. 126 • Chapter 5: Plotting > plot3d( sin(x)*cos(y), x=0..3*Pi, y=0..3*Pi, grid=[50,50] ); In the next example, a large number of points (100) for the ﬁrst coordinate (theta) makes the spiral look smooth. However, the function does not change in the z-direction. Thus, a small number of points (5) is suﬃcient.
> cylinderplot( theta, theta=0..4*Pi, z=-1..1, grid=[100,5] ); The default grid is approximately 25 by 25 points. Shading and Lighting Schemes
Two methods for shading a surface in a three-dimensional plot are available. • One or more distinctly colored light sources illuminate the surface • The color of each point is a direct function of its coordinates Maple has many preselected light source conﬁgurations, which give aesthetically pleasing results. You can choose from these light sources through the context-sensitive menu or with the lightmodel option. For coloring the surface directly, many predeﬁned coloring functions are also available through the menus or with the shading option. 5.3 Animation • 127 Simultaneous use of light sources and direct coloring can complicate the resulting coloring. Use either light sources or direct coloring. Here is a surface colored with zgrayscale shading and no lighting.
> plot3d( x*y^2/(x^2+y^4), x=-5..5,y=-5..5, > shading=zgrayscale, lightmodel=none ); The same surface illuminated by lighting scheme light1 and no shading follows.
> plot3d( x*y^2/(x^2+y^4), x=-5..5,y=-5..5, > shading=none, lightmodel=light1 ); The plots appear in black and white in this book. Try them in Maple to see the eﬀects in color. 5.3 Animation Graphing is an excellent way to represent information. However, static plots do not always emphasize certain graphical behavior, such as the deformation of a bouncing ball, as eﬀectively as their animated counterparts. 128 • Chapter 5: Plotting A Maple animation is a number of plot frames displayed in sequence, similar to the action of movie frames. The animate command is used for animations and is deﬁned in the plots package. To access the command, use the short name after invoking the with(plots) command. Animation in Two Dimensions
You can specify a two-dimensional animation by using this syntax. animate(plotcommand, plotargs, t =a..b,... ) animate(plotcommand, plotargs, t =L,... ) • plotcommand - Maple procedure that generates a 2-D or 3-D plot • plotargs - represents arguments to the pl...
View Full Document