Error in 3D Delaunay Triangulation
9 views (last 30 days)
Show older comments
MATLAB doesn't appear to have a nested mesh tool that will mesh a set of surfaces inside another surface, i.e. mesh a cube inside a sphere, the type of meshing needed to say simulate heat conduction from a hot cube into the surrounding air with a spherical boundary.
So, I'm trying to write my own. So far, I've written code that allows me to create a set of surface nodes for the cube and the sphere. However, once I place points inside the cube and perform 3D delaunay triangulation, I get VERY odd results. The resulting tetrahedra don't connect the surface nodes and create very flat tetrahedra with huge circumradii that surely must contain other surface nodes:
So to clarify, left: surface mesh using nodes on the surface. Right: cube containing the surface nodes plus some randomly distributed internal nodes, I've carried out delaunayTriangulation and then plotted the surface faces using the freeBoundary function.
I was expecting that the volume triangulation might not honour the surface mesh, but the resulting volume triangulation just looks completely incorrect. Any tips on how to deal with this would be greatly appreciated.
2 Comments
Answers (2)
Siju Thomas
on 30 Jun 2020
HI Nathan,
You can use the PDE Toolbox to mesh a surface nested within another surface.
An example can be seen here: Sphere in a Cube
6 Comments
Konstantin Kovalev
on 30 Jun 2020
Regenerate mesh: after all commands are executed in the Sphere-in-Cube example, just run this:
msh = generateMesh(model,'Hmax',0.1);
"Recovering" shapes:
I was referring to your workflow in which you create a point field that represents surfaces of interest (cube and sphere) and then use Delaunay triangulation to create tetrahedra. As the input to Delaunay includes points only, we can look at it as "surface reconstruction", i.e. generating a set of tetrahedra whose triangular faces describe the surfaces.
Delaunay:
You have made a very good observation. Most likely those points are slightly off the faces of the cube and that's why they do not belong to convex hull boundary, while referenced by internal tets. Most likely this is the effect of the cube being misaligned with XYZ. You may consider to repeat this with a cube perfectly aligned with Cartesian axes and see if there is a difference.
However, I don't think Delaunay approach will work in this case, as it will not respect the internal surface. It would require a constrained Delaunay triangulation in order to preserve surfaces, and MATLAB currently supports it in 2-D only.
Best Regards,
Konstantin
Chenglin Li
on 18 Nov 2021
HI Nathan, I'm making a concave mesh, and I have some problems,Is your 3D program open source?
0 Comments
See Also
Categories
Find more on Delaunay Triangulation 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!