Volumes of Revolution
by Tom Linton, http://www.central.edu/homepages/lintont
We illustrate here a few MapleV 5 commands which can be used to render illustrations of volumes of revolution. The language in this file assumes you have the actual Maple worksheet, or have copied and pasted the commands in this HTML file into a live Maple session.
This gives a fresh start and loads some plotting packages we'll utilize:
> restart:
map(with, {plots, plottools}):
Since these images will be redisplayed together, they are all named first (with a "show no output" command ending colon) then immediately displayed (by simply giving Maple their names).
Parametric 3D plots (for example, to give volumes of revolution) look like this:
> surf:=plot3d([x,cos(t)*(ln(x)+1),sin(t)*(ln(x)+1)],
x=1..3,t=0..2*Pi,axes=boxed,scaling=constrained,
style=patchnogrid,labels=["x","y","z"]):
surf;
![[Maple Plot]](http://www.central.edu/homepages/lintont/maple/volsofrev/images/volsofrev1.gif)
Click on the plot above, then drag it around to see that it's hollow (in a Maple session).
3D curves are called spacecurves in Maple. There are three separate spacecurves here. The first draws the function to be rotated, in the xy-plane. In general you'd use [x, f(x), 0]. The second draws an x-axis, and the third draws a y-axis. The two axes are rendered by a single spacecurve command, simply make a set (with curly brackets) out of the two separate spacecurve vectors. While display is used to display several 2D plots, display3d can render several 3D plots together. The display3d command requires the plots package to be loaded.
> crv:=spacecurve([x,ln(x)+1,0],
x=1..3,color=red, thickness=3):
xyaxes:= spacecurve({[1.5*(x-1),0,0], [0,1.5*(x-1),0]},
x=1..3,color=black, thickness=3):
display3d([surf, crv, xyaxes]);
![[Maple Plot]](http://www.central.edu/homepages/lintont/maple/volsofrev/images/volsofrev2.gif)
You get fat spacecurves with tubeplot (the radius can be a function). This will look better with a wider view. It is a very short shell, actually.
> shell:=tubeplot([x,0,0],x=2..2.2,
radius=ln(x)+1,color=blue,grid=[2,25]):
shell;
![[Maple Plot]](http://www.central.edu/homepages/lintont/maple/volsofrev/images/volsofrev3.gif)
Just so you understand what that is:
> display3d([crv, xyaxes, shell]);
![[Maple Plot]](http://www.central.edu/homepages/lintont/maple/volsofrev/images/volsofrev4.gif)
Now a 3Dpolygon or two (to cap our shell on the ends) and our image is ready:
> tvals:=[seq(k*Pi/15.,k=0..30)]:
faces:=seq(polygon([seq([x,cos(t)*(ln(x)+1),sin(t)*(ln(x)+1)],
t=tvals)],color=blue),x=[2,2.2]):
display3d([crv, xyaxes, shell, faces]);
![[Maple Plot]](http://www.central.edu/homepages/lintont/maple/volsofrev/images/volsofrev5.gif)
With the (solid) surface added. This is best explored by dragging it around some.
> display3d([crv, xyaxes, shell, faces, surf]);
![[Maple Plot]](http://www.central.edu/homepages/lintont/maple/volsofrev/images/volsofrev6.gif)
Here, I replot3d the surface, to make it see through, and display3d everything together.
> display3d([crv, xyaxes,
plot3d([x,cos(t)*(ln(x)+1),sin(t)*(ln(x)+1)],
x=1..3,t=0..2*Pi,axes=none,
style=wireframe, grid=[8,25]),
faces, shell, crv, xyaxes],
orientation=[-90,-15]);
![[Maple Plot]](http://www.central.edu/homepages/lintont/maple/volsofrev/images/volsofrev7.gif)
Click on and drag that around a bit!
Goto the Maple Materials Page