It is known how to make Voronoi diagram using DensityPlot and Nearest. I assumed that it is possible to use ImplicitRegion instead of DensityPlot, but the next code not work:

n = 7; pts = RandomReal[{-1, 1}, {n, 2}];
r = ImplicitRegion[First@Nearest[pts, {x, y}] == pts[[1]], {x, y}]

The Output is EmptyRegion[2] always.


Your Answer

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

Browse other questions tagged or ask your own question.