5

Given two convex polygons $p_0$ and $p_1$ with $n_0$ and $n_1$ vertices (assume $n_0 >= n_1$ without loss of generality) on a two-dimensional plane, what is the maximum number of vertices $n_{2,max}$ of the intersection polygon $p_2$ which contains the area both polygons share? Here are my thoughts:

  • If the polygons are disjoint, the intersection is empty. $n_{2,min} = 0$.
  • If one polygon is inside the other, the inner polygon coincides with the intersection. $n_{2,max} >= n_0$.
  • The polygon $p_0$ with more vertices can cross polygon $p_1$ at most $2n_1$ times (each edge twice). Each crossing point is a vertex of the intersection. If the remaining points of $p_0$ are inside, the maximum number of vertices is $n_{2,max} = 2 n_1 + (n_0 - n_1) = n_0 + n_1$.

Am I missing something? Is there a situation with more than $n_0 + n_1$ vertices for the intersection?

As a background: I have an algorithm to compute the intersection of two polygons, but I need to allocate enough memory for the intersection before computing it. My initial value was $2 (n_0 + n_1)$ but that seems to be more than required if the above is correct.

Fabian
  • 153

1 Answers1

5

The edges of the new polygons are parts of edges of the old polygons. While each edge of polygon 0 my be parted into up to three line segments by polygon 1, at most one of these line segments can become an edge of the new polygon. The same holds for the edges of polygon 1. Hence polygon 2 cannot have more than $$n_0+n_1$$ edges.