
« Trace  Sitemap  Sets of shapes » Sets of 2D elementsA set of elements is a collection of EJS elements of the same type. Technically they are stored in an array, which means that each element has an index number between 0 and n1. The total number n of elements in a set would be the dimension of that array. Most of the properties of the individual elements of a set  such as their positions or colours  can be specified by providing either a single value (which is then applied to all elements of the set) or an array of the same or larger dimension. In this latter case, each entry of the array is applied to the corresponding element of the set. Unless the dimension is very small (say, 2 or 3, where you could type something like
Defining 3dimensional arrays color , x , and y for e.g. a set of three 2Dshapes.
Once the property arrays are defined they can be manipulated e.g. in
The array variables can be used to define the view properties of a set of elements:
Use array variables for properties of e.g. SegmentSet2D.
Available sets for 2D elements
« Trace  Sitemap  Sets of shapes » 