stole code from rosettacode for voronoi calculation. needs significant modification.