A MATLAB code for finding the kernel of a simple polygon
This paper presents an algorithm for determining the kernel of a simple polygon. Traditional algorithms typically define the kernel by intersecting carefully chosen half-planes. In contrast, we explore a less-used approach as described in Zhao and Wang, (2010) , that handles concave vertices of the polygon as part of the kernel computation. This approach leverages two key techniques. First, it intersects the polygon’s interior with lines passing through edges adjacent to concave vertices. Second, it analyzes the orientations of two specific triangles identified by the sequence of vertices defining the line segment’s endpoints. This method for ray-line segment intersection plays a crucial role in efficiently determining the kernel. While the original approach effectively determines the kernel for a subset of simple polygons, it has limitations in handling all possible cases. This paper addresses these limitations by presenting a refined algorithm that expands the applicability of the method. The enhanced algorithm is implemented in MATLAB and validated through extensive testing to ensure its accuracy and efficiency. • Computation of the kernel of a simple polygon • Description of an existing algorithm and significant enhancement of it • Simple MATLAB implementation of the enhanced algorithm.
Authors
- Annamaria Mazzia (ORCID: https://orcid.org/0000-0001-6093-2107)
Institutions
- University of Padua (IT)
Publication Details
- Journal
- Journal of Computational Science
- Published
- 2025-06-02
- DOI
- https://doi.org/10.1016/j.jocs.2025.102616
- Primary Topic
- Computational Geometry and Mesh Generation
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- European Commission
- Università degli Studi di Padova