Outer common tangents and nesting of convex hulls of two disjoint simple polygons in linear time and constant workspace.
Mikkel Abrahamsen, Bartosz Walczak · arXiv (Cornell University) · 2016
We describe an algorithm for computing the outer common tangents of two disjoint simple polygons using linear time and only constant workspace. A tangent of a polygon is a line touching the polygon such that all of the polygon lies on the same side of the line. An outer common tangent of two polygons is a tangent of both polygons such that the polygons lie on the same side of the tangent. Each polygon is given as a read-only array of its corners in cyclic order. The algorithm detects if an outer common tangent does not exist, which is the case if and only if the convex hull of one of the polygons is contained in the convex hull of the other. Otherwise, two corners defining an outer common tangent are returned. This was not known to be possible in linear time and constant workspace prior to this paper.