One of the most valuable services provided by computer software such as Maple is that it allows us to produce intricate graphs with a minimum of effort on our part. This becomes especially apparent when it comes to functions of two variables, because there are many more computations required to produce one graph, yet Maple performs all these computations with only a little guidance from the user.
The simplest way of describing a surface in Cartesian coordinates is as the graph of a function over a domain, e.g. a set of points in the plane. The domain can have any shape, but a rectangular one is the easiest to deal with. Another common, but more difficult way of describing a surface is as the graph of an equation , where is a constant. In this case, we say the surface is defined implicitly. A third way of representing a surface is through the use of level curves. The idea is that a plane intersects the surface in a curve. The projection of this curve on the plane is called a level curve. A collection of such curves for different values of is a representation of the surface called a contour plot. Similar to the idea of level curves is to look at cross sections of the surface to see what two-dimensional shape is traced, not only in the plane by letting be constant, but also in the plane by holding constant and the plane by holding constant.
>with(plots):Some three-dimensional curves can be entered as an explicit function. The plot commands for explicitly defined functions are as follows:
>f:=(x,y)->x^2+y^2; >plot3d(f(x,y),x=-5..5,y=-5..5); >contourplot(f(x,y),x=-5..5,y=-5..5);To look at cross sections of an explicitly defined surface in a either of the vertical planes, hold the or constant as follows:
>plot({f(1,y),f(2,y)},y=-5..5,z=-10..10,labels=[y,z]);Some three-dimensional curves can be entered as an implicit expression, where is assumed to be a function of and . The plot commands for implicitly defined expressions are as follows:
>surf:=z^2=x^2+y^2; >implicitplot3d(surf,x=-5..5,y=-5..5,z=-5..5,axes=boxed,numpoints=5000);The equation of a sphere can also be entered as an implicit expression.
>g:=x^2+y^2+z^2=1; >implicitplot3d(g,x=-1..1,y=-1..1,z=-1..1,axes=boxed);To look at the cross-section of the sphere along a plane, hold one variable constant. For example, the intersection of the sphere and the plane is:
>implicitplot(subs(z=0.5,g),x=-1..1,y=-1..1,labels=[x,y]);Notice that the plot is a two-dimensional circle. To intersect vertical planes for any implicitly defined surface, hold the or constant as follows:
>implicitplot({subs(y=0.6,g),subs(y=-0.8,g)},x=-1..1,z=-1..1,labels=[x,z]);Other three-dimensional shapes can be made from known conic sections. A few of these will be analyzed in the exercises.