Parametric Plots

"Basic Plotting" describes how to plot curves in the Wolfram Language in which you give the y coordinate of each point as a function of the x coordinate. You can also use the Wolfram Language to make parametric plots. In a parametric plot, you give both the x and y coordinates of each point as a function of a third parameter, say t.

Functions for generating parametric plots.

Here is the curve made by taking the x coordinate of each point to be (RefLink[Sin, paclet:ref/Sin])[t] and the y coordinate to be (RefLink[Sin, paclet:ref/Sin])[2t]:

ParametricPlot[{Sin[t],Sin[2t]},{t,0,2Pi}]

Three-dimensional parametric plots.

(RefLink[ParametricPlot3D, paclet:ref/ParametricPlot3D])[{(Subscript[f, x]),(Subscript[f, y]),(Subscript[f, z])},{t,(Subscript[t, min]),(Subscript[t, max])}] is the direct analog in three dimensions of (RefLink[ParametricPlot, paclet:ref/ParametricPlot])[{(Subscript[f, x]),(Subscript[f, y])},{t,(Subscript[t, min]),(Subscript[t, max])}] in two dimensions. In both cases, the Wolfram Language effectively generates a sequence of points by varying the parameter t, then forms a curve by joining these points. With (RefLink[ParametricPlot, paclet:ref/ParametricPlot]), the curve is in two dimensions; with (RefLink[ParametricPlot3D, paclet:ref/ParametricPlot3D]), it is in three dimensions.

This makes a parametric plot of a helical curve. Varying t produces circular motion in the x-y plane, and linear motion in the z direction:

ParametricPlot3D[{Sin[t],Cos[t],t/3},{t,0,15}]

(RefLink[ParametricPlot3D, paclet:ref/ParametricPlot3D])[{(Subscript[f, x]),(Subscript[f, y]),(Subscript[f, z])},{t,(Subscript[t, min]),(Subscript[t, max])},{u,(Subscript[u, min]),(Subscript[u, max])}] creates a surface, rather than a curve. The surface is formed from a collection of quadrilaterals. The corners of the quadrilaterals have coordinates corresponding to the values of the (Subscript[f, i]) when t and u take on values in a regular grid.

Here the x and y coordinates for the quadrilaterals are given simply by t and u. The result is a surface plot of the kind that can be produced by (RefLink[Plot3D, paclet:ref/Plot3D]):

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

This shows the same surface as before, but with the y coordinates distorted by a quadratic transformation:

ParametricPlot3D[{u Sin[t],u^2 Cos[t],u},{t,0,2Pi},{u,-1,1}]

This produces a helicoid surface by taking the helical curve shown above, and at each section of the curve drawing a quadrilateral:

ParametricPlot3D[{u Sin[t],u Cos[t],t/3},{t,0,15},{u,-1,1}]

In general, it is possible to construct many complicated surfaces using (RefLink[ParametricPlot3D, paclet:ref/ParametricPlot3D]). In each case, you can think of the surfaces as being formed by "distorting" or "rolling up" the t-u coordinate grid in a certain way.

This produces a cylinder. Varying the t parameter yields a circle in the x-y plane, while varying u moves the circles in the z direction:

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

This produces a torus. Varying u yields a circle, while varying t rotates the circle around the z axis to form the torus:

ParametricPlot3D[{Cos[t] (3+Cos[u]),Sin[t] (3+Cos[u]),Sin[u]},{t,0,2Pi},{u,0,2Pi}]

This produces a sphere:

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

You should realize that when you draw surfaces with (RefLink[ParametricPlot3D, paclet:ref/ParametricPlot3D]), the exact choice of parametrization is often crucial. You should be careful, for example, to avoid parametrizations in which all or part of your surface is covered more than once. Such multiple coverings often lead to discontinuities in the mesh drawn on the surface, and may make (RefLink[ParametricPlot3D, paclet:ref/ParametricPlot3D]) take much longer to render the surface.