# growing bubbles with a predetermined radius in a given volume?

3 views (last 30 days)
Xiaochun Zhao on 3 Aug 2020
Answered: Image Analyst on 4 Aug 2020
Is there a code that can plots as many as possible bubbles with a predetermined radius in a given volume?

Walter Roberson on 3 Aug 2020
No, there is no code for that. For it to be maximum possible it would have to solve the sphere packing problem, which is generally unsolved for quite low numbers of spheres. I do not know the state of current research beyond roughly 26 spheres, the solution is unknown except perhaps at special numbers.
There are packings that no-one has been able to improve upon, but it is different to go from "pretty good" to "best known" (hard to establish in some cases, 19 took decades of research) to "best possible" (which is what you ask for.)

There is too little information to answer this question properly. Do you mean non-overlapping bubbles? and that they contact each other so that the space is maximised?
Walter Roberson on 3 Aug 2020
Is it circles or spheres (bubbles) that you need to create?
What shape do they need to be created inside?
Any fixed small spacing is the same for mathematical purposes as if the radius was increased by half of the spacing, if the fixed spacing also applies to the boundary. If the fixed spacing does not apply to the boundary, then the situation is probably the same as if you grew the boundary by half of the spacing.
I still think you are asking for the maximal circle packing, which is pretty difficult to prove except for cases where your enclosure is just the right size to fit a regular lattice.
The hard part is not necessarily in coming up with a fitting that "might well" be maximal: the hard part is in proving that there is no better fit, but that is something that is needed to meet your condition of "as many circles as possible".

Image Analyst on 4 Aug 2020
Try the tag link on the right for "circle packing".

### Categories

Find more on Surface and Mesh Plots in Help Center and File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by