plot
::PointList3d
Finite lists of 3D points
MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
plot::PointList3d(pts
, <a = amin .. amax
>,options
) plot::PointList3d(M3d
, <a = amin .. amax
>,options
)
plot::PointList3d
holds lists of points in
3D.
This is a container for a large finite number of points. It
lets you avoid constructing large numbers of objects of type plot::Point3d
, for
two reasons. First, the point types have non-negligible overhead and
constructing and plotting a large number of them (say, five thousand)
takes more time than plotting the same number of points in a single
container object. Second, having five thousand points in the object
browser takes a significant amount of memory and is not as lucid as
having a single point list.
The attribute Points3d
is displayed in the inspector in
the user interface only for short lists.
plot::PointList3d
internally uses lists for
storing the points. It is therefore not recommended to add a large
number of points one-by-one.
If you specify the color of one point, you must specify the colors of all other points in the list. See Example 2.
Attribute | Purpose | Default Value |
---|---|---|
AffectViewingBox | influence of objects on the ViewingBox of
a scene | TRUE |
Color | the main color | RGB::MidnightBlue |
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? | FALSE |
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 | |
Points3d | list of 3D points | |
PointSize | the size of points | 1.5 |
PointColor | the color of points | RGB::MidnightBlue |
PointStyle | the presentation style of points | FilledCircles |
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 | [" sans-serif " , 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 | |
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 |
plot::PointList3d
provides a basic form of
scatter plot:
plot(plot::PointList3d([[1,1,1], [1,2,2], [1,3,2], [1,3,4], [2,1,1], [2,2,3], [2,3.5, 4]], PointSize=5))
We can use this, for example, to get a visual test of random number generators:
r := frandom(0): plot(plot::PointList3d([[r(), r(), r()] $ i=1..10000])):
r := random(10^10)*1e-10: plot(plot::PointList3d([[r(), r(), r()] $ i=1..10000])):
frandom
and random
fill the cube
nicely, without noticeable patterns. The following generator, however,
should probably not be used:
randseed := 12345: r := proc() begin randseed := (randseed * 17 + 8) mod 10^10: 1e-10 * randseed; end: plot(plot::PointList3d([[r(), r(), r()] $ i=1..10000])):
plot::PointList3d
lets
you specify the colors of the points. For example, the following list
contains three points. When you plot this list, the first point appears
in red, and the second point appears in green, and the third point
appears in blue:
plot(plot::PointList3d([[1,1,1,RGB::Red], [2,2,2,RGB::Green], [1,3,3,RGB::Blue]], PointSize=5))
If you specify the color of one point, you must also specify the colors of all other points in the list:
plot(plot::PointList3d([[1,1,1,RGB::Red], [2,2,2], [1,3,3]], PointSize=5))
Error: Attribute 'Points3d' in the 'PointList3d' object must be a list of lists of three expressions and an optional color value. [plot]
|
A list of points. A point must not be of type
|
|
An array or a matrix with three columns. Each row provides the coordinates of one point.
|
|
Animation parameter, specified as |