Suppose I have a set of points pts
, from which I generate a Voronoi diagram VD
:
pts = RandomReal[{-1, 1}, {100, 2}];
VD = Show[VoronoiMesh[pts], Graphics[{Red, Point[pts]}]]
Now, as per the geometric transformation made with Voronoiesh[]
, we can observe that the area of the "outer" cells project themselves indefinitely until their edges intersect with another cell, so their area is much larger than that of the 'interior' cells.
My question is, how could I 'bound' the Voronoi diagram so that the outer cells have roughly the same area as the interior ones?
I'm thinking that a possible solution would require generating a 'mask' that bounds the region covered by pts
, and then excluding the area outside this mask. I was thinking of generating such a mask as the merge of circles centered at each point, with a radius producing roughly the same area as the interior points.
A second solution I've been thinking of is to generate some excess of points ptsOuter
, which cover an area external to the area within pts
, roughly equally spaced than the pts
. Then, make the Voronoi mesh on the set {pts, ptsOuter}, which I'd think would bound the points in pts
by using the points in ptsOuter
.
I am wondering if there is an easier or more efficient way than these ideas I currently have.
Thanks!
Edit: By 'border' I mean a limit that follows the distribution of the points in pts
, imagine something like this at the end (the drawn border here, which would exclude the area outside it):