Unlock instant, AI-driven research and patent intelligence for your innovation.

Method for judging position relationship between point and arbitrary polygon by using included angle sum method combining cross multiplication method

A relational method and polygon technology, applied in image data processing, instruments, calculations, etc., can solve problems such as poor stability, difficult to solve critical situations, and difficult to deal with critical situations, and achieve the effect of small amount of calculation.

Inactive Publication Date: 2017-07-28
深圳市龙腾飞通讯装备技术有限公司
View PDF0 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] The principle of the cross product judgment method is simple and easy to program, but it is only suitable for convex polygons; the angle sum judgment method is also easy to program, and is suitable for any polygon, but it is not easy to solve the critical situation; the ray method is easy to combine and improve, but it is difficult Handle some critical cases, poor stability

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for judging position relationship between point and arbitrary polygon by using included angle sum method combining cross multiplication method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0017] Such as figure 1 Shown, the present invention provides a kind of angle sum method combined with cross multiplication method to determine point and arbitrary polygonal position relationship method, if P={p1, p2,..., pn, p1} is a vertex is pi (xi, yi), i=1, 2,...,n any polygon, Pt is a decision point. PtPi is the vectors connecting pt and pi, αi represents the angle between the vector PtPi and PtPi+1; calculate the azimuth βi of the vector PtPi, and the azimuth βi+1 of PtPi+1; the angle αi is calculated by the difference of the azimuth : αi=|βi+1-βi|; because αi(-180°180°, αi=360°-αi; determine the direction of the included angle by cross product of Pt and PiPi+1 , the direction of the included angle αi is positive when it is greater than zero, and the direction of the included angle αi is negative when it is not greater than zero; calculate the sum of included angles, when the sum of included angles is equal to 360°, the point is inside the polygon; when the sum of inc...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method for judging the positional relationship between a point and an arbitrary polygon by using the angle sum method combined with the cross multiplication method, traversing the closed polygon vertices in order, and calculating the azimuth angle between the judging point and the vertices when the traversal is not over; by subtracting the previous vertices The azimuth angle (that is, the azimuth angle difference) to get the included angle value, and the included angle value takes the absolute value; the included angle will not be greater than 180°, and when it is greater than 180°, it will be processed: the included angle value is equal to 360° minus the value obtained in the previous step Angle value; cross product calculation is performed between the judgment point and the two vertex vectors that make up the angle. When the cross product is greater than zero, the direction of the included angle is positive; when it is not greater than zero, the direction of the included angle is negative; the sum of the included angles is added or subtracted according to the direction of the included angle, adding when it is positive and subtracting when it is negative; If the sum is 360°, the judgment point is inside the polygon; if it is not 360°, the judgment point is outside the polygon. The invention judges the direction of the included angle by adding the cross multiplication method, which ensures the judgment of the critical situation of the positional relationship between the judgment point and any polygon.

Description

technical field [0001] The invention relates to a method for judging the positional relationship between a point and an arbitrary polygon, in particular to a method for judging the positional relationship between a point and an arbitrary polygon by an angle sum method combined with a cross multiplication method, and belongs to the technical field of graphic processing. Background technique [0002] In GIS, the topological relationship between points and any polygonal area can be divided into three types: points outside the area, points on the boundary of the area, and points within the area. [0003] The relationship between the judgment point and the position of the polygon is currently mainly based on the cross product judgment method: a convex polygon, each side of which divides the entire 2D screen into left and right sides, and connects the first endpoint of each side with the main test Points to get a vector v, expand the two 2-dimensional vectors into 3-dimensional, a...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06T7/70
Inventor 柳珍
Owner 深圳市龙腾飞通讯装备技术有限公司