Circular Packing

Hi Guys,

Can someone guide me to do circular packing on a surface. I looked for examples on the forum but could not use it as they were using old Kangaroo version. It would really useful if someone can give me an idea of the theory behind it and the process. Thanks in advance.

There are several examples of this here: