查找一个点属于哪个四面体元素 [英] find which tetrahedral element a point belongs to

查看:107
本文介绍了查找一个点属于哪个四面体元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个3d区域的四面体网格.网格由两个扩展名为.node和.ele的文件定义,这些文件包含与节点和元素有关的数据(这是tetgen(3d Delaunay四面体化程序)输出文件的格式). .node文件的每一行都包含节点号和该节点的x,y,z坐标. .ele文件包含对应于其四个顶点的元素编号和节点编号.现在,给定任意点(x1,y1,z1),最简单的算法来确定该点属于哪个元素?

解决方案

如果您知道四面体的面的方向,则只需计算由点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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