3D shape approximation

5 views (last 30 days)
bob
bob on 3 Jun 2011
Answered: John D'Errico on 7 Oct 2020
Hey guys, Is there any way to approximate irregular shapes with overlapping spheres in Matlab? The shapes are for sand particles and are to be converted to assembly of overlapping spheres.
  1 Comment
Sean de Wolski
Sean de Wolski on 3 Jun 2011
The sphere defined by the equivalent radius of the volume of irregular shape?

Sign in to comment.

Answers (1)

John D'Errico
John D'Errico on 7 Oct 2020
An old question, answered here only to explain some aspects of the problem.
It sounds as if you have an arbitrary shaped object, probably not convex, and you want to know if there exists some pre-written code to approximate some general shape by a set of overlapping spheres. The answer here is simple: absolutely not. Solving that problem would in general be a rather nasty optimization problem, made more difficult if you have no clue how many spheres would be used. Clearly, the more spheres, the better would be your approximation. And there is no good reason for someone to have written such a code to be part of MATLAB, as it would be difficult to write and use. The interface issues would be something I would not wish to touch.
Is it possible you might find something on the file exchange? Possibly, but you would surely need to adapt it to your specific purposes and probably rewrite it in the end.
My point is, in order to solve such a problem, there are often many ways to do so. A complex of partially overlapping spheres could be one way, but why? Instead, learn to use the massive body of code in existence to work with computational geometry problems, much of it in the form of tools to work with triangulations and tessellations in multiple dimensions. You might start with tools like a Delaunay tessellation or a convex hull. To the extent that your particles can be represented as convex objects, these tools will work splendidly well. Beyond that, there are tools like alpha shapes and more. Non-convex tessellations are not that difficult to work with, and they can arguably solve any problem you could have solved using spheres.

Community Treasure Hunt

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

Start Hunting!