Packing circles in a circular domain with a touch-and-stop model of growth (contact inhibition)

This MATLAB algorithm allows you to pack n circles in a circular domain (see sample images).
The void ratio (i.e., amount of empty space in the circular domain) is user-defined and met precisely.

The domain has an arbitrary diameter that you can choose. Other parameters are also available for you to tweak.

The position of all circles is randomised: this means that it is virtually impossible to obtain two packed domains that look the same.

As an example, it is possible to pack >142,000 circles to a void ratio of 15% in 870 s (i7 4790k, DDR3 RAM 2400 Mhz). 

The algorithm works by seeding a starting population of tiny circles, which are grown until they touch another circle or the boundary of the domain. Once all circles have grown, a new generation of tiny circles are created and grown.
This is repeated until the required void ratio is met.
Results are displayed in a figure and saved in .mat format.

The code is thoroughly commented to allow easy understanding of the process.

Please remember that if you use this algorithm, you should cite it (e.g., articles, theses) and, in any case, leave the attribution text (MIT license).