Parametric Tube Plots

This page describes the plotting in three dimensional space of a tube around a parametric space curve defined by the parametric equations x=f(t), y=g(t), z=h(t), where f, g, and h are functions of the parameter t which ranges over a specified interval. The basic draw command for this function utilizes either the uncompiled functions or compiled functions format and uses the curve command to specify the three functions for the x, y, and z components of the curve. This uses the same format as that for space curves except that it requires a specification for the radius of the tube. If the radius of the tube is 0, then the result is the space curve itself. The general format for uncompiled functions is:

        draw(curve(f(t),g(t),h(t)),t=a..b,tubeRadius==r)

where a..b is the segment defining the interval [a,b] over which the parameter t ranges, and the tubeRadius is indicated by the variable r. In this case the functions are not compiled until the draw command is executed. Here is an example:

In the case of compiled functions, the functions are named and compiled independently. This is useful if you intend to use the functions often, or if the functions are long and complex. The following lines show functions whose parameters are of the type SmallFloat. The functions are compiled and stored by Axiom when entered.

Once the function is compiled the draw command only needs the names of the functions to execute. Here is a compiled functions example of a trefoil knot:

Note that the parameter range does not take the variable name as in the case of uncompiled functions. It is understood that the indicated range applies to the parameter of the functions, which in this case is t. Typically, the radius of the tube should be set between 0 and 1. A radius of less than 0 results in it's positive counterpart and a radius of greater than one cause self-intersection.