Shapes & spaces

Polygon kernel calculator for visibility from every vertex

Find the kernel of a simple polygon: the set of viewpoints from which the entire polygon is visible.

Your numbers

Rows separated by semicolons; values by commas.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Find the kernel of a simple polygon: the set of viewpoints from which the entire polygon is visible. Intersecting inward edge halfplanes produces a convex region that can be two-dimensional, a segment, a point or empty. The page keeps this all-target viewpoint question separate from the visible region of one fixed viewpoint.

THE FORMULAkernel(P)=intersection of inward edge halfplanes.

A worked example

The L-shaped polygon with vertices (0,0),(3,0),(3,1),(1,1),(1,3),(0,3) is visible in full from every point in the unit square [0,1] × [0,1]. Its visibility kernel has area 1, while the entire polygon has area 5.

Good to know

Simple boundary-order planar polygon≤32vertices. Floating-point halfplane clipping; returns area and dimension, including segment/point/empty cases. No holes in input.

Ask where a viewpoint may be placed

A polygon kernel contains points that can connect to every polygon point by a segment staying inside the polygon. It is a set of allowable viewpoints, not a collection of visible targets for one prescribed observer. No viewpoint field is required because finding those viewpoints is the task.

A convex polygon is its own kernel. A concave polygon can have a smaller kernel or none. The presence of one reflex corner does not automatically imply emptiness, so the solver uses the full halfplane condition rather than a visual rule based only on convexity classification.

The visibility kernel of the L-shaped polygon is a unit squareWhole polygon area: 5Kernel: [0,1]²Kernel area = 1
The L-shaped polygon with vertices (0,0),(3,0),(3,1),(1,1),(1,3),(0,3) is visible in full from every point in the unit square [0,1] × [0,1]. Its visibility kernel has area 1, while the entire polygon has area 5. Diagram is schematic; labels specify the numerical values.

The Polygon union area calculator with boundary and holes combines the filled regions of two polygons. A visibility kernel intersects the inward halfplanes of one boundary and can be empty even when that polygon has positive area.

Enter the polygon boundary consistently

Vertices must follow the boundary of a simple polygon without holes. Crossing nonadjacent edges or touching them in an unsupported way makes the interior ambiguous and is rejected. The closing edge from the final vertex to the first is implicit, so do not repeat the first point as an extra vertex.

Orientation is normalized for the inward-side construction. Reversing the complete vertex list does not change the geometric kernel, but reordering vertices arbitrarily changes the edges and can define another polygon. A point cloud is not a boundary-order polygon and needs a separate reconstruction decision.

Derive the inward-halfplane condition

For each directed edge of a counterclockwise polygon, the interior locally lies on its left. A point that sees the entire polygon must lie in every such inward halfplane. Conversely, their intersection is exactly the kernel for a simple polygon under the standard visibility definition.

Each halfplane is convex, so their intersection is convex even when the original polygon is not. The algorithm clips an initial bounding region against those edge halfplanes. It does not triangulate the polygon and merge every triangle’s visible region, which would answer a more complicated question unnecessarily.

Check the L-shaped example

The default polygon is a three-by-three corner shape with the upper-right two-by-two region removed. Its area is five. The inward constraints from the reflex boundary force a kernel viewpoint to have x at most one and y at most one, while the outer edges require nonnegative coordinates.

The kernel is therefore the unit square at the lower-left corner, with area one. Moving a viewpoint into the far end of either arm can hide part of the other arm. This explains why full polygon area and kernel area differ without the kernel algorithm claiming that the original polygon itself shrank.

Read area and dimension together

A positive-area kernel is a two-dimensional region. A kernel can also collapse to a segment or a single point, both of area zero. Empty kernel is another zero-area outcome but is geometrically different; the page returns a separate dimension status to preserve that distinction.

Near-degenerate floating-point clipping can make tiny features sensitive to input precision. A zero area alone is not enough to classify a polygon as having no valid viewpoint. Inspect returned vertices and dimension, and avoid replacing small coordinates by arbitrary epsilons merely to force a preferred topological label.

Distinguish the result from other visibility tools

A visibility polygon from a fixed interior viewpoint lists targets that observer can see. The kernel instead lists viewpoints that see every target. Taking the visible area at one convenient point does not establish the complete kernel, even if that point happens to see the full polygon.

The kernel is also not the medial axis, a straight skeleton or a largest empty disk. Those structures can be useful for other geometric decisions but optimize or encode different information. A visually central point need not lie in the kernel of a complicated concave polygon.

Use the viewpoint region within its idealization

The model assumes unobstructed straight segments inside a two-dimensional polygon with zero-thickness boundaries. Obstacles represented by holes, visibility range limits, finite observer size and angular field-of-view constraints are not included. Adding them after interpreting the area can invalidate the original visibility claim.

The form supports at most thirty-two vertices and checks numerical simplicity before clipping. Its output is a planar geometric construction, not a physical camera-placement certification. Preserve the boundary coordinates, region convention and dimension status when using the result as a checkable example or an input to further design.

A few questions, answered

Is this the visible region from one observer?

No. It finds all viewpoints that can see the whole polygon.

Can a concave polygon have a nonempty kernel?

Yes. The L-shaped example has a unit-square kernel.

Does zero kernel area mean empty?

Not necessarily. A segment or point kernel also has zero area; read the dimension status.

Are holes supported?

No. Input is one simple boundary without interior holes.

Find your calculator

Start typing to explore the library.