Help: Area of intersection between triangle and convex polygon?

Revision en2, by 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.

Tags #geometry, convex-polygon, intersection, area

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English pabloskimg 2019-10-21 01:12:00 6
en1 English pabloskimg 2019-10-21 00:16:36 817 Initial revision (published)