I haven't done part 2 yet, perhaps I will try tonight. ( and there is a proof of correctness of part I that I think should be added)
But learning about the problem shows it is an example of a "Voronoi diagram" https://en.wikipedia.org/wiki/Voronoi_diagram.
So that is something new and nice! #Math