This is a web source code of voronoi diagram algorithm. Implement in javascript