1

Given two sets of triangles where the triangles in each set don't overlap but may share 1 or 2 points, what's the best way to calculate the area resulting from the intersection of both triangle sets (violet areas in image)?

intersecting triangle sets

Is this a hard or a trivial problem? Are there existing libraries that would calculate the area for me (preferably in a scripting language like Python, Ruby or JavaScript)? If there is no library, what's the math behind it?

user1118321
  • 25,567
  • 4
  • 55
  • 86
chiborg
  • 26,978
  • 14
  • 97
  • 115

1 Answers1

1

Freeware Clipper library is worth mentioning. It is rather fast and stable.

There are links to third party Perl, Ruby and Haskell modules (inside the distributive)

MBo
  • 77,366
  • 5
  • 53
  • 86