Compare commits

..

4 commits

Author SHA1 Message Date
Simon Bruder 0d316d7aeb Add note on filtering 2023-05-09 23:50:31 +02:00
Simon Bruder a1f8720e74 Add filtering script 2023-05-09 23:50:31 +02:00
Simon Bruder 25e159d96b u02/util: Simplify conditions 2023-05-09 23:50:31 +02:00
Simon Bruder 7e8dbfabea u02: Implement sweep line tool 2023-05-09 23:50:31 +02:00

View file

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