Parametric Plots

In this section we will examine various curves and surfaces which can be described using equations involving parameters.

Parametric Curves in 3-Space

Mathematica can graph curves which are described parametrically in the plane or in 3-space . For 3-space curves, you need to describe each of x, y, and z as a function of a parameter, say t. For example, if we have

(x, y, z) = (t, t2, t3)

we can graph the resulting parametric curve in 3-space with the Mathematica function ParametricPlot3D as follows.

[Graphics:3dgraphinggr2.gif][Graphics:3dgraphinggr28.gif]
[Graphics:3dgraphinggr2.gif][Graphics:3dgraphinggr29.gif]
[Graphics:3dgraphinggr2.gif][Graphics:3dgraphinggr30.gif]

This curve is called a "twisted cubic".

Notice that the bounding box helps provide a sense of depth to the curve. Without the box, all you see is a curve in the plane of the computer screen. Even with the box, however, you still can't detect the nuances of the curve from a single projection into the viewing plane. To get a better idea of what the curve is doing, you could, for example, look at several different perspectives. Alternatively, you look at the unit tangent and normal vectors moving along the curve. Both of these techniques are addressed in the Animation section later in the lab.

Parametric Surfaces

Surfaces can often be described using equations for the three rectangular coordinates which involve two parameters. In the first lab, you saw such an example where a hyperboloid of one sheet was graphed using the cylindrical coordinate parameters z and &thgr;. We will begin with other examples which use cylindrical and spherical coordinates. Then we will look at a completely different type of parametric surface.

Cylindrical and Spherical Coordinates

We will start with the problem of graphing a sphere. For definiteness, we use the unit sphere centered at the origin in 3-space.

x2 + y2 + z2 = 1

Since the sphere is not the graph of any function f(x,y), we cannot use Plot3D directly to produce the desired graph. We can't even use Plot3D to graph the upper or lower hemisphere since Plot3D requires a rectangular region in the xy-plane over which to work. What we need to do is describe the sphere parametrically and utilize the Mathematica function ParametricPlot3D. When each of the variables x, y, and z are described as functions of two parameters, ParametricPlot3D produces a surface graph, whereas, in the previous subsection, the same Mathematica function produced a curve.

To describe the sphere parametrically, we can do this with either cylindrical or spherical coordinates, among other methods.

In the case of cylindrical coordinates (r, &thgr;, z), we have a slight complication in that the cylindrical coordinate z must be expressed as two different functions of r and &thgr;, i.e., z is not uiquely determined by r and &thgr;. This leads to the following use of ParametricPlot3D.

[Graphics:3dgraphinggr2.gif][Graphics:3dgraphinggr31.gif]
[Graphics:3dgraphinggr2.gif][Graphics:3dgraphinggr32.gif]
[Graphics:3dgraphinggr2.gif][Graphics:3dgraphinggr33.gif]

This gives an acceptable graph of the sphere. But the graph looks a little strange in that the latitude lines do not appear evenly spaced around the sphere. Do you see why?

This problem can be remedied using spherical coordinates, where things become much simpler as the name of the coordinate system might suggest.

[Graphics:3dgraphinggr2.gif][Graphics:3dgraphinggr34.gif]
[Graphics:3dgraphinggr2.gif][Graphics:3dgraphinggr35.gif]
[Graphics:3dgraphinggr2.gif][Graphics:3dgraphinggr36.gif]

This graph of the sphere is more like what we are accustomed to seeing. The spherical rectangles appear nice and regular.

For our next example, we will graph the function

x y
f(x,y) = ---------
x2 + y2

Note that f(x,y) is not defined at the origin in the plane. In fact, f(x,y) has an essential discontiniuty there (i.e., the limit of f(x,y) fails to exist at the origin). The function also has the interesting property that its value along any straight line through the origin in the plane is constant except at the origin, where it is undefined. Mathematica can easily check this for us.

[Graphics:3dgraphinggr2.gif][Graphics:3dgraphinggr37.gif]
[Graphics:3dgraphinggr2.gif][Graphics:3dgraphinggr38.gif]

So the values of f[x,y] along any line y = mx depend only on m, not on x or on y (except at the origin).

Of course, the line given by x = 0 isn't covered in the above check, but f[0,y] = 0 for any nonzero value of y, so f[x,y] is constant along this line as well. We can plot the function now using Plot3D.

[Graphics:3dgraphinggr2.gif][Graphics:3dgraphinggr39.gif]
[Graphics:3dgraphinggr2.gif][Graphics:3dgraphinggr40.gif]
[Graphics:3dgraphinggr2.gif][Graphics:3dgraphinggr41.gif]

The type of wild behaviour you see around the origin is typical of what happens when Mathematica attempts to graph a surface through this type of essential discontinuity. Increasing the value of PlotPoints won't significantly help -- the same problems in the graph will persist, only at a smaller scale. To get a different ruling on the surface, we can switch to another coordinate system. For example, in cylindrical coordinates, we get the following.

[Graphics:3dgraphinggr2.gif][Graphics:3dgraphinggr42.gif]
[Graphics:3dgraphinggr2.gif][Graphics:3dgraphinggr43.gif]

We see that the values of the function depend only on theta, not on r. This again shows that the values are constant along straight lines in the plane containing the origin. Now we can graph our function using ParametricPlot3D.

[Graphics:3dgraphinggr2.gif][Graphics:3dgraphinggr44.gif]
[Graphics:3dgraphinggr2.gif][Graphics:3dgraphinggr45.gif]
[Graphics:3dgraphinggr2.gif][Graphics:3dgraphinggr46.gif]
A Moebius Band

For an example of a surface described parametrically which does not use parameters from any of the standard coordinate systems, we will start with a circle of radius 4 centered at the origin of the xy-plane. At each point of the circle, we will attach a line segment of length 1 so that it is orthogonal to the tangent vector of the circle at the point of attachment. If each of the line segments is vertical (i.e., parallel to the z-axis), we would obtain a cylinder. However, we want to rotate the line segments as they go around the circle so that one trip around the circle puts a half-twist (Pi radians) in the segments. The resulting surface is called a Moebius band. You can easliy build one with a piece of paper by cutting a long rectangluar strip from the paper, giving it a half-twist, and glueing the ends together.

We want to describe the resulting surface parametrically so that we can graph it. A natural way to do this is to realize that any point on the Moebius band can be described by moving along the circle of radius 4 to a specified location, then traveling out along the line segment through that location to the desired point. Thus, we can parameterize the Moebius band with two parameters: one specifying points around the circle of radius 4, the other specifying points on the line segments. This leads to the following.

[Graphics:3dgraphinggr2.gif][Graphics:3dgraphinggr47.gif]
[Graphics:3dgraphinggr2.gif][Graphics:3dgraphinggr48.gif]
[Graphics:3dgraphinggr2.gif][Graphics:3dgraphinggr49.gif]