The invention discloses a method for judging whether a point is in a polygonal area, which comprises a point P (x, y) and a polygonal area formed by a group of vertexes A = {(x1, y1), (x2, y2), (x3, y3)... (xi, yi)...}, and comprises the following steps: (1) calculating vector angles from all vertexes to the point P; (2) calculating the sum of all vector angles; (3) when the sum of the vector angles is smaller than a judgment threshold value, determining that the point P (x, y) is in the polygonal region; otherwise, determining that the point P (x, y) is not in the polygonal area. The scheme is simple in algorithm and high in operation speed, and can be used for quickly judging whether a position is in a designated area.
本发明公开了一个点是否在多边形区域内的判断方法,包括点P(x,y),以及由一组顶点A={(x,y),(x,y),(x,y)…..(x,y)….}组成的多边形区域,所述的判断方法包括以下步骤:(1)计算所有顶点到点P的向量角度;(2)计算所有向量角度和;(3)当向量角度和小于判断阈值,则点P(x,y)在所述的多边形区域内;否则,点P(x,y)不在所述的多边形区域内。该方案算法简单,运算速度快,可用于快速判断一个位置是否指定区域内。
Method for judging whether point is in polygonal area
一个点是否在多边形区域内的判断方法
2020-05-15
Patent
Elektronische Ressource
Chinesisch
Method for judging whether ship enters dangerous area
Europäisches Patentamt | 2023
|Warning device for judging whether occupant is visually distracted
Europäisches Patentamt | 2015
|Method and system for judging whether aircraft is in safe airspace
Europäisches Patentamt | 2024
|Europäisches Patentamt | 2023
|Detection method for judging whether vehicle can pass through obstacle road section
Europäisches Patentamt | 2023
|