ネスト (Nesting)
Nesting
コレクションはネスト(入れ子)することができます。つまり、コレクションの子要素は図形である必要はなく、コレクションにすることもできます。ネストされたコレクションを作成するには、コレクションに対して繰り返し (repeat) 操作を適用するか、コレクション内の図形に対して分割 (divide) 操作を適用します。
コレクションの繰り返し (Repeat a Collection)
この例では、まず円を分割して円グラフのコレクションを作成します。次に、その円グラフのコレクションを繰り返して、ネストされたコレクションを形成できます。
コレクション内の図形の分割 (Divide Shapes in a Collection)
この例では、まず繰り返しを使用して長方形のコレクションを作成します。次に、コレクション内の長方形を分割して、ネストされたコレクションを形成できます。
Collections can be nested: the children of a collection do not have to be shaped, they can be collections as well. To create nested collections, we can apply the repeat operation on a collection, or apply the divide operation on shapes inside a collection.
Repeat a Collection
In this example, we first create a collection of pies by dividing a circle. Then we can repeat the pie collection to form a nested collection.
Divide Shapes in a Collection
In this example, we first create a collection of rectangles using repeat. Then we can divide the rectangles in the collection to form a nested collection.