Closed wangkeke1800 closed 3 months ago
Point (99.7665 ,100.233)
is not exactly on the line (0, 0) -> (200, 200)
. An example of a point exactly on the line is (100, 100)
. CDT uses numerically robust orient2d predicate and is pedantic like that. The triangle is a almost flat but not degenerate according to the mathematical definition (all points exactly on the same line). I hope this answers your question.
I am closing the issue but feel free to comment in here and I will re-open if needed.
I conducted a simple test using your code. There is a triangle with vertices 0, 1, and 2. The two points on its edges are 3 and 4. The generated results are as follows: 132, 423, 103, 043. Triangle 103 is a degenerate triangle and does not comply with the Delaunay rule. I tested it using other open-source code and obtained the correct result: 123, 034, 324. See as https://github.com/bl4ckb0ne/delaunay-triangulation.git
Here is the test code: