In discrete geometry and computational geometry, the relative convex hull or geodesic convex hull is an analogue of the convex hull for the points inside a simple polygon or a rectifiable simple closed curve.
Let
P
X
P
P
P
K
P
P
K
P
K
X
X
Equivalently, the relative convex hull is the minimum-perimeter weakly simple polygon in
P
X
X
, who provided an efficient algorithm for the construction of the relative convex hull for finite sets of points inside a simple polygon. With subsequent improvements in the time bounds for two subroutines, finding shortest paths between query points in a polygon, and polygon triangulation, this algorithm takes time
O(p+nlog(p+n))
n
p
The relative convex hull of a finite set of points is always a weakly simple polygon, but it might not actually be a simple polygon, because parts of it can be connected to each other by line segments or polygonal paths rather than by regions of nonzero area.
For relative convex hulls of simple polygons, an alternative but equivalent definition of convexity can be used. A simple polygon
P
Q
Q
Q
P
P
P
Q
Q
P
Q
P
P
Q
generalizes linear time algorithms for the convex hull of a simple polygon to the relative convex hull of one simple polygon within another. The resulting generalized algorithm is not linear time, however: its time complexity depends on the depth of nesting of certain features of one polygon within another. In this case, the relative convex hull is itself a simple polygon. Alternative linear time algorithms based on path planning are known.
A similar definition can also be given for the relative convex hull of two disjoint simple polygons. This type of hull can be used in algorithms for testing whether the two polygons can be separated into disjoint halfplanes by a continuous linear motion, and in data structures for collision detection of moving polygons.
The definition of relative convex hulls based on minimum enclosure does not extend to higher dimensions, because (even without being surrounded by an outer shape) the minimum surface area enclosure of a non-convex set is not generally convex. However, for the relative convex hull of a connected set within another set, a similar definition to one for simple polygons can be used. In this case, a relatively convex set can again be defined as a subset of the given outer set that contains all line segments in the outer set between pairs of its points. The relative convex hull can be defined as the intersection of all relatively convex sets that contain the inner set.