Help: Area of intersection between triangle and convex polygon?

Правка en2, от pabloskimg, 2019-10-21 01:12:00

Hi, I'm trying to solve this problem. The problem turned out to be way harder than I expected, and my current solution has many lines of code, I have debugged it a lot with many hand-made test cases but I'm still getting WA. You can find my code here. I looked for a proper implementation of the area of the intersection between a triangle and a convex polygon but I couldn't find any. I would appreciate if someone with expertise in geometry could share his/her knowledge, or if someone could share a link to a proper implementation of this problem that would be awesome too, that way I can compare my solution with it and figure out what I'm doing wrong too.

Thank you very much.

Теги #geometry, convex-polygon, intersection, area


  Rev. Язык Кто Когда Δ Комментарий
en2 Английский pabloskimg 2019-10-21 01:12:00 6
en1 Английский pabloskimg 2019-10-21 00:16:36 817 Initial revision (published)