I'd start with a Voronoi diagram to allocate an area for each of the 50000 clusters. Build the cluster inside its assigned area. Make connections between clusters that share a border. The connecting line should stay within the area assigned to the two clusters, e.g. the green line is a valid connection, but the red line is not.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…