Convex Hulls

InfoInfo
Search:    

Convex Hulls

Convex hulls can be added around a set of nodes by using the command createConvexHull(nodeset,color). This will create and color a convex hull around the nodeset and return a reference to the convex hull object. To delete a specific convex hull you would type removeConvexHull(hull), and to get a list of all hulls you would use getConvexHulls().

Note that convex hulls (especially transparent ones) make various operations a little slow so you may want to not use them until your are settled on a layout.

To get the figure below we did:

clusts = groupBy(dept) 
for c in clusts: createConvexHull(c,randomColor(120))

The additional value we pass to randomColor indicates the transparency (0-255) for the resulting random color. This allows us to see through hulls.


hull.jpg

This is a Wiki Spot wiki. Wiki Spot is a 501(c)3 non-profit organization that helps communities collaborate via wikis.