How to destroy a polyhedron in tetrahedra in MATLAB?

I have a polyhedron with a list of vertices ( v) and surfaces ( s). How to split this polyhedron into a series of tetrahedra?

I would especially like to know if there are MATLAB built-in commands for this.

+3
source share
3 answers

I would suggest trying the built-in DELAUNAY3 function . The example given in the documentation link reminds Aaron answer that it uses vertices plus the center point of the polyhedron to create 3D Delaunay tessellation, but shabbychef indicates that you can still create tessellation without including an additional point. Then you can use TETRAMESH to visualize the resulting four-element elements.

Your code might look something like this (assuming it vis an N-by-3 vertex coordinate matrix ):

v = [v; mean(v)];  %# Add an additional center point, if desired (this code
                   %#   adds the mean of the vertices)
Tes = delaunay3(v(:,1),v(:,2),v(:,3));  %# Create the triangulation
tetramesh(Tes,v);                       %# Plot the tetrahedrons

, , , , (shabbychef , , ).

: DELAUNAY3 , DelaunayTri ( , - ). , DelaunayTri ( ):

DT = DelaunayTri(v);  %# Using the same variable v as above
tetramesh(DT);        %# Plot the tetrahedrons
figure;               %# Make new figure window
ch = convexHull(DT);  %# Get the convex hull
trisurf(ch,v(:,1),v(:,2),v(:,3),'FaceColor','cyan');  %# Plot the convex hull
+2

( , ) , , .

, . Delaunay .

, .

+3

, OP "" ( ) ( , ). (, "" ) .

gnovice (WTF, SO?), " " : subsimplex Teselation Delaunay , n-, , . , "" , , ""; . ( , ).

for more information on DT, see Okabe, et. al, "Spatial tessellations" or any of Shelchuk's articles

(my thesis was on this, but I remember less than I should have ...)

+3
source

Source: https://habr.com/ru/post/1724596/


All Articles