Maple Plotting in 3d 

 

> restart;
with(plots):
 

Functions 

Several of the surfaces in our catalog are functions of two variables. We start with elliptical paraboloids. 

> f := x^2+y^2;
plot3d(f, x = -3 .. 3, y = -3 .. 3, axes = normal,  style=patchnogrid, scaling = constrained);
 

 

`+`(`*`(`^`(x, 2)), `*`(`^`(y, 2)))
Plot
 

Note that our surface looks a little different from the graph usually shown in calculus texts, due to the way we have restricted the x and y values.  If we choose, we can match the z-range to the x and y values to make the graph appear with a circular top. This is done by using the 'view' option as shown below.  

 

Note that below I've also removed the 'style' option. This changes the way the surface is drawn. You can also do this by clicking on the graph and looking at the new options that appear in the tool bar. The buttons which appear allow you to change the appearance of the surface, change the axes, change the scaling, and also change the orientation and magnification level of the graph. You should experiment with these buttons. 

> plot3d(f, x = -3 .. 3, y = -3 .. 3, view = 0 .. 9, axes = normal,  scaling = constrained);
 

Plot
 

Elliptic Paraboloid 

Here we set a=1 and b = 2 and then set the x-range, the y-range and view so that the top edge of the graphed part of the surface is a familiar smooth curve. Click on the contour view (one of the options in the drop list on the button which chanes the 'netting' on the graph) to see why this surface is an *elliptical* paraboloid. 

> f:=x^2+(y^2)/4;
plot3d(f, x = -3 .. 3, y = -3 .. 3, view=0..2,axes = normal, scaling = constrained);
 

 

`+`(`*`(`^`(x, 2)), `*`(`/`(1, 4), `*`(`^`(y, 2))))
Plot
 

Next we graph a hyperbolic paraboloid. 

> g := -x^2+y^2/4;
plot3d(g, x = -3 .. 3, y = -3 .. 3, axes = normal);
 

 

`+`(`-`(`*`(`^`(x, 2))), `*`(`/`(1, 4), `*`(`^`(y, 2))))
Plot
 

Notice the cross-sections are parabolas opening up when x is fixed and opening down when y is fixed. Click on the contour view to see why this surface is a *hyperbolic* paraboloid (rotate to look down on the graph). 

If one of the variables is missing from an equation, we get a cylinder.  Here is an example of a parabolic cylinder. 

> h := y^2;
plot3d(h, x = -3 .. 3, y = -3 .. 3, style = patchnogrid, axes = normal);
 

 

`*`(`^`(y, 2))
Plot
 

Graph a linear function. Play with different values of A, B and F. 

> A := 1; B := 1; F := 0;
k := A*x+B*y+F;
plot3d(k, x = -3 .. 3, y = -3 .. 3, axes = normal);
 

 

 

 

 

1
1
0
`+`(x, y)
Plot
 

Implicit plots 

Other surfaces cannot be expressed as the graph of a (single) function of two variables.  For these we can use the implicit plot command. 

 

We start with a sphere. Notice that the radius is set inside the 'implicitplot3d' command. This is just by choice. 'm' could just as well have been defined to be the equation itself, i.e. 'm:=x^2+y^2+z^2=1'. 

> m := x^2+y^2+z^2;
implicitplot3d(m = 1, x = -1.5 .. 1.5, y = -1.5 .. 1.5, z = -1.5 .. 1.5, axes = normal, scaling = constrained, grid = [20, 20, 20]);
 

 

`+`(`*`(`^`(x, 2)), `*`(`^`(y, 2)), `*`(`^`(z, 2)))
Plot
 

Ellipsoid 

Of course, it's somewhat easy to visualize a sphere. We want to use Maple to help us see more difficult objects like this. Experiment with a, b, and c to see how they affect the shape of the ellipsoid. 

> a := 1; b := 1; c := 1;
m := x^2/a^2+y^2/b^2+z^2/c^2;
implicitplot3d(m = 1, x = -1.5 .. 1.5, y = -1.5 .. 1.5, z = -1.5 .. 1.5, axes = normal, scaling = constrained, grid = [20, 20, 20]);
 

 

 

 

 

1
1
1
`+`(`*`(`^`(x, 2)), `*`(`^`(y, 2)), `*`(`^`(z, 2)))
Plot
 

The next surface we sketch is a hyperboloid of one sheet. Change the values of a, b and  c to see different versions. 

> a := 1; b := 1; c := 1;
n := x^2/a^2+y^2/b^2-z^2/c^2;
implicitplot3d(n = 1, x = -1.5 .. 1.5, y = -1.5 .. 1.5, z = -1.5 .. 1.5, axes = normal, scaling = constrained, style = patchnogrid);
 

 

 

 

 

1
1
1
`+`(`*`(`^`(x, 2)), `*`(`^`(y, 2)), `-`(`*`(`^`(z, 2))))
Plot
 

 

We move on to hyperboloids of two sheets. 

> a := 1; b := 1; c := 1;
n := x^2/a^2+y^2/b^2-z^2/c^2;
implicitplot3d(n = -1, x = -3 .. 3, y = -3 .. 3, z = -3 .. 3, axes = normal, scaling = constrained, style = patchnogrid);
 

 

 

 

 

1
1
1
`+`(`*`(`^`(x, 2)), `*`(`^`(y, 2)), `-`(`*`(`^`(z, 2))))
Plot
 

In the degenerate case (right side of the equation = 0), we obtain at a pair of cones, the geometric foundation for the conic sections.  

> a := 1; b := 1; c := 1;
n := x^2/a^2+y^2/b^2-z^2/c^2;
implicitplot3d(n = 0, x = -3 .. 3, y = -3 .. 3, z = -3 .. 3, axes = normal, scaling = constrained, style = patchnogrid, grid = [30, 30, 30]);
 

 

 

 

 

1
1
1
`+`(`*`(`^`(x, 2)), `*`(`^`(y, 2)), `-`(`*`(`^`(z, 2))))
Plot
 

Planes can also be graphed using an implicit plot. 

> a := 1; b := 1; c := 1;
p := a*x+b*y+c*z;
implicitplot3d(p = 0, x = -3 .. 3, y = -3 .. 3, z = -3 .. 3, axes = normal, scaling = constrained);
 

 

 

 

 

1
1
1
`+`(x, y, z)
Plot
 

 

Finally, we graph some cylinders implicitly. 

> q := x^2+y^2;
implicitplot3d(q = 4, x = -3 .. 3, y = -3 .. 3, z = -3 .. 3, axes = normal, scaling = constrained, style = patchnogrid, grid = [20, 20, 20]);
 

 

`+`(`*`(`^`(x, 2)), `*`(`^`(y, 2)))
Plot
 

> r := y-x^2;
implicitplot3d(r = 0, x = -3 .. 3, y = -3 .. 3, z = -3 .. 3, axes = normal, scaling = constrained, style = patchnogrid);
 

 

`+`(y, `-`(`*`(`^`(x, 2))))
Plot
 

Exercises 

Do the following problems from your textbook. 

 

 

11.6 #'s 31-38 

 

In the instructions, the author suggests you solve for z. Don't do that. Instead, use the implicitplot command if necessary.