# In a list of Disk, how to efficiently delete Disk which are close to other Disk? [duplicate]

I want to draw pictrue like this:

My code is:

mycountry=BoundaryDiscretizeGraphics@CountryData["China","Polygon"];

list={Disk[RandomPoint[mycountry],RandomReal[0.01]]};
While[Length[list]<50,disk=Disk[center=
RandomPoint[mycountry],r=RandomReal[{1,5}]];If[And@@((EuclideanDistance[center,
#[[1]]]>r+#[[2]])&/@list),
AppendTo[list,disk]]]//AbsoluteTiming

(*{19.357, Null}*)

Graphics[Transpose[{RandomColor[Hue[1/3,
NormalDistribution[.6,.2],NormalDistribution[.6,.07]],list//Length],Disk@@@list}]]


As you see,The way ahead of me is long,the Length[list] is just 50,but the time is 19s.Then I use the @belisarius 's SameTest in here,Then the While can be:

        list={Disk[RandomPoint[mycountry],RandomReal[0.01]]};
BlockRandom@While[Length[list]<50,disk=Disk[RandomPoint[mycountry],
RandomReal[{1,5}]];list=Union[Append[list,disk],SameTest->(EuclideanDistance[#1[[1]],#2[[1]]]<(#1[[2]]+#2[[2]])&)]]//AbsoluteTiming

(*{44.0782, Null}*)


Although I have tried SameTest->(EuclideanDistance[#1[[1]],#2[[1]]]<(#1[[2]]+#2[[2]])&),SameTest -> (! RegionAlmostDisjointQ[{#1, #2}] &)andSameTest->(!RegionRegionDisjoint[#1,#2]&),The speed is slow still.By the way,I found a bug in a undocument function of RegionRegionSubset,such as

    If[RegionRegionSubset[disk,mycountry]&&And@@((EuclideanDistance[center,
#[[1]]]>r+#[[2]])&/@list),AppendTo[list,disk]]


The RegionRegionSubset don't work.So anybody can try a faster version to me?

ps:(and how can I input "" normally in stackexchange?)

• If you want the disks packed densely, consult: mathematica.stackexchange.com/questions/87676/… – David G. Stork Sep 28 '15 at 2:06
• @DavidG.Stork Thanks for your prompt.And the post's typesets is disorder,Can you tell me how to type a context symbol?I should be refind the typesets. – yode Sep 28 '15 at 2:20
• @yode I showed you how to do it, and then you changed it back. But you can still see how to do it in the question's history. – C. E. Sep 28 '15 at 2:25
• Is there a difference between this question and this question? – C. E. Sep 28 '15 at 2:28
• @Pickett I'm sorry to hear that.Or you can change it again.¯ㅂ¯,The networ acess to SE is too slow in my country. – yode Sep 28 '15 at 2:30