Kernel of a polygon (source code)

= Kernel of a polygon

= Polygon kernel
{synonym}

The <kernel of a polygon> is the <set> of interior or boundary points from which every point of the filled simple <polygon> is visible: the entire joining <line segment> must stay inside the <polygon>. A convex <polygon> is its own <kernel of a polygon>; a sufficiently bent nonconvex <polygon> can have an empty <kernel of a polygon>. For counterclockwise boundary order, intersect the closed half-planes to the left of every directed side. This intersection is exactly the <kernel of a polygon>, so the <kernel of a polygon> is always convex. A point in it can serve as a fixed observer seeing the entire room represented by the <polygon>.