Circle packing script for random planting plans

Does anyone know of a script which can do circle packing (see attached image)? Ideally I also want the script to include a degree of repulsion or attraction so the circles can either overlap or have gaps between them.