Compare commits

..

4 commits

Author SHA1 Message Date
Simon Bruder dbf298940e Add note on filtering 2023-05-09 23:47:47 +02:00
Simon Bruder 5296a3f361 Add filtering script 2023-05-09 23:47:47 +02:00
Simon Bruder 179a198e11 u02/util: Simplify conditions 2023-05-09 23:47:47 +02:00
Simon Bruder b0e754cddb u02: Implement sweep line tool 2023-05-09 23:47:47 +02:00

View file

@ -516,8 +516,8 @@ TEST_CASE("Sweep line (prop: Barycentric coordinates)") {
}
REQUIRE(pass);
// Crude heuristic:
// No more than differences of all edge point coordinates can deviate.
// This ist not accurate (false negatives possible) on small/spiky triangles,
// No more than differences of all edge point coordinates can fail.
// This ist not accurate (false positives possible) on small/spiky triangles,
// but overall it gives an okayish result.
REQUIRE(deviating < abs(y1 - y0) + abs(y2 - y1) + abs(y0 - y2) +
abs(x1 - x0) + abs(x2 - x1) + abs(x0 - x2));