# polygon inside a polygon

i have several point patches lie on different planar faces. then, I obtained enclosing polygons to represent points so that i have several planar polygons (for example A,B,C,D). when i examine the polygons, i found some polygons (B) is located inside another larger polygon (A) but at different height level. also some polygon borders of smaller polygon touches an edge of larger polygon while rest of the borders locate inside the larger polygon-case C & D in figure. my problem is how to identify polygon inside a polygon and polygon having touched another polygon inside?

actually, i can not imagine a logic to differentiate these two cases. i want to implement this in programming enshrinement and i have the vertices of polygons and actual boundary points relevant to each point patch.

By neglecting the height, i can consider this case as 2D case for the simplicity also.

-
Just for future reference, it is spelled "borders". Is this a similar question to your other one? math.stackexchange.com/questions/127287/… I'm not sure I understand this question either. – Samuel Reid Apr 5 '12 at 3:06
@Samuel Reid: no, these 2 are 2 different and i modified the post. – niro Apr 7 '12 at 0:53