I found some unusual error in VoronoiMesh. I have the points pts, and first I compute the VoronoiMesh for that, Note the red circle: these are two close datapoints, and it correctly draws a line between them.
dom=1.25\[Pi] (* domain size *)
domspec=Transpose[{{0,0},{dom,dom}}]
pts={{1.880951464600067`,1.473752017061138`},{1.8913812543459405`,2.319493673670671`},{1.7674367495794008`,3.5325088938533917`},{1.9320143413972677`,3.611151717969884`},{1.8107126970778207`,3.6790935311559876`},{1.804725058474518`,3.8520729911980185`},{1.805368854133445`,3.852728507949241`},{1.563939776616803`,3.9192958794919646`}};
VoronoiMesh[pts,domspec,Epilog->{Point[pts],Red,Circle[pts[[6]],0.1]},PlotRange->domspec,ImageSize->500,PlotRangePadding->Scaled[.05]]
![enter image description here](http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2016-05-03at16.23.33.png&userId=73716)
Now, I add points around it (to make the Voronoi periodic), leaving the old ones, and only adding more points around it. Then the voronoi is not correctly computed:
allpts=Join@@Join@@Table[p+dom {i,j},{i,-1,1},{j,-1,1},{p,pts}]; (* add groups of points around it, making it periodic *)
VoronoiMesh[allpts,Epilog->{Point[pts],Red,Circle[pts[[6]],0.1]},PlotRange->domspec,ImageSize->500,PlotRangePadding->Scaled[.05]]
![enter image description here](http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2016-05-03at16.24.30.png&userId=73716)
I have millions and millions of points and it took me several hours to 'minimize' the error and go to the core of it.
Any help is welcome! Is there some option that controls when two points are considered the same? It looks like some points are deleted because they are too close?
The distance between point 6 and 7 is:
Log10[Norm[pts[[6]] - pts[[7]]]]
-3.03678
So it should not be some machine-precision issue I presume! If someone can confirm it on different versions that would be appreciated.
This is done in 10.4.1 and 10.3.1 on Mac, both show the error.