6
$\begingroup$

I cannot understand the meaning of the error

BoundedDiagram::notuniq: BoundedDiagram requires that boundary vertices lie in unique Voronoi polygons. >>

BoundedDiagram::nobd: Bounded diagram failed. >>

When I try to run the following code, it gives me the above error.

Needs["ComputationalGeometry`"]
Boundary = {{-2, 2}, {2, 2}, {2, -2}, {-2, -2}};
points = {{-1, 0}, {1, 0}, {1, 1}};
BoundedDiagram[Boundary, points]
DiagramPlot[points]

Is it a problem with the code? Have i misunderstood BoundedDiagram?

What I have posted here is a simplified situation. I am using more points in real work.

$\endgroup$
5
$\begingroup$

The error message is telling you that you don't have enough points to use BoundedDiagram. The Voronoi diagram for your points looks like this

Needs["ComputationalGeometry`"]
bounds = {{-2, 2}, {2, 2}, {2, -2}, {-2, -2}};
points = {{-1, 0}, {1, 0}, {1, 1}};
DiagramPlot[points, Frame -> True]

voronoi.1.png

Since there are only three Voronoi regions, at least two points from your boundary set must lie in one region and this is not permitted.

If the point set is expanded to four points,

pts = {{-1, 1}, {-1, -1}, {1, 0}, {1, 1}};
DiagramPlot[pts, Frame -> True]

then the Voronoi diagram will look like this

voronoi.2.png

Now each point in the boundary set is isolated into a unique Voronoi region, and BoundedDiagram will work

DiagramPlot[First @ BoundedDiagram[bounds, pts],
  Epilog -> {PointSize[Large], Point[pts]},
  Frame -> True]

bounded.voronoi.png

$\endgroup$
1
  • 1
    $\begingroup$ Could you explain "Since there are only three Voronoi regions, at least two points from your boundary set must lie in one region and this is not permitted." a little further, please. $\endgroup$ – Dr. belisarius Feb 7 '16 at 13:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.