When looking at the Delaunay graph, Voronoi sites on the region boundary are connected to other sites that are not immediate Voronoi neighbors, but also happen to touch on the same boundary line (probably to ensure convexity of the triangulation).
When playing around with the demo, you can easily see the problem. I highlighted one such edge on the right-hand side with a long white box.The edge connects two Voronoi sites are not immediate neighbors:
If this is intended, then the getNeighborSitesForSite method should be renamed to getDelaunayNeighborSitesForSite or so, to make sure that this is not a neighbor in the sense of the Voronoi diagram?
Also, do you have a quick fix for getting such a Voronoi graph that only connects Voronoi neighbor sites?
This result is indeed intended, because the Delaunay triangulation by definition includes the convex hull. A graph that omits the hull edges would not be the Delaunay triangulation.
When looking at the Delaunay graph, Voronoi sites on the region boundary are connected to other sites that are not immediate Voronoi neighbors, but also happen to touch on the same boundary line (probably to ensure convexity of the triangulation).
When playing around with the demo, you can easily see the problem. I highlighted one such edge on the right-hand side with a long white box.The edge connects two Voronoi sites are not immediate neighbors:
If this is intended, then the
getNeighborSitesForSite
method should be renamed togetDelaunayNeighborSitesForSite
or so, to make sure that this is not a neighbor in the sense of the Voronoi diagram?Also, do you have a quick fix for getting such a Voronoi graph that only connects Voronoi neighbor sites?