Nodes inside shapes
Sometimes it is useful to deploy a bunch of nodes randomly inside some area marked by a shape.
Circles and polygons are first-class citizens,
but of course users may create their own deployments by implementing
Deployment
.
This example places 1000 nodes randomly in a
Circle
with center in (0, 0) and radius 10.
In the following example, they are instead deployed randomly within a 10x20
Rectangle
originating in (0,0).
Polygon
s
can be specified by providing all vertices.
In the following example, we deploy some nodes within the Venice lagoon.