查找一个点属于哪个四面体元素 [英] find which tetrahedral element a point belongs to
问题描述
如果您知道四面体的面的方向,则只需计算由点p =(x1,y1, z1)和四面体的每个面.当且仅当点p相对于每个面都为正体积时,点p才在四面体内部.
摘录自 C语言中的计算几何 .
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?
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.
这篇关于查找一个点属于哪个四面体元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!