How to fill a volume with spheres?
Afficher commentaires plus anciens
Hi,
I'd like to import *.stl files of different shapes and fill the volume with overlapping spheres. How can I do it. I already did this task for 2D shapes using bwdist. But for 3D shapes, I don't know how to do it. Thanks
4 commentaires
Walter Roberson
le 5 Nov 2012
What constraint keeps the number of spheres used finite? Filling a non-spherical volume would normally require an infinite number of non-overlapping spheres of varying sizes, and allowing overlapping spheres would, at first blush, only increase the number of spheres involved. (If the spheres are permitted to extend past the edges of the object, then why not just use a single large sphere?)
chen xiaoyu
le 28 Mar 2017
same question!
Walter Roberson
le 28 Mar 2017
chen xiaoyu: then I would put the same question to you: since the spheres are overlapping, what is your constraint that keeps the volume finite, or the number of spheres finite?
Are the spheres permitted to overlap the edges of the 3D area?
By the way, what will you do with the filled areas?
This sounds like OP is (was) trying to do the equivalent of a morphological opening of the volume, but without actually saying so. I guess that'd be the Minkowski sum of the Minkowski difference, both with the same sphere.

If true, how would one do it? You'd either use external tools (perhaps through GPToolbox), or you'd reinvent that wheel on your own. I used OpenSCAD, which uses the same CGAL library that GPToolbox would use.
What information would this return? It would return a shape. It wouldn't tell us anything about an optimal sphere packing, just what portions of the volume could be occupied by a sphere.
EDIT: I went and read OP's other questions, and I'm half-convinced that this was the goal, and half-convinced that it certainly wasn't the goal. It's unclear whether it's the "irregularly-shaped volume" is the particle or the container (or whether there's even a container).
Réponses (0)
Catégories
En savoir plus sur Surface and Mesh Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!