**Parametric Space Curves in Maple**

**Copyright © 2001 by James F. Hurley, University of Connecticut Department of Mathematics, Unit 3009, Storrs CT 06269-3009. All rights reserved.**

Maple readily produces 3-dimensional plots of parametric curves. The basic command for plotting parametric curves in the real Euclidean space
is

spacecurve( [x(t), y(t), z(t), t = a..b] ) .

This is not available in Maple's basic start-up configuration. You must first load the package
plots
, which as we have already seen provides many handy 3-dimensional plotting tools.

For example, the following two-line routine plots the
*circular helix*
of radius 1 over the
*t*
-interval [Ð4¹, 4¹.]:

** **
x(
*t*
) = cos(
*t*
)
**i**
+ sin (
*t*
)
**j**
+
*t*
**k**
.

The option
axes = boxed
puts a coordinate box around the curve. For a different style of display, change
boxed
to
frame
. Try it!

`> `
**with (plots):
spacecurve( [cos(t), sin(t), t], t = -4*Pi..4*Pi, axes = boxed );**

By default, Maple plots just 50 points. Increasing that generally leads to a smoother image. The following command does so, and also adds labels on the coordinate axes.

`> `
**with (plots):
spacecurve( [cos(t), sin(t), t], t = -4*Pi..4*Pi, axes = boxed, numpoints = 150, labels = ["x", "y", "z"] );**

The following routine enhances the output further by adding coordinate axes and labels (magenta in color) to the plot at their actual positionsÑrather than on a surrounding box.. The result looks similar to textbook graphs, and so you can use this routine to recreate and explore variations on those figures. Use Maple's live-rotation feature to rotate it any way you like for different views of the curve. Activate that by clicking on the graph; then use the mouse to manipulate the image.

`> `
**with (plots):
curve := spacecurve( [cos(t), sin(t), t], t = -4*Pi..4*Pi, axes=boxed, numpoints = 150, labels = ["x", "y", "z"] ):
xaxis := spacecurve( [t, 0, 0, t = -1..1, color = magenta] ):
yaxis := spacecurve( [0, t, 0, t = -1..1, color = magenta] ):
zaxis := spacecurve( [0, 0, t, t = -12..12, color = magenta] ):
labx := textplot3d([1.2, 0, -.2, `x`], color = magenta):
laby := textplot3d([0,1.2, -.2, `y`], color = magenta):
labz := textplot3d([0, 0, 12.5, `z`], color = magenta):
display(curve, xaxis, yaxis, zaxis, labx, laby, labz);**

The next example is Exercise 6, Section 2.1, of
*Multivariable Calculus*
by James Hurley, Saunders/Harcourt Brace, 1999.

**Example. **
Find the equation of the tangent line to the parametric curve
**x**
(
*t*
) =
**i**
+
**j**
+
**k**
at the point corresponding to
*t*
= ¹.
If a particle moves along this curve, what is the speed when t =
?

**Solution**
. Differentiation of the defining function for the curve gives

**x**
'(
*t*
) = (
).

Hence at time
*t*
=
, the velocity of motion is
**v**
(
) = (
). The speed of motion is then

= = .

Since
gives
**x**
(
) = (
), the equation of the tangent line
*T*
to the curve at the point
*P*
corresponding to
is

x = (
) +
*t*
(
)
Þ
.

The next routine uses the
spacecurve
command
to plot both the curve (in red) and its tangent line (in blue) at the point
*P*
(
). Notice that while the parameter t ranges from 0 to
for the curve, its range for the tangent line is
to 1. Why? Consider which point of the tangent line correpsonds to t = 0! Each curve/line has its own parametrization, independent of others that you may want to plot in the same display.

Also note that by using Maple's
axes = framed
command, you can put coordinate axes in a more standard position, without the need for calculating appropriate ranges of values along the axes. Compare the output with that from the preceding routine. (Unfortunately, the labelling for the
axes = normal
command seems to switch the labels for the x- and z-axes. You can see that by clicking on the plot, and then selecting
normal
from the
**axes**
menu.)

`> `
**with (plots):
curve := spacecurve( [t*sin(t), 3*t, t*cos(t)], t = 0..2*Pi, axes = framed, numpoints = 150, labels = ["x", "y", "z"], color = red ):
tanline := spacecurve( [-Pi*t, 3*Pi + 3*t, -Pi - t], t = -1..1, axes = normal, color = blue ):
display(curve, tanline);**

The next routine plots the curve
*C*
(with corresponding red label), the tangent line
*T*
(with corresponding blue label) and also includes the point
*P*
of tangency with a magenta label. Note the commands for including those labels in the italic roman type textbooks use for such symbols.

`> `
**with (plots):
curve := spacecurve( [t*sin(t), 3*t, t*cos(t)], t = 0..2*Pi, axes = framed, labels = ["x", "y", "z"], numpoints = 150, color = red ):
tanline := spacecurve( [-Pi*t, 3*Pi + 3*t, -Pi - t], t = -1..1, axes = framed, labels = ["x", "y", "z"], color = blue ):
labcurve := textplot3d( [6*sin(6), 3*6, 6*cos(6) - 1.5, "C"], color = red, font = [TIMES, ITALIC, 14]):
labtan := textplot3d( [-Pi, 3*Pi + 3, -Pi -1.5, "T"], color = blue, font = [TIMES, ITALIC, 14]):
labpoint := textplot3d([0, 3*Pi, -Pi -1.5, "P"], color = magenta, font = [TIMES, ITALIC, 14]):
display(curve, tanline, labcurve, labtan, labpoint);**