Database Reference
In-Depth Information
There's more...
Notetheformatfromtheprecedingsectionthatthe VoronoiTess functionexpects
our Voronoi center points in. We will need to write a function to convert from geo-
metry to a string in this list format.
Inaddition,weshouldunderstandwhat VoronoiTess returnsforoureffort.Itdoes
not directly return what we would consider polygons. We will have to construct our
polygonsfromwhatitreturns.Itreturnspointsasalistthatwewilltreatasastring
thatisthevaluesforthepointsfromwhichwewillconstructthepolygons.Italsore-
turnsVoronoiregions.Theseregionsaresimplyalistofwhichpointsmakeupeach
regionorVoronoipolygon.So,toassemblepolygons,werequiresomewaytocom-
parethelistofregionstothelistofpointsandassemblepolygonsfromthecompar-
ison of the two.
Thismeansthatwhat VoronoiTess returnsisessentiallytopological.Itwillgiveus
theregions;forexample,ID196inthefollowingscreenshot;plustheIDsforthever-
tices associated with the bounds of the regions, in this case numbers 133 through
140; however, these numbers are not necessarily sequential. If we were to look at
region 213, also adjacent below, its vertices would include vertex 134 and 135 as
shared with region 196.
Search WWH ::




Custom Search