Spherical polygons used in practice are nice, but the spherical point-in-polygon problem (SPiP) has long eluded solutions based on the winding number (wn). That a punctured sphere is simply connected is to blame. As a workaround, we prove that requiring the boundary of a spherical polygon to never intersect its antipode is sufficient to reduce its SPiP problem to the planar, point-in-polygon (PiP) problem, whose state-of-the-art solution uses wn and does not utilize known interior points (KIP). We refer to such spherical polygons as boundary antipode-excluding (BAE) and show that all spherical polygons fully contained within an open hemisphere is BAE. We document two successful reduction methods, one based on rotation and the other on shearing, and address a common concern. Both reduction algorithms, when combined with a wn-PiP algorithm, solve SPiP correctly and efficiently for BAE spherical polygons. The MATLAB code provided demonstrates scenarios that are problematic for previous work.
翻译:实际使用的球面多边形具有良好性质,但基于绕数(winding number, wn)的球面点包含问题(spherical point-in-polygon, SPiP)长期未能得到解决,其原因在于带孔球面是单连通的。作为替代方案,我们证明:要求球面多边形边界永不与其对跖点相交,足以将其SPiP问题归约为平面点包含问题(point-in-polygon, PiP),后者当前最先进的解法使用绕数且不利用已知内点(known interior points, KIP)。我们将此类球面多边形称为边界排除对跖点(boundary antipode-excluding, BAE)型,并证明所有完全包含于开半球内的球面多边形均为BAE型。我们记录了两种成功的归约方法——一种基于旋转,另一种基于剪切,并解决了常见的技术顾虑。这两种归约算法与基于绕数的PiP算法结合后,能正确且高效地解决BAE型球面多边形的SPiP问题。提供的MATLAB代码演示了先前工作中存在问题的场景。