Lab_B.nb Lab B Parametrizing Surfaces Math 37 University of Minnesota http://www.math.umn.edu/math37 Questions to: rogness@math.umn.edu Introduction As in last week s lab, there is no calculus in this notebook. Last week you learned how to graph curves using Parametric- Plot and ParametricPlot3D. You also had the chance to find the parametrizations for various curves. This week we ll do the same thing with surfaces. We haven t rigorously defined surfaces yet, but you probably have an intuitive idea of what a surface is. It s like a piece of paper, or a sheet of rubber, but it doesn t have to be flat; it can be bent, curved, or even have holes in it. Sometimes a surface encloses a solid region in space. If so, we call it a closed surface. The following pictures all show surfaces; the last one is a closed surface, and the others are not. A First Look Often our surfaces will be (a piece of) the graph of a function z=f(x,y), such as this example:
Lab_B.nb In[]:= Out[]= x y f x_, y_ x^ y^ Plot3D f x, y, x,,, y,,.5.5 - -.5.5 - -.5.5 Out[]= SurfaceGraphics Mathematica can draw a great picture of graphs like this, but Plot3D has its limitations. For example, what if we wanted to plot the graph of x = y + z? You should know by looking at this equation that this is a paraboloid, just like our picture above, except this one opens in the direction of the positive x axis. Suppose we tried to plot this with Plot3D: In[3]:= Plot3D y^ z^, y,,, z,,.5.5 - -.5.5 - -.5.5 Out[3]= SurfaceGraphics We get exactly the same picture as before! This is a paraboloid opening upwards, which is incorrect. The reason is that Plot3D expects a function of two variables, and it interprets the values of the function as the height. Normally we give it a function of x and y, and since the z axis represents height, this fits in to our view of the world. How can we get a true graph of x = y + z from Mathematica? Using parametric equations is one possibility. Think back to last week when we did a "trivial parametrization" of the graph of y=g(x) by setting f(x) equal to (x, g(x)). Define f(y,z)=(y + z, y, z):
Lab_B.nb 3 In[]:= Out[]= f y_, z_ y^ z^, y, z y z, y, z Essentially we re saying that y and z are our parameters. Now we can plot the graph of f using ParametricPlot3D: In[5]:= ParametricPlot3D f y, z, y,,, z,,, AxesLabel "x", "y", "z" y -.5 -.5.5 z -.5 -.5 x.5 Out[5]= And you can see that this is a paraboloid opening in the direction of the positive x axis, as desired. Note that we re using two parameters now, which is different than when we plotted curves. This makes sense, if you think about it. Curves are like a line, a one dimensional object, so they require one parameter. Surfaces are two dimensional creatures, and so they require two parameters. Note: if a curve is in the xy plane, you can use ParametricPlot, or you can use ParametricPlot3D by letting z(t)=. If you want to plot a surface, however, you must use ParametricPlot3D. The command ParametricPlot will not accept more than one parameter! (So you can t give it ranges for, say, y and z.) Also, most of this lab uses ParametricPlot3D, so it would be a good idea to execute the command Off[Parametric- Plot3D::ppcom] to get rid of those blue error messages about compiling functions. More Examples Let s look at more examples of how to parametrize surfaces. As in last week s lab, circular regions will be very important, and there is one technique in particular that you should learn. Many of our surfaces will be relatively easy to describe using cylindrical coordinates (r,θ,z), which have been covered in class. A parametrization has to be in rectangular coordinates (x,y,z), so we can t just describe the surface in cylindrical coordinates and say we re done. But if we ve described the surface in cylindrical coordinates, we can use the following formulas to convert our description into rectangular coordinates:
Lab_B.nb x = r Cos[Θ] y = r Sin[Θ] z = z Example (a). Disks of Radius R in the Plane z=h In cylindrical coordinates, such a disk is described by (r,θ,h) where r R, Θ Π, and h is some constant number. Converting to rectangular coordinates, we have: f r, Θ r Cos Θ, r Sin Θ, h, where r and Θ have the same bounds. (r and Θ are our parameters now.) For example, if R= and h=, In[6]:= Out[6]= f r_, theta_ r Cos theta, r Sin theta, disk ParametricPlot3D f r, theta, r,,, theta,, Pi r Cos theta, r Sin theta, -.5 -.5.5 -.5 - - -.5.5 Out[7]= Or, with other values of h:
Lab_B.nb 5 In[8]:= disk ParametricPlot3D r Cos theta, r Sin theta,, r,,, theta,, Pi disk ParametricPlot3D r Cos theta, r Sin theta,, r,,, theta,, Pi -.5 -.5.5.5 - -.5.5 Out[8]= - -.5.5.5.5 -.5-3 Out[9]= Or, all together:
Lab_B.nb 6 In[]:= Show disk, disk, disk -.5 -.5.5.5 - -.5.5 Out[]= FYI: Normally when we use one parameter we choose the letter t. When we use two parameters, the standard letters are s and t. So often we would write these parametrizations as (for example): f(s,t) = (s Cos[t], s Sin[t], ), s, t Π. Example (b). An Annulus We won t actually use this much, but it s an interesting example to point out. Suppose we parametrize the disk of radius in the plane z=:
Lab_B.nb 7 In[]:= Out[]= f s_, t_ s Cos t, s Sin t, ParametricPlot3D f s, t, s,,, t,, Pi s Cos t, s Sin t,.5.5 - - - - Out[]= Now, instead of letting s range from to, let s use values of s from to instead: In[3]:= ParametricPlot3D f s, t, s,,, t,, Pi.5.5 - - - - Out[3]= This type of surface is called an annulus. Example. A Filled in Ellipse. Last week we parametrized an ellipse:
Lab_B.nb 8 In[]:= ParametricPlot3D Cos t, 3 Sin t,, t,, Pi.5 -.5 - - - - Out[]= We can fill in the ellipse by introducing a second parameter, s. Notice the similarity to the disk above! In[5]:= Out[5]= f s_, t_ s Cos t, 3 s Sin t, ParametricPlot3D f s, t, s,,, t,, Pi s Cos t, 3 s Sin t,.5 -.5 - - - - Out[6]= Example 3. Shifted Circles and Ellipses. As with our circles last week, we can shift a circle so that it s centered at another point by adding the appropriate numbers to the components of the parametrization. For example, here s a disk of radius in the plane z 3 centered at (.5,):