Hi Alex,
See December 2020 posts of Equidistant array on surface / automatic Pave
The remarkable D3-force program can be used to do repulsion of circles. It is actually a charting/node graph program, but they also use physics of repulsion and attraction. Their boundaries are a box, not a semicircle.
Google "D3-force observable". They can also repel from the exterior of a very large circle, using its center point.
Maybe next year I'll have time to pursue this...Repulsion could be from many small fixed boundary circles, on the desired curved boundaries.
Coding Train has a few videos of doing repulsion and attraction with Javascript/ processing.
https://www.youtube.com/watch?v=OAcXnzRNiCY
But neither of the above sources has a ready to use program for your project.
- Brian
A hexagonal layout of uniform circles could be expected.
Maybe try making a hexagonal layout of say 100 circles in a rectangle encompasing your D shape.
Place the layout over your D, and deduct circles in the exterior and intersecting the boundary, aiming for 80.
If the interior circle count is below 80, scale down the array a bit.
If the interior circle count is above 80, scale up the array a bit.
Or vice-versa,
Create a hex layout of circles, place the D over them, count circles, and scale the D shape up or down appropriately, to get 80 interior circles.
Then scale Both the new D and the 80 circles, so that the new D is the same size as your D.
Left out a step to make the diameter of the circles the same as at the start...
http://www.packomania.com/