Project Note4

来源:互联网 发布:js中换行符是哪个 编辑:程序博客网 时间:2024/05/01 17:31
About the collinear property

In CGAL Regular Triangulation, points are allowed to be collinear. However, if three points are collinear they must not construct a triangle. That means the order of these collinear points are important.

Suppose three points, A, B and C, are collinear and B is between A and C, i.e. B is on the segment AC. If the input order is A, B, C, then it is ok. There will be no problem to construct the regular triangulation of A, B and C. (Also C, B, A is acceptable.) However, if the input order is A, C and B or C, A and B, that is to say the time B is inserted segment AC is already existing, then exception will be thrown out!

Although I noticed this, I think in my project I will still use the existing method. Try to find the vertices which are on the edge and remove the vertices. Though using this way, it will cause in some situation the loss of necessary points and lead to wrong result. For this project, I just try to use data that avoid this kind of collinear.

Furthermore, the way to modify is also not that difficulty. When we remove the vertices, instead of doing that we can remove the edge which cause this collinear event. However, remove edge is not a direct support function in CGAL, which needs more effort to make sure it really work in a desire way.