Link to puzzle
Points are three dimensional, I'm using brightness as the z axis. See Kruskal's algorithm.