Concave-convex polygon sharp corner removal and external expansion method and device based on envelope line operation principle
Through the method based on the envelope operation principle, the problems of insufficient accuracy and low efficiency in the equidistant and non-equidistant outscaling algorithms of concave and convex polygons are solved, and accurate polygon outscaling is realized, which improves the drawing accuracy and efficiency in the application.
Patent Information
- Application Number
- CN202411424860.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-03-04
AI Technical Summary
In the prior art, the concave and convex polygon equidistance outscaling algorithm has problems such as insufficient accuracy, poor practicality and low efficiency. Especially in the drawing of civil aviation and MVA buffers, there is a lack of effective non-equidistance outscaling algorithm solutions.
The method based on the envelope operation principle is adopted to determine the concaveness and convexity of each point in a polygon, determine the outward expansion distance of each point, and use the point boundary algorithm after the outward expansion, equidistant outward expansion drawing algorithm and region non-equidistant outward expansion drawing algorithm to achieve accurate calculation and drawing of equidistant and non-equidistant outward expansion.
The precise calculation and drawing of equidistant and non-equidistant outscaling of concave and convex polygons is realized, which improves the drawing accuracy and efficiency, solves the problems of insufficient accuracy and low efficiency in the existing technology, and provides automated drawing solutions for applications such as MVA buffers.
Smart Images

