Answer the question
In order to leave comments, you need to log in
How to split a polyhedron into tetrahedra using TetGen?
It is necessary to find the volume of polyhedra. One way to do this is to break the polyhedron into tetrahedra, it is desirable that the number of tetrahedra be the smallest, and, accordingly, the size of each tetrahedron is maximum. In this topic, I am an absolute beginner, I read that a tetrahedral mesh can be built using the C ++ TetGen library. It's as easy to use as $3, and you only need to pull one single tetrahedralize() function . But I have a serious gag in understanding the basics:
1) Do I understand correctly that the tetrahedral mesh of a polyhedron and the division of a polyhedron into tetrahedra are the same thing?
2) What are the facets and segments of a polyhedron? From the examples, I seem to understand that one of them is a face, and the second is needed to designate cutouts, grooves and other things.
Now questions about the TetGen library itself, maybe someone used it:
1) How to get a set of these same tetrahedra after splitting the figure? I would be very grateful to a simple example, for example, on a cube. Those. I can set the vertices, but again there is a gag with setting facets and segments and extracting tetrahedra after calling tetrahedralize() .
2) The library accepts many criteria for the optimality of partitioning into tetrahedra. How can I specify the tetrahedra of the maximum volume / size (or in other words, the minimum number of tetrahedra) that I need?
Thanks a lot.
Answer the question
In order to leave comments, you need to log in
The solution to the problem depends on the type of your polyhedra - convex or not, with flat faces or not, how accurate the volume is needed.
Partitioning a polyhedron into tetrahedra really makes it possible to calculate the volume of a polyhedron through the calculation of determinants.
Only if the faces of the polyhedron are not flat, it will no longer be possible to accurately describe the polyhedron with tetrahedra and there will be an approximation error and, possibly, tricks with averaging over several types of partitions.
If you need volume, I think it doesn't matter how many or few tetrahedra you end up with.
For partitioning into tetrahedra to calculate the volume of a polyhedron, you should not use generators like TetGen or NetGen and the like. These libraries solve the problem of constructing a grid suitable for calculations, or for further construction of more complex computational grids, i.e. are tools for solving more complex problems.
Rather, it will be useful to look towards algorithms and computational geometry libraries - CGAL, for example.
For the sake of interest, you can play around with the Salome package, where you can build geometry and meshes, including tetrahedral ones, there are also algorithms for splitting polyhedra into tetrahedra in the codes, but I don’t remember if there is a general case there.
In the simplest version of a convex polyhedron - divide the faces into triangles, put a point in the geometric center of the polyhedron - from the three points of the triangles and the center point form a set of tetrahedra.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question