building voronoi diagram: converting positions and computing closest points.