Closed arwalton closed 3 years ago
Unfortunately there is no elegant way around it, Fortune's algorithm used by this library requires the space to be a rectangular shape. You will have to manually remove the external areas to fit your map, possibly by drawing the diagram separately and then applying a mask to it.
No worries. Thanks for letting me know. I'll rig up a solution then.
I'm doing a project where I overlay a diagram on a map to show the location of the nearest hospital in an area. Unfortunately, the mapped area is not very rectangular, so the diagram has very large cells around the edges that go into surrounding areas. Is there an elegant way to create a border on the voronoi diagram that more nearly matches the borders of the mapped area?