TITLE: How to check that whather a Polygon is completly inside of another Polygon?
QUESTION [5 upvotes]: Let's say I have two polygons. I know the co-ordinates of both polygons. Now, I need to check whether the first Polygon is completely inside of second polygon? IN this figure only 1 polygon is completely inside of red polygon.

REPLY [3 votes]: In order for polygon $A$ to be inside polygon $B$, all of the vertices of $A$ must be inside $B$, and all of the vertices of $B$ must be outside $A$.  The second condition does not need to be checked if $B$ is known to be convex.