Exploring Circle Packing using p5.js

Exploring Circle Packing using p5.js

This was a tiny project I made cause circles are cool! Wikipedia has a great explanation on how to pack circles. The source for circle packing is here and for the image version, here! Feel free to try out different parameters and images in the browser (just change imgSource to point to another picture). Warning - can lag on really big images with different parameters!

The 3 sliders are for counts per update or how many circles are added every frame (1 - 100), total circles or max amount of circles on the screen (0 (= infinity) - 5000), and total attempts or the number of times we try to add a circle before we cut off the algorithm (100 - 2000), respectively. By default, the values are 10, 2500, 1000, but you can vary them!

Avatar
Amrit Amar
Data Engineer

My research interests include data design and engineering, virtual/augmented reality, artificial intelligence (particularly alignment), computational neuroscience, and evolutionary algorithms.