- resqpy.olio.triangulation.voronoi(p, t, b, aoi: Polyline)¶
Returns dual Voronoi diagram for a Delauney triangulation.
p (numpy float array of shape (N, 2)) – seed points used in the Delauney triangulation
t (numpy int array of shape (M, 3)) – the Delauney triangulation of p as returned by dt()
b (numpy int array of shape (B,)) – clockwise sorted list of indices into p of the boundary points of the triangulation t
aoi (lines.Polyline) – area of interest; a closed clockwise polyline that must strictly contain all p (no points exactly on or outside the polyline)
c, v where – c is a numpy float array of shape (M+E, 2) being the circumcircle centres of the M triangles and E boundary points from the aoi polygon line; and v is a list of N Voronoi cell lists of clockwise ints, each int being an index into c
the aoi polyline forms the outer boundary for the Voronoi polygons for points on the outer edge of the triangulation; all points p must lie strictly within the aoi, which must be convex; the triangulation t, of points p, must also have a convex hull; note that the dt() function can produce a triangulation with slight concavities on the hull, especially for smaller values of its container_size_factor argument