Reputation: 119
Given two java.awt.Polygon
objects p1
and p2
, how would I go about determining (and representing) the area between them?
I would like to find the gray area within in-between the polygons. The polygons are arbitrary and the only information I have about them are their points (x,y).
The answer might be staring right at me but I've been trying to come up with a solution for >2 hours in vain now so any and all pointers will be much appreciated!
Edit: the first thing I tried was representing both polygons as one but that resulted in an unusable mess of intersections.
Upvotes: 0
Views: 111