# Closest edge to a point

I have a tricky question and can't seem to find a good solution. Let's say I have 3 convex polygons (ABCD, ADEF, BHGC) that share 2 common edges, unknown J, and a known point I:

I want to find the closest polygon to known point I. At first I thought it was a simple "find the closest edge", but if you notice that there are three regions (R1, R2, R3) that can be extrapolated from the distances and boundaries of each polygon. In the above example, I belongs to poly (ADEF).

However, if the shape is changed slightly:

Although I, E, D, C, G hasn't changed (A has been moved such that AD is steeper) I now belongs to poly (ABCD).

Based on this behavior, how can I match I to its related poly?

-
In what sense is $I$ closer to $ABCD$ than to $ADEF$ in your second diagram? The regions where $I$ is closest to any given polygon are not at all the same as the regions obtained by extrapolating the edges $AD$ and $BC$. – Rahul Feb 22 '13 at 0:23
It is simple -- you do just find the closest edge. And, as Ross Millikan's answer pointed out, you can decide which edge is closer by using angle bisectors. – bubba Feb 22 '13 at 5:15

The lines you draw shouldn't depend on A and B. As you say, I and J can't see them. The lines should bisect $\angle EDC$ and $\angle DCG$ because those are the lines that separate points closer to one polygon or the other. The line separating R1 and R3 should be equidistant between DE and CG if they are parallel. If not, extend them until they meet and bisect that angle.