MATH 261, Spring 2001 Due Date: Name(s): Project 17.6a: Drawing Surfaces Objective To provide some tools for drawing surfaces with Maple. Narrative There are three basic approaches to describing a 2-dimensional surface. A 2-dimensional surface can be described: 1. implicitly as the set of all points P(x, y, z) that satisfy an equation of the form F(x, y, z) = 0, 2. as the graph of a function z = f(x, y) of two variables x and y, and 3. parametrically as the set of all points P(x, y, z) for which x = x(s, t), y = y(s, t), and z = z(s, t), where x(s, t), y(s, t), and z(s, t) are functions of two parameters s and t. We have already investigated the first two approaches; in this project we investigate the third. Tasks a) Type the command lines below into Maple. They illustrate how we can draw the unit sphere using the parametrization x = sin cos , y = sin sin , z = cos where [0, 2] and [0, ]. > # Project 17.6a: Drawing Surfaces > restart; > with(plots): > # Part a: The unit sphere > setoptions3d(axes=normal,orientation=[45,60],grid=[60,60],scaling=constrained); > plot3d([sin(phi)*cos(theta),sin(phi)*sin(theta),cos(phi)],theta=0..2*Pi,phi=0..Pi); b) Continue by typing the command lines below into Maple. They illustrate how we can draw a torus using the parametrization x = (2 + sin ) cos , y = (2 + sin ) sin , z = cos where [0, 2] and [0, ]. > # Part b: A torus > plot3d([(2+sin(phi))*cos(theta),(2+sin(phi))*sin(theta),cos(phi)], theta=0..2*Pi,phi=-Pi..Pi); > plot3d([(2+sin(phi))*cos(theta),(2+sin(phi))*sin(theta),cos(phi)], theta=0..2*Pi,phi=-Pi..Pi,axes=none,view=[-3..3,-3..2.8,-1..1]); In the second command we illustrated one way we can cut a hole into the torus to peek inside: we used the command view, restricting the domain of y-values from -3..3 -- which defines the view volume large enough to include the entire torus -- to -3..2.8, cutting the display a little short in the y-direction. (You might want to change the orientation of the graphic and momentarily zoom-in to sneak a peek inside the torus!) c) Continue by typing the command lines below into Maple. They illustrate some of the strengths and weaknesses of the three approaches to drawing surfaces. In particular, they illustrate that the implicit description does not always yield a good image, that the graph of a function must always pass the "vertical line test", and that the parametric description relies on finding suitable parametrizing functions. The surface we focus on here is the cone whose equation is z2 = x2 + y2 . > # Part c > implicitplot3d(z^2=x^2+y^2,x=-2..2,y=-2..2,z=-2..2); The implicit approach. > f := (x,y) -> sqrt(x^2+y^2); > plot3d(f(x,y),x=-2..2,y=-2..2); As the graph of a function. > x := (r,t) -> r*cos(t); y := (r,t) -> r*sin(t); z := (r,t) -> r; > plot3d([x(r,t),y(r,t),z(r,t)],r=-2..2,t=0..2*Pi); Parametrically. In addition to the strengths and weaknesses described above, note the differences between the boundaries and geometries of the gridlines in the above graphics! d) Type the command lines below into Maple. They illustrate how we can use the display command to simultaneously view surfaces described implicitly, as the graph of a function, and parametrically, all in the same graphic. > # Part d > plot0 := implicitplot3d(z=0,x=0..1,y=-1..1,z=0..1): Plot the graph of function defined implicitly by the equation z = 0. > plot1 := plot3d(1-x,x=0..1,y=-1..1): Plot the graph of the function f(x, y) = 1 - x. > plot2 := plot3d([s^2,s,t],s=-1..1,t=0..1): Plot the cylinder given by the parametric equations x = s2 , y = s, z = t. > display({plot0,plot1,plot2}); Display all three plots. e) Type the command lines below into Maple. They illustrate how, by restricting the values of the variables and parameters we use to draw a graphic, we can get a more appealing graphic. > # Part e > plot1 := plot3d({0,1-x},x=y^2..1,y=-1..1): > plot2 := plot3d([s^2,s,t],s=-1..1,t=0..1-s^2): > display({plot1,plot2}); At this time, make a hard-copy of your typed input and Maple's responses. Then ... f) to the right of the image of the sphere you created in part (a), the first torus you created in part (b), and the solid you created in part (d), draw each surface/solid by hand. (Since Maple will not always be available when you need a sketch of a surface, it is important to learn how to visualize and sketch surfaces by hand.) Comments As with parametric curves, the ability to graph parametric surfaces so easily in Maple, and the fact that there are few restrictions on what makes the graph of a set of parametric equations interesting, take the graphing of parametric surfaces from a topic in Calculus to an art form. It's interesting, for example, to see how changes to a given set of parametric equations affect the graph of the surface, or what happens when you try to invent something of your own. Remember: anything goes! And, in general, the more complex your equations the more interesting its graph will likely be!