All published worksheets from http://sagenb.org
Image: ubuntu2004
Plotting Planar Curves
In MATH 161 you worked a great deal with scalar functions of one variable . There is a straightforward method for plotting the graph of such a function. We illustrate this for the "sinc" function (that is, ) below.
Plotting planar curves using parametrization
Another way to plot this same curve is using the parametric_plot() command, whose syntax is only mildly different than the plot() command in the previous cell.
The idea for a (planar) parametric curve is that there is a single parameter which runs through some interval of numbers and, as it does so, and both change. In the above cell, itself was the parameter. It is equally valid to use as the parameter. But parametric curves become even more useful when we introduce a third variable, say , as the parameter. Both variables ( and ) become dependent upon the parameter. We do not have to give any explicit relationship between and and, indeed, the relation between them may not be a function at all. The cell below employs this technique in order to produce a plot of the unit circle.
The parameter in the previous cell ran through the interval in producing this curve. Any interval of length would have produced the same curve. A shorter interval would have yielded only a partial circle, while a longer interval would have yielded a curve that wraps over onto itself.
No doubt, if you own a graphing calculator, what we have done thus far may be duplicated on it using the calculators parametric mode for graphing.
Parametric Curves in 3D
There is nothing particularly difficult about plotting curves in 3-dimensional space, once we are familiar with parametric curves in two dimensions. There is still only one parameter which roams through some interval of values. The only difference (besides the slight change in the name of the command) is that we need to express how the third () coordinate relies on that parameter. The parametric equations
, , ,
describe a helical coil in space, as the next cell demonstrates.
Parametrized Surfaces
Up to this point we have been plotting parametrized curves. For such curves, the parameter runs through some interval of numbers, and the parameter functions , , describe how that interval is morphed into some space curve.
We may now ask, what if there are two parameters -- call them and -- and , , each depend on both of these parameters? We get a rich collection of examples when we consider the conversions between rectangular, cylindrical and spherical coordinates. For instance, the equations describing the conversion between spherical coordinates and rectangular coordinates are
, , .
Spherical coordinates with fixed (so and are parameters)
If we fix the value of at 1, and allow to roam in the interval , in , the result should be a sphere of radius 1. The next cell (in which we use and in place of and ) illustrates this.
By changing to a smaller interval for or , you can get various parts of this same sphere. Changing the value of to 2 has a predictable effect on the radius. These ideas are illustrated next.
Spherical coordinates with fixed
If, on the other hand, we fix the value of some other one of the spherical coordinates -- say, -- and let and roam through intervals, the resulting surface changes. In the next cell, we fix , and let roam through the interval , through . (Recall that and . These values have been used below.)
Cylindrical coordinates with fixed
As with spherical coordinates, there are three cylindrical coordinates . If we fix the value of any one of them while letting the other two roam through intervals of the real line, the result is a parametrized surface. The transformations from cylindrical to rectangular coordinates are
and .
(The -coordinate is the same in both.) In the cell below, we fix the value of at 2, and allow to roam in , in , resulting in a portion of a right circular cylinder.
You should play around with these methods for employing spherical and cylindrical coordinates to produce different types of surfaces until you feel quite comfortable with them. In particular, you should explore what happens when you fix the value of in spherical coordinates and use , as parameters in various intervals. You should also explore cylindrical coordinates further, fixing (i.e., and are the parameters) and then .
Other surfaces
Finally, you should not walk away from this lesson thinking the only value parametrized surfaces arise from spherical and cylindrical coordinates. Here are a couple more interesting examples that have nothing to do with either.
Torus:
Surface of rotation
Next, we take an initial curve in the -plane, and rotate it around the -axis to produce a surface of rotation. The initial curve is , for in the interval .
Mobius band
This is an interesting type of surface, as it is non-orientable. Said another way, it has just one side. You can actually make one of these out of a strip of paper and tape or glue.