Figure CN119559274A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of civil aviation airspace planning, air traffic control and flight procedures, and in particular to a method for desharpening and expanding concave-convex polygons based on an envelope operation principle, and also to a device for desharpening and expanding concave-convex polygons based on an envelope operation principle. Background Art
[0002] The de-sharpening and expansion of irregular concave-convex polygons can be divided into two methods: equidistant expansion and non-equidistant expansion. The non-equidistant expansion can be further divided into unequal expansion with different expansion distances at each point and unequal expansion with different distances in different regions (mainly used in the drawing of minimum surveillance guidance altitude (MVA) buffer zones in the field of civil air traffic control).
[0003] At present, the equidistant expansion algorithms for concave and convex polygons at home and abroad can be roughly summarized into four categories.
[0004] Vector-based polygon isometric expansion method. This method will expand and translate each edge of the polygon in turn according to the vector, but there will be disconnection or self-intersection at the vertex positions of the outer convex points and inner concave points. When the arc edge is expanded or contracted, it cannot be achieved by vectors and can only be drawn by changing the radius, which is prone to abnormal tangent points.
[0005] Equilateral moment offset method. Specific examples include triangulation method and Voronoi diagram method. This method is similar to polygon-based expansion. First, each edge is offset. The difference is that after the offset, the disconnected expansion lines are connected with arc segments. Finally, self-intersections are checked and invalid rings are deleted. The calculation amount is huge and the accuracy rate is extremely low in judging self-intersections and invalid rings.
[0006] Dilation algorithm based on pixel processing. This algorithm performs specific logical operations on the area corresponding to the binary image at each pixel position. The disadvantage is that the operation result is the pixel corresponding to the output image, and it is impossible to form an effective data structure for subsequent logical calculations.
[0007] The method of drawing a circle based on all points on the contour. This method first draws a circle with the outer expansion distance as the radius of all points to obtain the point set of the arc, and then calculates all the point sets to determine the point set of the outermost boundary. This can achieve equidistant expansion of concave and convex polygons to remove sharp corners. However, since polygons, especially complex polygons, have many contour points, if the required accuracy is high, the point set of all arcs may reach even millions or even tens of millions, and the calculation efficiency is extremely low.
[0008] In summary, these equidistant expansion algorithms have low drawing accuracy and often have self-intersection or missed intersection phenomena. At the same time, due to the large amount of calculation, the drawing efficiency is generally low. For applications in civil aviation airspace and other production work, there are deficiencies in operability and stability.
[0009] For irregular convex and concave polygons with different expansion distances at each point, due to the small number of application scenarios and the lack of related research at home and abroad, equal-distance expansion is generally used for approximate drawing, which is difficult to achieve accurately.
[0010] For the unequal expansion distances in different areas, in the current MVA buffer drawing application in the civil air traffic control field, it is usually drawn manually using the drawing tool AutoCAD, and there is a lack of systematic algorithm solutions. Summary of the invention
[0011] In order to overcome the defects of the prior art, the technical problem to be solved by the present invention is to provide a method for desharpening and expanding concave convex polygons based on the envelope operation principle, which realizes the accurate calculation and drawing of equidistant expansion and two types of non-equidistant expansion, solves the problems of insufficient accuracy, poor practicality, and low efficiency in the existing equidistant expansion algorithm of concave convex polygons, fills the gap in the non-equidistant expansion algorithm, and provides an automated drawing solution for MVA buffer drawing.
[0012] The technical solution of the present invention is: the method for removing sharp corners and expanding concave-convex polygons based on the envelope operation principle comprises the following steps:
[0013] (1) Determine the concavity and convexity of each point of the polygon;
[0014] (2) Determine the expansion distance d of each point, d = {d1, d2...dn}, if the expansion is equidistant, then
[0015] d1=d2=...=dn; if the expansion distances of each point are different, the d values of each point are not all the same; if the expansion distances of different regions are different, the irregular polygon is cut into two irregular sub-polygons according to the region, and their expansion distances are d1 and d2 respectively, and
[0016] d1≠d2;
[0017] (3) Point boundary algorithm after expansion: All concave points are obtained by the intersection of the extension lines of two adjacent edges translated by a distance d. If there are two consecutive concave points, it is determined whether the three adjacent expansion lines have an intersection. If so, the intersection is used as the expansion concave point, and the original two expansion concave points are cancelled. A circle is made with all convex points as the center and d as the radius. The set of points on the circumference that are segmented according to the accuracy is calculated to achieve the purpose of removing sharp corners.
[0018] (4) The equidistant expansion drawing algorithm for concave and convex polygons is improved based on the envelope operation principle by referring to the Jarvis stepping algorithm for finding the convex hull, and the improved iterative algorithm is used to find the next outermost point in turn to complete the closed loop;
[0019] (5) An algorithm for drawing with unequal distance expansion in different regions is proposed. It is proposed to first split the graphics using a multi-graphic splitting algorithm, and then use a multi-graphic overlay algorithm and an iterative algorithm for the outer contour to calculate the outermost boundary point set of the graphics.
[0020] The beneficial technical effects of the present invention are: realizing the accurate calculation and drawing of equidistant expansion and two types of non-equidistant expansion, solving the problems of insufficient accuracy, poor practicality, and low efficiency in the existing equidistant expansion algorithm for convex polygons, and filling the gap in the non-equidistant expansion algorithm, while providing an automated drawing solution for MVA buffer drawing, flight program protection area drawing, etc.
[0021] A device for desharpening and expanding concave-convex polygons based on the envelope operation principle is also provided, which comprises:
[0022] A module for judging concavity and convexity, which is configured to judge the concavity and convexity of each point of a polygon;
[0023] Determine the expansion distance module, which is configured to determine the expansion distance d of each point, d = {d1,
[0024] d2......dn}, if the expansion is equidistant, then d1=d2=...=dn; if the expansion is unequal, then the d values of each point are not all the same; if the expansion is unequal in distance, then the d values of each point are not all the same;
[0025] If expansion is performed, the irregular polygon is cut into two irregular sub-polygons according to the area, and the outer expansion distances are d1 and d2 respectively, and d1≠d2;
[0026] The module for obtaining the boundary of points after expansion is configured to obtain the boundary of points after expansion. All concave points obtain the vertices after expansion according to the intersection of the extension lines of two adjacent edges after translation by a distance of d. If there are two consecutive concave points, it is determined whether the three adjacent expansion lines have an intersection. If so, the intersection is used as the expansion concave point, and the original two expansion concave points are cancelled. A circle is made with all convex points as the center and d as the radius, and a set of points on the circumference that are segmented according to the accuracy is calculated to achieve the purpose of removing sharp corners.
[0027] The isometric expansion drawing module is configured to perform isometric expansion drawing of concave and convex polygons. It refers to the Jarvis stepping algorithm for finding the convex hull, improves it based on the envelope operation principle, and uses the improved iterative algorithm to find the next outermost point in turn to complete the closed loop;
[0028] The module for drawing with unequal distance expansion in different regions is configured to draw with unequal distance expansion of concave and convex polygons. It is proposed to firstly split the graphics by multi-graphic splitting algorithm, and then use multi-graphic superposition algorithm and outer contour iterative algorithm to calculate the outermost boundary point set of the graphics. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1The present invention is a flowchart of a method for desharpening and expanding concave-convex polygons based on the envelope operation principle. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0031] In order to make the description of the present disclosure more detailed and complete, the following provides an illustrative description of the implementation and specific embodiments of the present invention; however, this is not the only form of implementing or using the specific embodiments of the present invention. The implementation covers the features of multiple specific embodiments and the method steps and sequences used to construct and operate these specific embodiments. However, other specific embodiments can also be used to achieve the same or equivalent functions and step sequences.
[0032] like Figure 1 As shown, the method for desharpening and expanding concave-convex polygons based on the envelope operation principle comprises the following steps:
[0033] (1) Determine the concavity and convexity of each point of the polygon;
[0034] (2) Determine the expansion distance d of each point, d = {d1, d2...dn}, if the expansion is equidistant, then
[0035] d1=d2=...=dn; if the expansion distances of each point are different, the d values of each point are not all the same; if the expansion distances of different regions are different, the irregular polygon is cut into two irregular sub-polygons according to the region, and the expansion distances are
[0036] d1, d2, and d1≠d2;
[0037] (3) Point boundary algorithm after expansion: All concave points are obtained by the intersection of the extension lines of two adjacent edges translated by a distance d. If there are two consecutive concave points, it is determined whether the three adjacent expansion lines have an intersection. If so, the intersection is used as the expansion concave point, and the original two expansion concave points are cancelled. A circle is made with all convex points as the center and d as the radius. The set of points on the circumference that are segmented according to the accuracy is calculated to achieve the purpose of removing sharp corners.
[0038] (4) Concave and convex polygon equidistant expansion drawing algorithm, refer to the Jarvis step algorithm for finding the convex hull
[0039] The method is improved based on the envelope operation principle, and the improved iterative algorithm is used to find the next outermost point in turn to complete the closed loop;
[0040] (5) An algorithm for drawing with unequal distance expansion in different regions is proposed. It is proposed to first split the graphics using a multi-graphic splitting algorithm, and then use a multi-graphic overlay algorithm and an iterative algorithm for the outer contour to calculate the outermost boundary point set of the graphics.
[0041] The beneficial technical effects of the present invention are: realizing the accurate calculation and drawing of equidistant expansion and two types of non-equidistant expansion, solving the problems of insufficient accuracy, poor practicality, and low efficiency in the existing equidistant expansion algorithm for convex polygons, and filling the gap in the non-equidistant expansion algorithm, while providing an automated drawing solution for MVA buffer drawing, flight program protection area drawing, etc.
[0042] Preferably, the step (1) comprises the following sub-steps:
[0043] (1.1) Concavity algorithm of straight line segment points
[0044] Using the vector method, create a vector for each side of the polygon, and use the cross product of adjacent sides to test convexity and concavity. Assume that P1 (x1, y1, z1), P2 (x2, y2, z2), and P3 (x3, y3, z3) are three consecutive points in a clockwise direction, and the clockwise vector cross product is is a convex point, otherwise it is a concave point;
[0045] (1.2) Concavity and convexity algorithm of arcs and spirals
[0046] Assume that the center point is P C (xc, yc, zc), the first two points on the arc in the clockwise direction are P1(x1, y1, z1) and P2(x2, y2, z2), connect P1P2, P1P C Make vectors and determine vector cross products Then the center of the circle is outside the polygon, and every point on the arc is a concave point, otherwise every point is a convex point;
[0047] (1.3) Concavity algorithm for irregular curve segments
[0048] The irregular curve is split into a set of points, and every two adjacent points are connected, so as to convert the irregular curve into a plurality of straight line segments, and the concavity and convexity judgment method of the points composed of the straight line segments is used to judge the points one by one.
[0049] Preferably, the step (4) comprises the following sub-steps:
[0050] (4.1) Improved algorithm based on envelope operation principle
[0051] Take the tangent point on the right side of the expansion circle of any convex point a as the starting point p, and judge the expansion point of the next vertex b in a clockwise direction. Connect p with each point in turn to find the outermost intersection point p1. Then use p1 as the starting point and use the iterative algorithm to find the next outermost point. If the current point p' is located in the expansion point of b, perform the above iterative calculation on the expansion points of p' and the next point c, and so on until the starting point p is reached to complete the closed loop.
[0052] (4.2) Improved algorithm for envelope iteration
[0053] Xn+1=f(Xn)
[0054] Where Xn represents the nth approximate solution in the iterative process, f(Xn) is the method for finding the next point, and Xn+1 represents the next approximate solution. In the iterative calculation, starting from the initial value X0, by repeatedly calculating f(Xn), the sequence {X0, X1, X2, ..., Xn} is obtained until the sequence achieves the required function.
[0055] Preferably, in step (4.2), if the next point is a concave point, f(Xn) is directly connected to the next point; if it is a point on an arc, the concave point logic is followed; if the next point is a convex point, a circle is made with the convex point as the center and the outermost point on the arc as the radius to find the outermost point.
[0056] Preferably, the step (5) comprises the following sub-steps:
[0057] (5.1) Multi-graph splitting algorithm
[0058] According to the position tangent, the polygon is split into multiple partial graphics, and each partial graphic is drawn by equidistant expansion according to the method in the above step (4) to form multiple split graphics.
[0059] Preferably, the step (5) comprises the following sub-steps:
[0060] (5.2) Multi-graphics overlay algorithm
[0061] First, perform superposition processing on the two split graphics according to different situations:
[0062] Case a: If the two split figures have 0 intersection points, discard them;
[0063] Case b: If the two split figures have one intersection, discard it; if there are an odd number of intersections greater than 1, discard all tangent intersections and calculate according to the even number of intersection logic corresponding to cases c and d;
[0064] Case c: If the two split figures have two intersections, find the maximum value according to the horizontal coordinates x of the two split figures, mark the figure corresponding to the minimum or maximum point as figure 1, and mark the other figure as figure 2. Start from the starting point S of figure 1 and collect boundary points clockwise until the first intersection C1. Find the left point of figure 2 closest to C1 at the intersection, and then collect points on figure 2 clockwise from point L1 until the second intersection C2. Follow the above steps to find the nearest left point L2 on figure 1 at the second intersection, and use the iterative method to bring in the search point by point until the starting point S is collected to form a closed figure;
[0065] Case d: If the two split figures have 4 or more even intersections, then as in case c, first mark figure 1 and figure 2 according to the maximum value, then use the starting point S of figure 1 to find the first intersection C1, and then find the second intersection C2 on figure 2, then find the third intersection C3 on figure 1, find the fourth intersection C4 on figure 2, and so on, and finally return to figure 1 to find the starting point S to complete the closure.
[0066] Based on the superposition of two split graphics, multiple graphics superposition processing is performed: first select any one graphic and any one graphic intersecting with the graphic, and perform superposition processing according to method (5.1), then superimpose the superimposed combined graphic with any one graphic intersecting with the combined graphic according to method (5.1), and so on, until all graphics are superimposed into a complete combined graphic.
[0067] Preferably, the step (5) comprises the following sub-steps:.
[0068] (5.3) Iterative algorithm for multi-graphic contours
[0069] The improved algorithm of envelope iteration using step (4): the iteration formula Xn+1=f(Xn), Xn is the position of the current point Pn(xn,yn,zn), and f(Xn) is the method for finding the next point;
[0070] If the next point is not an intersection point, then f(Xn) is to find the next point clockwise;
[0071] If the next point is an intersection, then f(Xn) is to find the left point on the other figure that is closest to the intersection.
[0072] Those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes the steps of the above-mentioned embodiment method, and the storage medium can be: ROM / RAM, disk, CD, memory card, etc. Therefore, corresponding to the method of the present invention, the present invention also includes a device for desharpening and expanding concave-convex polygons based on the envelope operation principle, and the device is usually represented in the form of functional modules corresponding to the steps of the method. The device includes:
[0073] A module for judging concavity and convexity, which is configured to judge the concavity and convexity of each point of a polygon;
[0074] Determine the expansion distance module, which is configured to determine the expansion distance d of each point, d = {d1,
[0075] d2......dn}, if the expansion is equidistant, then d1=d2=...=dn; if the expansion is unequal, then the d values of each point are not all the same; if the expansion is unequal in distance, then the d values of each point are not all the same;
[0076] If expansion is performed, the irregular polygon is cut into two irregular sub-polygons according to the area, and the outer expansion distances are d1 and d2 respectively, and d1≠d2;
[0077] The module for obtaining the boundary of points after expansion is configured to obtain the boundary of points after expansion. All concave points obtain the vertices after expansion according to the intersection of the extension lines of two adjacent edges after translation by a distance of d. If there are two consecutive concave points, it is determined whether the three adjacent expansion lines have an intersection. If so, the intersection is used as the expansion concave point, and the original two expansion concave points are cancelled. A circle is made with all convex points as the center and d as the radius, and a set of points on the circumference that are segmented according to the accuracy is calculated to achieve the purpose of removing sharp corners.
[0078] The isometric expansion drawing module is configured to perform isometric expansion drawing of concave and convex polygons. It refers to the Jarvis stepping algorithm for finding the convex hull, improves it based on the envelope operation principle, and uses the improved iterative algorithm to find the next outermost point in turn to complete the closed loop;
[0079] The module for drawing with unequal distance expansion in different regions is configured to draw with unequal distance expansion of concave and convex polygons. It is proposed to firstly split the graphics by multi-graphic splitting algorithm, and then use multi-graphic superposition algorithm and outer contour iterative algorithm to calculate the outermost boundary point set of the graphics.
[0080] The present invention provides a solution for drawing concave-convex polygon expansion graphics. Through the improved algorithm based on the envelope operation principle and the improved iterative algorithm proposed in the present invention, various types of concave-convex polygon expansion graphics can be drawn conveniently, such as accurate drawing of equidistant expansion of curves and ordinary surfaces or unequal expansion with different expansion distances of each point; by proposing a multi-graphics splitting-overlaying-iterative operation process, fast and accurate drawing of unequal expansion graphics with different distances in different regions can be completed, such as MVA buffer zone and flight procedure protection zone.
[0081] Therefore, the drawing contents that can be achieved by the method proposed in the present invention are summarized in Table 1, but are not limited to Table 1.
[0082] Serial number Curve Type Ordinary noodles Protected area 1 Line segment Irregular concave and convex polygons MVA Buffer 2 Arc rectangle Waiting Procedure Protection Area 3 oval Trapezoid Baseline Turn Protection Area 4 Equidistant spiral Circle or ellipse 5 Unequally spaced spirals
[0083] Table 1
[0084] The specific application scenarios and rendering results of the concave-convex polygon desharpening and outward expansion method proposed in the present invention are classified and described as follows.
[0085] 1. MVA buffer drawing (Table 2)
[0086] Serial number Airport Draw Quantity Drawing Effects 1 Guangzhou Baiyun 9 Precise and accurate 2 Yueyang, Hunan 3 Precise and accurate 3 Beijing Daxing 1 Precise and accurate 4 Chengdu Tianfu 6 Precise and accurate 5 Shanghai Hongqiao 1 Precise and accurate
[0087] Table 22. Flight procedure protection zone drawing (Table 3)
[0088] Serial number Airport Draw Quantity Drawing Effects 1 Beijing Capital 128 Precise and accurate 2 Beijing Daxing 86 Precise and accurate 3 Chongqing Liangjiang 79 Precise and accurate 4 Shanghai Pudong 135 Precise and accurate 5 Shanghai Hongqiao 111 Precise and accurate 6 Guilin Two Rivers 33 Precise and accurate 7 Dalian Zhoushuizi 58 Precise and accurate 8 Xi'an Xianyang 85 Precise and accurate
[0089] Table 33. Graphics drawing in other fields (Table 4)
[0090] Serial number Application Scenario Field 1 Computer 2D expansion map drawing Computer Applications 2 Identification of operating area based on archipelago point cloud Transportation 3 Human circumference recognition based on effective recognition points AI
[0091] Table 4
[0092] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any simple modification, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention are still within the protection scope of the technical solution of the present invention.
Claims
1. A method for desharpening and expanding concave-convex polygons based on the envelope operation principle, characterized by: It includes the following steps: (1) Determine the concavity and convexity of each point of the polygon; (2) Determine the expansion distance d of each point, d = {d1, d2...dn}, if the expansion is equidistant, then d1=d2=...=dn; if the expansion distances of each point are different, the d values of each point are not all the same; if the expansion distances of different regions are different, the irregular polygon is cut into two irregular sub-polygons according to the region, and their expansion distances are d1 and d2 respectively, and d1≠d2; (3) Point boundary algorithm after expansion: All concave points are obtained by the intersection of the extension lines of two adjacent edges translated by a distance d. If there are two consecutive concave points, it is determined whether the three adjacent expansion lines have an intersection. If so, the intersection is used as the expansion concave point, and the original two expansion concave points are cancelled. A circle is made with all convex points as the center and d as the radius. The set of points on the circumference that are segmented according to the accuracy is calculated to achieve the purpose of removing sharp corners. (4) The equidistant expansion drawing algorithm for concave and convex polygons is improved based on the envelope operation principle by referring to the Jarvis stepping algorithm for finding the convex hull, and the improved iterative algorithm is used to find the next outermost point in turn to complete the closed loop; (5) An algorithm for drawing with unequal distance expansion in different regions is proposed. It is proposed to first split the graphics using a multi-graphic splitting algorithm, and then use a multi-graphic overlay algorithm and an iterative algorithm for the outer contour to calculate the outermost boundary point set of the graphics.
2. The method for desharpening and expanding concave-convex polygons based on the envelope operation principle according to claim 1, characterized in that: The step (1) comprises the following sub-steps: (1.1) Concavity algorithm of straight line segment points Using the vector method, create a vector for each side of the polygon, and use the cross product of adjacent sides to test convexity and concavity. Assume that P1 (x1, y1, z1), P2 (x2, y2, z2), and P3 (x3, y3, z3) are three consecutive points in a clockwise direction, and the clockwise vector cross product is is a convex point, otherwise it is a concave point; (1.2) Concavity and convexity algorithm of arcs and spirals Assume that the center point is P C (xc, yc, zc), the first two points on the arc in the clockwise direction are P1(x1, y1, z1) and P2(x2, y2, z2), connect P1P2, P1P C Make vectors and determine vector cross products Then the center of the circle is outside the polygon, and every point on the arc is a concave point, otherwise every point is a convex point; (1.3) Concavity algorithm for irregular curve segments The irregular curve is split into a set of points, and every two adjacent points are connected, so as to convert the irregular curve into a plurality of straight line segments, and the concavity and convexity judgment method of the points composed of the straight line segments is used to judge the points one by one.
3. The method for desharpening and expanding concave-convex polygons based on the envelope operation principle according to claim 2, characterized in that: The step (4) comprises the following sub-steps: (4.1) Improved algorithm based on envelope operation principle Take the tangent point on the right side of the expansion circle of any convex point a as the starting point p, and judge the expansion point of the next vertex b in a clockwise direction. Connect p with each point in turn to find the outermost intersection point p1. Then use p1 as the starting point and use the iterative algorithm to find the next outermost point. If the current point p' is located in the expansion point of b, perform the above iterative calculation on the expansion points of p' and the next point c, and so on until the starting point p is reached to complete the closed loop. (4.2) Improved algorithm for envelope iteration Xn+1=f(Xn) Where Xn represents the nth approximate solution in the iterative process, f(Xn) is the method for finding the next point, and Xn+1 represents the next approximate solution. In the iterative calculation, starting from the initial value X0, by repeatedly calculating f(Xn), the sequence {X0, X1, X2, ..., Xn} is obtained until the sequence achieves the required function.
4. The method for desharpening and expanding concave-convex polygons based on the envelope operation principle according to claim 3, characterized in that: In the step (4.2), if the next point is a concave point, f(Xn) is directly connected to the next point; if it is a point on an arc, the concave point logic is used; if the next point is a convex point, a circle is made with the convex point as the center and the outermost point on the arc as the radius to find the outermost point on the arc.
5. The method for desharpening and expanding concave-convex polygons based on the envelope operation principle according to claim 4, characterized in that: The step (5) comprises the following sub-steps: (5.1) Multi-graph splitting algorithm According to the position tangent, the polygon is split into multiple partial graphics, and each partial graphic is drawn by equidistant expansion according to the method in the above step (4) to form multiple split graphics.
6. The method for desharpening and expanding concave-convex polygons based on the envelope operation principle according to claim 4, characterized in that: The step (5) comprises the following sub-steps: (5.2) Multi-graphics overlay algorithm First, perform superposition processing on the two split graphics according to different situations: Case a: If the two split figures have 0 intersection points, discard them; Case b: If the two split figures have one intersection, discard it; if there are an odd number of intersections greater than 1, discard all tangent intersections and calculate according to the logic of the even number of intersections corresponding to cases c and d; Case c: If the two split figures have two intersections, find the maximum value according to the horizontal coordinates x of the two split figures, mark the figure corresponding to the minimum or maximum point as figure 1, and mark the other figure as figure 2. Start from the starting point S of figure 1 and collect boundary points clockwise until the first intersection C1. Find the left point of figure 2 closest to C1 at the intersection, and then collect points on figure 2 clockwise from point L1 until the second intersection C2. Follow the above steps to find the nearest left point L2 on figure 1 at the second intersection, and use the iterative method to bring in the search point by point until the starting point S is collected to form a closed figure; Case d: If the two split figures have 4 or more even intersections, then as in case c, first mark figure 1 and figure 2 according to the maximum value, then find the first intersection C1 from the starting point S of figure 1, and then find the second intersection C2 on figure 2, find the third intersection C3 on figure 1, find the fourth intersection C4 on figure 2, and so on, and finally return to figure 1 to find the starting point S to complete the closure; Based on the superposition of two split graphics, multiple graphics superposition processing is performed: first select any one graphic and any one graphic intersecting with the graphic, and perform superposition processing according to method (5.1), then superimpose the superimposed combined graphic with any one graphic intersecting with the combined graphic according to method (5.1), and so on, until all graphics are superimposed into a complete combined graphic.
7. The method for desharpening and expanding concave-convex polygons based on the envelope operation principle according to claim 5, characterized in that: The step (5) comprises the following sub-steps: (5.3) Iterative algorithm for multi-graphic contours The improved algorithm of envelope iteration using step (4): the iteration formula Xn+1=f(Xn), Xn is the position of the current point Pn(xn,yn,zn), and f(Xn) is the method for finding the next point; If the next point is not an intersection point, then f(Xn) is to find the next point clockwise; If the next point is an intersection, then f(Xn) is to find the left point on the other figure that is closest to the intersection.
8. A device for desharpening and expanding concave-convex polygons based on the envelope calculation principle, characterized in that: It includes: A module for judging concavity and convexity, which is configured to judge the concavity and convexity of each point of a polygon; Determine the expansion distance module, which is configured to determine the expansion distance d of each point, d = {d1, d2......dn}, if the expansion is equidistant, then d1=d2=...=dn; if the expansion is unequal, then the d values of the points are not all the same; if the expansion is unequal and the distances are different in different regions, then the irregular polygon is cut into two irregular sub-polygons according to the region, and their expansion distances are d1, d2 respectively, and d1≠d2; The module for obtaining the boundary of points after expansion is configured to obtain the boundary of points after expansion. All concave points obtain the vertices after expansion according to the intersection of the extension lines of two adjacent edges after translation by a distance of d. If there are two consecutive concave points, it is determined whether the three adjacent expansion lines have an intersection. If so, the intersection is used as the expansion concave point, and the original two expansion concave points are cancelled. A circle is made with all convex points as the center and d as the radius, and a set of points on the circumference that are segmented according to the accuracy is calculated to achieve the purpose of removing sharp corners. The isometric expansion drawing module is configured to perform isometric expansion drawing of concave and convex polygons. It refers to the Jarvis stepping algorithm for finding the convex hull, improves it based on the envelope operation principle, and uses the improved iterative algorithm to find the next outermost point in turn to complete the closed loop; The module for drawing with unequal distance expansion in different regions is configured to draw with unequal distance expansion of concave and convex polygons. It is proposed to firstly split the graphics by multi-graphic splitting algorithm, and then use multi-graphic superposition algorithm and outer contour iterative algorithm to calculate the outermost boundary point set of the graphics.
Citation Information
Cited By
Automatic identification and intelligent processing method and device for sharp angle pattern spots
CN120279388A