Position N circles of different radii inside a larger circle without overlapping

后端 未结 6 2009
甜味超标
甜味超标 2021-01-30 09:19

Given n circles with radii r1 ... rn, position them in such a way that no circles are overlapping and the bounding circle is of \"small\" radius.

The program takes a lis

6条回答
  •  无人共我
    2021-01-30 10:01

    You could try using a 2d physics library, and just pour your 2d circles into a larger circular container - and wait for them to settle into place.

提交回复
热议问题