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 R^3 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"] );

[Maple Plot]


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);

[Maple Plot]


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 ) = t*sin(t) i + 3*t j + t*cos(t) k at the point corresponding to t = ¹. If a particle moves along this curve, what is the speed when t = Pi ?

Solution . Differentiation of the defining function for the curve gives

x '( t ) = ( sin(t)+t*cos(t), 3, cos(t)-t*sin(t) ).

Hence at time t = Pi , the velocity of motion is v ( Pi ) = ( -Pi, 3, -1 ). The speed of motion is then

abs(abs(v(Pi))) = sqrt(Pi^2+3^2+(-1)^2) = sqrt(Pi^2+10) .

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

x = ( 0, 3*Pi, -Pi ) + t ( -Pi, 3, -1 ) ̃ x = -Pi*t, y = 3*Pi+3*t, z = -Pi-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 ( 0, 3*Pi, -Pi ). Notice that while the parameter t ranges from 0 to 2*pi for the curve, its range for the tangent line is -1 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);

[Maple Plot]

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);

[Maple Plot]