# Error from BoundedDiagram

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.

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] 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 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] • 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. – Dr. belisarius Feb 7 '16 at 13:58