I have a tetrahedral mesh of a 3d region. The mesh is defined by two files with extensions .node and .ele which contain data related to nodes and elements (this is the format of output files from tetgen, the 3d Delaunay tetrahedralization program). The .node file contains in each line the node number and the x,y,z co-ordinates of that node. The .ele file contains the element number and node numbers corresponding to its four vertices. Now, given any point (x1,y1,z1), what is the easiest algorithm to decide which element this point belongs to?
Asked
Active
Viewed 926 times
1
-
Maybe calculate the bounding AABB of each tetrahedron, and insert into a *BVH* (Bounding volume hierarchy) -> O(log N) *broad-phase* search. Then for every AABB it intersects see if it is inside the corresponding tetrahedron – meowgoesthedog Aug 02 '17 at 19:27
1 Answers
2
If you know the orientation of the faces of your tetrahedra, then you only need to compute the volume of tetrahedra formed by your point p=(x1,y1,z1) and each face of the tetrahedra. Point p is inside a tetrahedron if and only if it makes a positive volume with respect to each face.

Snippet from Computational Geometry in C.

Joseph O'Rourke
- 4,346
- 16
- 25