Groups of 2D objects
This functionality does not run in MATLAB.
object2d1, object2d2, …, <
a = amin .. amax>,
plot::Group2d forms a group of any number
of graphical 2D objects.
Grouping together a larger number of graphical objects and accessing the group as a whole simplifies their handling. In particular, the main purpose of a group is to inherit graphical attributes that are shared by all members of the group.
If you wish to change the inherited attributes interactively, you should not select the group itself in the interactive object browser of the MuPAD® graphics tool (see section Viewer, Browser, and Inspector: Interactive Manipulation of this document). Underneath the group object, you find 'defaults' branches for the objects in the group. Select the 'defaults' branch for the object type that you wish to set attributes for.
A group may again contain groups.
We plot two groups of bubbles. Some bubbles are not visible as they are inside larger bubbles:
G1 := plot::Group3d(plot::Sphere(1/n, [0, 0, n/2 + 1/n] ) $ n = 1..10): G2 := plot::Group3d(plot::Sphere(1/(3*n), [0, 0, n/2 + 1/n] ) $ n = 2..10): plot(G1, G2)
We wish to increase transparency of all bubbles in the first group, but keep the bubbles in the second group opaque. Since the bubbles are grouped, it is easy to set different attribute values for the two groups:
G1::Color := RGB::SkyBlue.[0.25]: G2::Color := RGB::Red: plot(G1, G2)
delete G1, G2:
Consider a group
G1 consisting of two triangles
inscribed in an ellipse. We form a new group
of the group
G1, the ellipse and its focal points.
The entire figure given by the group
G2 is rotated
by an animated
G1 := plot::Group2d( plot::Polygon2d([[0, -1], [0, 1], [-2, 0]]), plot::Polygon2d([[0, -1], [0, 1], [ 2, 0]]), Closed = TRUE, Filled = TRUE, Color = RGB::Blue): G2 := plot::Group2d( G1, plot::Ellipse2d(2, 1,[0, 0]), plot::PointList2d([[-sqrt(3), 0], [sqrt(3), 0]]), PointSize = 2*unit::mm, PointColor = RGB::Red, LineColor = RGB::Black): plot(plot::Rotate2d(a, [0, 0], a = 0..2*PI, G2))
delete G1, G2:
Graphical 2D objects