plots - Maple Programming Help

Home : Support : Online Help : Graphics : Packages : plots : plots/spacecurve

plots

 spacecurve
 plotting of 3-D space curves

 Calling Sequence spacecurve(sc, r, opts)

Parameters

 sc - list, Array, or rtable; a space curve r - name=range; the parameter range opts - (optional) equations specifying options for the spacecurve command

Description

 • The spacecurve function plots a curve or a set of curves in three-dimensional space.
 • The first argument is a space curve defined as a list of points or a list of three or more components.  An Array or rtable may be used instead of a list.
 • When a list of components is provided, the first three components are considered to be the parametric representations of the x, y, and z coordinates.  Each of these components is an algebraic expression in a variable t.  Additional components can include the parameter range or the numpoints option described below.
 • Multiple space curves may be plotted.  To do this, provide a set of space curves instead of a single curve as the parameter sc.
 • The second argument r is the parameter range, provided in the form t=a..b.  This argument is optional if it is provided locally within each space curve.
 • The third argument opts is a sequence of one or more options.  This can include the numpoints=n option, which specifies the number of points used for drawing the curve.  The default value for n is 50.  The numpoints option may be provided locally within each space curve.
 • Other options allowed in the opts parameter are the same as those accepted by the plot3d command.  These are described in the plot3d/option help page.  Note that some options, such as grid, are not applicable.
 • The result of a call to spacecurve is a PLOT3D structure which can be rendered by the plotting device. You can assign a PLOT3D value to a variable, save it in a file, then read it back in for redisplay. See plot3d/structure.
 • spacecurve may be defined by with(plots) or with(plots,spacecurve). It can also be used by the name plots[spacecurve].

Examples

 > $\mathrm{with}\left(\mathrm{plots}\right):$
 > $\mathrm{spacecurve}\left(\left[\mathrm{cos}\left(t\right),\mathrm{sin}\left(t\right),t\right],t=0..4\mathrm{\pi }\right)$
 > $\mathrm{spacecurve}\left(\left\{\left[\mathrm{cos}\left(t\right)+1,\mathrm{sin}\left(t\right),0,\mathrm{numpoints}=10\right],\left[\mathrm{sin}\left(t\right),0,\mathrm{cos}\left(t\right),t=0..2\mathrm{\pi }\right]\right\},t=-\mathrm{\pi }..\mathrm{\pi },\mathrm{axes}=\mathrm{frame}\right)$
 > $\mathrm{spacecurve}\left(\left\{\left[4\mathrm{cos}\left(t\right),4\mathrm{sin}\left(t\right),0\right],\left[t\mathrm{sin}\left(t\right),t,t\mathrm{cos}\left(t\right)\right]\right\},t=-\mathrm{\pi }..2\mathrm{\pi }\right)$
 > $\mathrm{knot}≔\left[-10\mathrm{cos}\left(t\right)-2\mathrm{cos}\left(5t\right)+15\mathrm{sin}\left(2t\right),-15\mathrm{cos}\left(2t\right)+10\mathrm{sin}\left(t\right)-2\mathrm{sin}\left(5t\right),10\mathrm{cos}\left(3t\right),t=0..2\mathrm{\pi }\right]:$
 > $\mathrm{spacecurve}\left(\mathrm{knot}\right)$
 > $\mathrm{helix_points}≔\left[\mathrm{seq}\left(\left[10\mathrm{cos}\left(\frac{r}{30}\right),10\mathrm{sin}\left(\frac{r}{30}\right),\frac{r}{3}\right],r=0..240\right)\right]:$
 > $\mathrm{spacecurve}\left(\mathrm{helix_points}\right)$
 > $\mathrm{spacecurve}\left(\left\{\mathrm{knot},\mathrm{helix_points}\right\}\right)$