Im trying to find an algorithm for drawing a common outline between multiple polygons. What I mean is like on this picture:
We have two rectangles (In my case they will not be rectangles, but polygons with most of their angles as right angle) and Im looking for common outline like a red path on second part of image. The biggest problem as I see it is finding new points which I marked yellow on the second part of image. The polygons will never intersect or touch itselfs. Im storing a polygon as points in counter-clockwise order.
Im looking for some clues, sources or even keywords on which I should google, which could make my task little easier...
EDIT: its kind like in convex hull but looking at the edges not at the vertices, yellow point are probably on the continuaion of the edges as I look at it.
EDIT2: Ok, I need to draw a border of given size around polygons, but in such way that if two polygons are closer than the border size they will have common border which is kind of a sum of two borders without 'inner' part of it and this two polygons will be treated as a one shape. So Im trying to find this red polygon which will be used to draw this border around it.