I am trying to build a Voronoi diagram of three points:
library(tripack)
x<-c(1.7,-2.2,0.5)
y<-c(-0.6,-0.2,0.8)
v<-voronoi.mosaic(x,y)
plot(v)
However, it just shows an empty plot.
print(v)
gives:
voronoi mosaic:
nodes: (x,y): neighbours (<0: dummy node)
1: (-0.3238956,-1.120482): -1 -2 -3
dummy nodes: (x,y)
1: (-0.3238956,-1.120482)
2: (-0.3238956,-1.120482)
3: (-0.3238956,-1.120482)
This is mistake? It makes sense? In my opinion, it would be nice to build a Voronoi diagram from three points.
source
share