Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用运行良好的三角测量代码(它处理带孔的多边形并与 JTS 集成),但显然它不尊重三角形的缠绕。一些输出三角形以一种方式缠绕,一些以另一种方式缠绕。
我是否可以确定并纠正这些异常三角形的缠绕?可能使用来自相邻三角形的信息,但当然越简单越好。
对于三角形 ABC,您可以通过计算叉积 (B - A) x (C - A) 来找到绕组。对于 2d tri's,z=0,它将只有 z 分量。
为了给所有相同的绕组,如果这个 z 分量为负,则交换顶点 C 和 B。