Calculus II
Lesson 25: Parametric Curves
Introduction
Some simple curves in a plane may be described algebraically by setting up a suitable co-ordinate system in the plane and describing the curve as the graph of a function. We have seen already how useful such a description is; for example, we used it to obtain a formula for the arclength of such a curve. The description fails, however, for even so simple a curve as a circle: there is no choice of co-ordinate system for which a circle is the graph of a function. (Why?) To describe a general curve, either in the plane or in 3-dimensional space, we must take a different approach. Instead of relating one co-ordinate on the curve to the other by an equation such as , we relate each co-ordinate separately to a parameter by a set of equations , (and if we are in 3 dimensions). You can use any letter for the parameter, but is a traditional choice, partly because it is useful to think of the parameter as representing time, and to imagine the curve as the path traced out by a particle which is at the point ( , ) at time .
Plotting Parametric Curves with Maple
2-dimensional parametric curves can be plotted with Maple's plot command.
> plot([cos(t), sin(t), t=0..2*Pi], scaling=constrained);
(The output from this command might be clearer if you click on the picture and force Maple to draw it with a 1:1 scale on the axes.) What is the difference between the last curve and this next one?
> plot([cos(2*t), sin(2*t), t=0..2*Pi], scaling=constrained);
> plot([sin(t), sin(t)^2, t=-2..2]);
The syntax of the parametric plot is probably not unexpected, except for one thing: the range appears inside the square brackets. There is a reason for this: it enables you to plot more than one parametric curve on the same set of axes, with different parameter ranges. The following examples show this.
> f1 := t-> 3*cos(2*t) ; g1 := t-> sin(4*t) ;
> plot([f1(t), g1(t), t=0..2*Pi]);
> f2 := t-> cos(t)/ln(t) ; g2 := t-> sin(t)/ln(t) ;
> plot([f2(t), g2(t), t=3..20]);
> plot({[f1(t), g1(t), t=0..2*Pi], [f2(t), g2(t), t=3..20]});
(Note the use of braces in the last command.)
Question 1
Parametric curves of the form , , with in , are known as Lissajous curves. Here, is the parameter and , , and are constants which determine the particular curve in the family. Here are two examples:
> plot([2*cos(3*t), 7*sin(2*t), t=0..2*Pi]);
> plot([cos(5*t), 2*sin(3*t), t=0..2*Pi]);
Trace around these two curves until you understand how they are related to the equations which define them. Then ask Maple to plot one or two other Lissajous curves. See if you can guess what each one will look like before you plot it. (For some reason, Maple was giving me strange results with curves that involved ; I suggest you avoid these examples. You can try them if you like, but don't necessarily believe the results!)
Solution: The easiest way to see what is happening is to concentrate on one co-ordinate at a time. The first curve above is given by the equations , . As goes from 0 to , the co-ordinate will oscillate back and forth between 2 and -2 three times ( will pass through three complete periods of the cosine function). At the same time, the co-ordinate will oscillate between 7 and -7 twice. You should be able to trace round the curve, concentrating on either the horizontal or the vertical motion, and see these two oscillations. Similarly, in the second curve, goes through 5 complete periods while goes through 3.
The oscillations with different frequencies in different directions can sometimes give amusing results. Consider the effect that an apparently small change makes in the following examples.
> plot([cos(32*t), sin(63*t), t=0..2*Pi]);
> plot([cos(32*t), sin(64*t), t=0..2*Pi]);
Do you see what happened in this last curve?
Finally, execute the following command, and explain what it does. (You will have to click on the picture which is produced to get additional controls.)
> with(plots):
> animate([2*cos(3*t), b*sin(2*t), t=0..2*Pi, numpoints=500], b=2..10);
Here is another version of the same command. What , if anything, is the difference in the result?
> animate([2*cos(3*t), (6 + 4*sin(b))*sin(2*t), t=0..2*Pi], b=0..2*Pi);
Solution: The factors in front of the sine or cosine functions in Lissajopus curves are simply scale factors: they stretch the curve in one or other of the co-ordinate directions. Here we have a family of Lissajous curves with a scale factor in the vertical direction which depends on a parameter . The animate command draws the curves for a certain number of values of between 0 and , and plays them as a movie. Since the scale factor is periodic in , the movie can be played continuously, and its last frame joins up smoothly with the first.
>
Maple can plot 3-dimensional parametric curves, too. For this, you must use the command spacecurve , which resides in the plots package. If you did Question 1, you have already loaded plots to use the animate command, but there is no harm in reloading it now.
> spacecurve([t, sin(t), cos(t)], t=0..2*Pi);
You will almost always want to use this command with axes and labels:
> spacecurve([t, sin(t), cos(t)], t=0..2*Pi, axes=normal, labels=[x,y,z]);
Spacecurve will plot more than one curve at a time, but this is not as useful as it is with 2-dimensional curves: the picture gets cluttered very quickly. You can look at the help page to find the syntax if you need it.
Question 2
Use spacecurve to plot spirals whose axes lie along the and axes.
Solution: Along the -axis first, then the -axis.
> spacecurve([sin(t),t, cos(t)], t=0..2*Pi, axes=normal, labels=[x,y,z]);
> spacecurve([sin(t), cos(t),t], t=0..2*Pi, axes=normal, labels=[x,y,z]);