{"title":"A MATLAB code for finding the kernel of a simple polygon","authors":"Annamaria Mazzia","doi":"10.1016/j.jocs.2025.102616","DOIUrl":null,"url":null,"abstract":"<div><div>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.</div></div>","PeriodicalId":48907,"journal":{"name":"Journal of Computational Science","volume":"90 ","pages":"Article 102616"},"PeriodicalIF":3.7000,"publicationDate":"2025-06-02","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Computational Science","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S1877750325000936","RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"COMPUTER SCIENCE, INTERDISCIPLINARY APPLICATIONS","Score":null,"Total":0}
引用次数: 0
Abstract
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.
期刊介绍:
Computational Science is a rapidly growing multi- and interdisciplinary field that uses advanced computing and data analysis to understand and solve complex problems. It has reached a level of predictive capability that now firmly complements the traditional pillars of experimentation and theory.
The recent advances in experimental techniques such as detectors, on-line sensor networks and high-resolution imaging techniques, have opened up new windows into physical and biological processes at many levels of detail. The resulting data explosion allows for detailed data driven modeling and simulation.
This new discipline in science combines computational thinking, modern computational methods, devices and collateral technologies to address problems far beyond the scope of traditional numerical methods.
Computational science typically unifies three distinct elements:
• Modeling, Algorithms and Simulations (e.g. numerical and non-numerical, discrete and continuous);
• Software developed to solve science (e.g., biological, physical, and social), engineering, medicine, and humanities problems;
• Computer and information science that develops and optimizes the advanced system hardware, software, networking, and data management components (e.g. problem solving environments).