Sign in to follow this  
NMO

Calculating the intersection area of two polygons

Recommended Posts

NMO    220
Hi! As the subject says, I have two abitrary polygons which are intersecting. Both are coplanar too. Now I want to calculate the intersection area of these two polygons. Are there any good approaches for this problem??

Share this post


Link to post
Share on other sites
NMO    220
Thank you for your answer, but is it really as complicated? I would really like to implement my own version. I don't have complicated things like self-intersecting or holes. Aren't there any good approaches??

Share this post


Link to post
Share on other sites
alvaro    21263
The only simple, robust approach I can think of is expressing each polygon as a union of convex polygons, computing the intersections of the convex polygons and putting the results back together. Even this is harder than it looks.

Share this post


Link to post
Share on other sites
NMO    220
Maybe i have found a sultion. When there is an intersection between two polys, at first i compute the intersection polygon(s). The hard thing is to compute the area
of these intersection polygons. To do this I have found an area calculation algorithm according to Gauß. I have tried some examples an all of them worked properly. :)

Share this post


Link to post
Share on other sites
alvaro    21263
Computing the area of an arbitrary polygon is a relatively trivial problem. Calculating the intersection of two arbitrary polygons in a robust manner is much much harder. How do you intend to do that part?

Share this post


Link to post
Share on other sites
NMO    220
Quote:
Computing the area of an arbitrary polygon is a relatively trivial problem.


Yes okay, but that was the main problem.

Quote:
Calculating the intersection of two arbitrary polygons in a robust manner is much much harder. How do you intend to do that part?


I did that already:

Click

And then to calculate the area of this intersecting polygon, I use a Gauß algorithm as mentioned before.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this