Error in 3D Delaunay Triangulation

12 visualizzazioni (ultimi 30 giorni)
Nathan Welch
Nathan Welch il 30 Giu 2020
Risposto: Chenglin Li il 18 Nov 2021
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 Commenti
Nathan Welch
Nathan Welch il 30 Giu 2020
"MESH2D is a MATLAB-based Delaunay mesh-generator for two-dimensional geometries". I'm creating a 3D mesh.

Accedi per commentare.

Risposte (2)

Siju Thomas
Siju Thomas il 30 Giu 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 Commenti
Konstantin Kovalev
Konstantin Kovalev il 30 Giu 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
Nathan Welch
Nathan Welch il 5 Lug 2020
Modificato: Nathan Welch il 5 Lug 2020
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.

Accedi per commentare.


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

Categorie

Scopri di più su Delaunay Triangulation in Help Center e File Exchange

Prodotti


Release

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by