Error in 3D Delaunay Triangulation

9 次查看(过去 30 天)
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 个)

Siju Thomas
Siju Thomas 2020-6-30
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 个评论
Konstantin Kovalev
Konstantin Kovalev 2020-6-30
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
Nathan Welch
Nathan Welch 2020-7-5
编辑:Nathan Welch 2020-7-5
I can't seem to run the Sphere-in-Cube example, as the 'boundaryFacets' function only accepts alphaShape arguments not FEMesh arguments - but I am running 2018 MATLAB - though the 2020 help page for 'boundaryFacets' would suggest it only works for alphaShape.
If the Sphere-in-Cube method works, how can I expand it to work with generic shapes that are multiply connected and multiply nested and defined by a series of face patches?
As for the Delaunay - as you say, the points may be just off the boundary due to numerical precision but they are still inside the circumradius of the the awfully thin tets created near the surface - this would suggest that the Delaunay triangulation has failed.
There's not much point trying a nice Cartesian aligned example, as I deliberatly created an asymmetric rotated surface as this is closer to what I need to model the majority of the time.

请先登录,再进行评论。


Chenglin Li
Chenglin Li 2021-11-18
HI Nathan, I'm making a concave mesh, and I have some problems,Is your 3D program open source?

类别

Help CenterFile Exchange 中查找有关 Delaunay Triangulation 的更多信息

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by