Plotting Space Curves in MathematicaCopyright © 1995, 1998, 2001, 2003 by James F. Hurley, Department of Mathematics, University of Connecticut, Unit 3009, Storrs CT 06269-3009. All rights reserved.

Consider a helix in ${R}^{3}$that winds around the right circular cylinder perpendicular to the xy-plane with radius a. A simple parametric vector equation for the part of the curve that corresponds to t [0, 2 π] is

x = a cos t i  + a sin t j  +  t k, t [0, 2 π].

The following single Mathematica command produces a black-and-white plot of this curve for a = 1. Execute the command to see that plot. (As usual, do that by placing the cursor at the end of the command and pressing the Enter key at the lower right corner of the keyboard.)

ParametricPlot3D[{Cos[t], Sin[t], t}, {t, 0, 2 Pi}]

To plot the curve in magenta (a mix of equal parts of red and blue), use the following command.

ParametricPlot3D[{Cos[t], Sin[t], t, RGBColor[1, 0, 1]}, {t, 0, 2 Pi}]

The next routine adds blue coordinate axes inside the default coordinate box. It plots the axes as llines through the x-, y-, or z-axes with respective parametrizations (t , 0, 0), (0, t, 0) (0, 0, t), for t R. Since the edges of the coordinate box surrounding the curve and coordinate-axis segments carry labels, none appear along the blue coordinate axes themselves. Execute the following code to see the plot.

ParametricPlot3D[{
{Cos[t], Sin[t], t,RGBColor[1, 0, 1]},
{t, 0, 0, RGBColor[0, 0, 1]},
{0, t, 0, RGBColor[0, 0, 1]},
{0, 0, t, RGBColor[0, 0, 1]}
},
{t, 0, 2 Pi}, AxesLabel -> {x, y, z}
]

Note that the three new lines of code simply plot the three lines  x = t i, x = t j, and x = t k, for t in the same range [0, 2π] as for the helix x = x(t) = cos t i + sin t j + t k.

A slight variation of the last routine plots the parametric curve

x(t) = t i + ${t}^{2}$ j + (4${t}^{2}+\text{}$${t}^{4}$) k, t [0, 3]

from Exercise 32 of Section 14.1 of
Multivariable Calculus, 4th Edition by Stewart.

ParametricPlot3D[{
{t, t^2, 4*t^2 + t^4, RGBColor[1, 0, 1]},
{t, 0, 0, RGBColor[0, 0, 1]},
{0, 3*t, 0, RGBColor[0, 0, 1]},
{0, 0, 3*t, RGBColor[0, 0, 1]}
},{t, 0, 3}, AxesLabel -> {x, y, z} ]

Slight editing of that produces the following routine, which plots the parametric curve in Example 6 of Section 14.1: x(t) = t i + ${t}^{2}$ j + ${t}^{3}$ k,  for t [- 2, 2].

ParametricPlot3D[{
{t, t^2, t^3, RGBColor[1, 0, 1]},
{t, 0, 0, RGBColor[0, 0, 1]},
{0, 2*t, 0, RGBColor[0, 0, 1]},
{0, 0, 4*t, RGBColor[0, 0, 1]}
},{t, -2, 2}, AxesLabel -> {x, y, z}
]

Note: to alter the viewpoint for displaying plots, in the last line of code above insert a comma. Then pull down the Input menu, and select 3D Viewpoint Selector. Choose Cartesian or Spherical. Then depress your mouse and use the OpenGL control box to rotate the image to a new location. Then release the mouse, click on Paste (which pastes the new viewpoint into the code after the comma you inserted) and close the control box. Executing the altered code produces the same image, but viewed from the new point. To see the effect, execute the code below, which was produced by following this process, and compare it with the output from the original code.

In[8]:=

$\mathrm{ParametricPlot3D}\left[\left\{\text{}\text{}\left\{t,\text{}t^2,\text{}t^3,\text{}\mathrm{RGBColor}\left[1,\text{}0,\text{}1\right]\right\},\text{}\text{}\text{}\left\{t,\text{}0,\text{}0,\text{}\mathrm{RGBColor}\left[0,\text{}0,\text{}1\right]\right\},\text{}\text{}\text{}\left\{0,\text{}2*t,\text{}0,\text{}\mathrm{RGBColor}\left[0,\text{}0,\text{}1\right]\right\},\text{}\text{}\text{}\left\{0,\text{}0,\text{}4*t,\text{}\mathrm{RGBColor}\left[0,\text{}0,\text{}1\right]\right\}\text{}\text{}\right\},\left\{t,\text{}-2,\text{}2\right\},\text{}\mathrm{AxesLabel}\text{}->\text{}\left\{x,\text{}y,\text{}z\right\}\text{}\text{},\text{}\mathrm{ViewPoint}->\left\{1.803,\text{}-2.773,\text{}0.713\right\}\text{}\right]$

Out[8]=

$⁃\mathrm{Graphics3D}⁃$

Converted by Mathematica  (June 5, 2003)