[Math] Closest edge to a point

geometryinterpolation

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:
enter image description here

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:
enter image description here

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?

Best Answer

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.