Parameterized 3D curves
This functionality does not run in MATLAB.
plot::Curve3d([x, y, z]
,t = t_{min} .. t_{max}
, <a = a_{min} .. a_{max}
>,options
) plot::Curve3d(A_{3d}
,t = t_{min} .. t_{max}
, <a = a_{min} .. a_{max}
>,options
) plot::Curve3d(piecewiseF(t)
,t = t_{min} .. t_{max}
, <a = a_{min} .. a_{max}
>,options
)
plot::Curve3d([x(t), y(t), z(t)], t = t_{min}..
t_{max})
creates the space curve
.
plot::Curve2d
and plot::Curve3d
construct
curves in one parameter (see Example 1), possibly animated (see Example 2). The curves may
contain poles, in which case automatic clipping is used by default
(see Example 4).
By default, curves are sampled at equidistant values of the
parameter t
. The attribute AdaptiveMesh
can be
used to change this behavior, such that a denser sampling rate is
used in areas of higher curvature. Cf. Example 5.
Curves are graphical objects that can be manipulated, see the examples and the documentation of the parameters listed below for details.
Attribute  Purpose  Default Value 

AdaptiveMesh  adaptive sampling  0 
AffectViewingBox  influence of objects on the ViewingBox of
a scene  TRUE 
Color  the main color  RGB::Blue 
DiscontinuitySearch  semisymbolic search for discontinuities  TRUE 
Frames  the number of frames in an animation  50 
Legend  makes a legend entry  
LegendText  short explanatory text for legend  
LegendEntry  add this object to the legend?  TRUE 
LineColor  color of lines  RGB::Blue 
LineWidth  width of lines  0.35 
LineColor2  color of lines  RGB::DeepPink 
LineStyle  solid, dashed or dotted lines?  Solid 
LinesVisible  visibility of lines  TRUE 
LineColorType  line coloring types  Flat 
LineColorFunction  functional line coloring  
LineColorDirection  the direction of color transitions on lines  [0 , 0 , 1 ] 
LineColorDirectionX  xcomponent of the direction of color transitions on lines  0 
LineColorDirectionY  ycomponent of the direction of color transitions on lines  0 
LineColorDirectionZ  zcomponent of the direction of color transitions on lines  1 
Mesh  number of sample points  121 
Name  the name of a plot object (for browser and legend)  
ParameterEnd  end value of the animation parameter  
ParameterName  name of the animation parameter  
ParameterBegin  initial value of the animation parameter  
ParameterRange  range of the animation parameter  
PointSize  the size of points  1.5 
PointStyle  the presentation style of points  FilledCircles 
PointsVisible  visibility of mesh points  FALSE 
Submesh  density of submesh (additional sample points)  0 
TimeEnd  end time of the animation  10.0 
TimeBegin  start time of the animation  0.0 
TimeRange  the real time span of an animation  0.0 .. 10.0 
Title  object title  
TitleFont  font of object titles  [" sansserif " , 11 ] 
TitlePosition  position of object titles  
TitleAlignment  horizontal alignment of titles w.r.t. their coordinates  Center 
TitlePositionX  position of object titles, x component  
TitlePositionY  position of object titles, y component  
TitlePositionZ  position of object titles, z component  
UMax  final value of parameter "u"  5 
UMesh  number of sample points for parameter "u"  121 
UMin  initial value of parameter "u"  5 
UName  name of parameter "u"  
URange  range of parameter "u"  5 .. 5 
USubmesh  density of additional sample points for parameter "u"  0 
Visible  visibility  TRUE 
VisibleAfter  object visible after this time value  
VisibleBefore  object visible until this time value  
VisibleFromTo  object visible during this time range  
VisibleAfterEnd  object visible after its animation time ended?  TRUE 
VisibleBeforeBegin  object visible before its animation time starts?  TRUE 
XFunction  function for x values  
YFunction  function for y values  
ZFunction  function for z values 
Archimedes' Spiral is defined by f(r)
= (r sin(r), r cos(r)).
The corresponding call to plot::Curve2d
reads:
curve := plot::Curve2d([r*sin(r), r*cos(r)], r = 0..35)
plot(curve)
Note that this particular example is even more straightforward
to plot using plot::Polar
.
Continuing the example from above, we define an easy animation by making the angular part timedependent:
curve := plot::Curve2d([r*sin(r  t), r*cos(r  t)], r = 0..35, t = 0..2*PI, TimeEnd = 5, ViewingBox = [25..25, 25..25]): plot(curve)
Note that to start the animation, you have to doubleclick the image in the notebook and choose "Start" from the "Animation" menu.
Another useful and easy type of animation is achieved by animating the parameter range. This creates the illusion of the curve being drawn in real time:
curve := plot::Curve2d([sin(thet), cos(thet)], thet = 0..a, a = 0..2*PI): plot(curve)
curve := plot::Curve3d([sin(thet)*cos(20*thet), sin(thet)*sin(20*thet), cos(thet)], thet = 0..a, a = 0..PI): plot(curve)
Combining this with an animated LineColorFunction
, you
can even simulate motion:
colorfunc := (thet, x, y, a) > [athet, athet, 1.0]: curve := plot::Curve2d([sin(3*thet), sin(4*thet)], thet = a  1..a, LineColorFunction = colorfunc, LineWidth = 1, a = 0..2*PI): plot(curve)
Curves with poles are automatically clipped:
curve := plot::Curve2d([(1 + tan(3*t)^2)*sin(t), (1 + tan(3*t)^2)*cos(t)], t = 0..2*PI): plot(curve);
If the automatically chosen viewing box is not to your liking, you can explicitly set other values:
curve::ViewingBox := [2..2, 2..2]: plot(curve)
By default, curves are drawn by evaluating at equidistant values of the curve parameter. For curves that have few regions of high curvature, this may be inappropriate:
plot(plot::Curve2d([arctan(t), t^2  10*exp(50*t^2)], t = PI..PI))
Note the hard "kink" at the bottom of the picture.
On the other hand, the remainder of the curve is sufficiently smooth,
so globally increasing the number of evaluation points is not desirable. AdaptiveMesh
makes plot::Curve2d
look
for these kinks and adaptively increase the mesh density in problematic
areas:
plot(plot::Curve2d([arctan(t), t^2  10*exp(50*t^2)], t = PI..PI, AdaptiveMesh = 2))
To display a curve in the complex plane, map the listvalued
function [Re, Im]
to the curve:
plot( plot::Curve2d([Re, Im](zeta(I*y + 1/2)), y = 0..42, AdaptiveMesh = 3 ), XAxisTitle = "Re(z)", YAxisTitle = "Im(z)")
Create the following piecewise function:
f := piecewise([t < 0, [t, sin(10*t)^2, t^3]], [t >= 0, [t, 5*t/exp(t), t^2]])
Now, plot this function:
plot(plot::Curve3d(f, t = 10..10))

Realvalued expressions in 

A matrix of category 

A 

An identifier or an indexed identifier 

Realvalued expressions (possibly in the animation parameter) 

Animation parameter, specified as 