Irregular polygon mesh pattern generation algorithm

Through the random polygon grid pattern generation algorithm, the problem of molar pattern phenomenon in the touch display screen is solved, high-quality display effect and stability are achieved, and suitable for large-scale production.

CN120495445APending Publication Date: 2025-08-15SHENZHEN ZHILING WEIYE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510558214.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

Optical components in existing touch displays generally adopt regular mesh structures, which leads to molar phenomena that affect viewing experience and may lead to information identification errors. It is difficult for the existing technology to generate irregular polygonal mesh patterns.

Method used

The irregular polygon mesh pattern generation algorithm is used to build the initial polygon cluster in a two-dimensional coordinate system, extract growth base points, perform Poisson disk sampling and edge matching algorithm splicing, and combine curvature smoothing processing to generate the irregular polygon mesh pattern.

Benefits of technology

Effectively eliminate molar patterns, improve viewing experience and visual effects, ensure uniform distribution of polygon sizes, ensure stability and topological continuity of grid patterns, and is suitable for large-scale production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120495445A_ABST
    Figure CN120495445A_ABST
Patent Text Reader

Abstract

The invention discloses an irregular polygon mesh pattern generation algorithm. The generation algorithm comprises the following steps: S1, constructing an initial polygon cluster in a two-dimensional coordinate system; s2, extracting a peripheral boundary polygon of the current polygon cluster as a growth base point; s3, performing Poisson disk sampling on each growth base point to generate a secondary polygon cluster; s4, carrying out topological splicing on the secondary polygon cluster and the current polygon cluster by adopting an edge matching algorithm, and realizing geometric fusion of polygons in overlapped regions through vertex coordinate weighted average; s5, taking the fused polygon cluster as a new current cluster, and repeating the steps S2-S4 until a preset area size is reached; s6, performing curvature smoothing processing on the final polygon cluster; according to the irregular polygonal mesh pattern generation algorithm, the moire phenomenon in the touch display screen can be effectively eliminated, so that the watching experience and the visual effect are remarkably improved, and by adopting the irregular polygonal mesh pattern, the regular structure of an optical assembly is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of random grid generation algorithms, in particular to an algorithm for generating irregular polygonal grid patterns. Background Art

[0002] The optical components in existing touch screen displays generally use a regular grid structure, such as a square or hexagonal honeycomb structure. This regular grid structure will interfere with the pixel structure of the display at specific viewing angles and frequencies, resulting in the appearance of moiré patterns. The moiré pattern phenomenon not only affects the viewing experience, but may also cause information recognition errors in some cases.

[0003] The moiré phenomenon caused by the regular grid structure reduces the visual effect and user experience of the touch display screen. The grid pattern generation algorithm in the existing technology is difficult to meet the requirements of irregular polygonal grid patterns. Summary of the Invention

[0004] The purpose of the present invention is to provide an algorithm for generating irregular polygonal mesh patterns to solve the problems raised in the above background technology.

[0005] To achieve the above object, the present invention provides the following technical solution: an algorithm for generating an irregular polygonal grid pattern, the algorithm comprising the following steps:

[0006] S1: Construct an initial polygon cluster in a two-dimensional coordinate system, where each polygon satisfies the vertex spacing constraint D low ≤d≤D upp and adjacent edge angle constraint A low ≤θ≤A upp ;

[0007] S2: Extract the outer boundary polygon of the current polygon cluster as the growth base point;

[0008] S3: Perform Poisson disk sampling on each growth base point to generate a secondary polygon cluster whose polygons satisfy the vertex spacing constraint D low , k1 D low = and D upp , =k2D upp , where 0.9≤k1<1, 1 <k2≤1.1;

[0009] S4: Use edge matching algorithm to topologically join the secondary polygon cluster with the current polygon cluster, and geometrically fuse the polygons in the overlapping area by weighted averaging of vertex coordinates;

[0010] S5: Use the fused polygon cluster as the new current cluster and repeat S2-S4 until the preset area size is reached;

[0011] S6: Perform curvature smoothing on the final polygon cluster to eliminate local sharp corners.

[0012] Preferably, step S1 specifically includes determining the vertex sequence in a clockwise direction by random sampling when generating a seed polygon at the origin, and verifying the Euclidean distance between the new vertex and the most recent historical vertex and the constraint value of the angle between adjacent edge vectors after each sampling.

[0013] Preferably, the lower limit and upper limit of the distance between any points in each irregular polygon are set to D low and D upp , the lower and upper limits of the angle between adjacent sides are A low and A upp , D low and D upp Satisfies the following relationship: D upp -D low ≥0.3*D low , and A low and A upp Satisfy A upp -A low ≥45°.

[0014] Preferably, the exclusion radius R of the Poisson disk sampling satisfies: R=α*(D low +D upp ) / 2, where α∈[0.8,1.2].

[0015] Preferably, the weighted average of vertex coordinates adopts an adaptive weight: w=1-exp(-Δd / σ), wherein Δd is the distance between vertices in the overlapping area, and σ is a characteristic scale parameter.

[0016] Preferably, the curvature smoothing process adopts a geometric diffusion equation based on the Laplace-Beltrami operator: Where λ is the smoothing coefficient and Δ is the discrete Laplace operator.

[0017] Preferably, the method of the generation algorithm is applied to an irregular polygonal mesh pattern generation system, which includes a seed generation module, configured to execute step S1 of any method of claims 1-6; a fractal expansion module, configured to iteratively execute steps S2-S5; a constraint verification unit, which detects in real time whether the polygon vertex spacing and angle meet the set constraints; and an exception handling unit, which triggers local resampling when a constraint violation is detected.

[0018] Preferably, the exception handling unit adopts the following constraint adjustment: when it is detected that the polygon density of the local area exceeds the threshold, D low and D upp Adjust to D low ”=βDlow , D upp ”=βD upp , where β∈[1.05,1.2].

[0019] Compared with the prior art, the present invention has the following beneficial effects:

[0020] 1. The random polygon mesh pattern generation algorithm proposed in this invention can effectively eliminate the moiré phenomenon in touch screen displays, thereby significantly improving the viewing experience and visual effects. By adopting a random polygon mesh pattern, the regular structure of optical components is reduced, allowing the touch screen to maintain high-quality display effects at various viewing angles and frequencies. The algorithm ensures that the polygon sizes in the generated random polygon mesh pattern are evenly distributed, avoiding local over-density or over-sparseness problems, and improving the overall aesthetics and practicality.

[0021] 2. The algorithm of the present invention can ensure that the structural characteristics of each polygon meet preset constraints, such as vertex spacing and adjacent edge angles, thereby ensuring the stability and reliability of the grid pattern. It can also quickly generate irregular polygonal grid patterns of a certain size, which is suitable for large-scale production and practical applications.

[0022] 3. The present invention uses an edge matching algorithm and a weighted averaging method of vertex coordinates to achieve seamless splicing of secondary polygon clusters with the current polygon cluster, ensuring the topological continuity of the grid pattern. It also performs curvature smoothing on the final polygon cluster, eliminating local sharp angles, and further improving the visual effect of the grid pattern and the durability of the touch screen. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 This is a flow chart of the algorithm for generating irregular polygonal mesh patterns according to the present invention.

[0024] Figure 2 Schematic diagram of the structure of the polygon cluster of the present invention. DETAILED DESCRIPTION

[0025] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0026] See also Figures 1 to 2 The present invention provides a technical solution: an algorithm for generating an irregular polygonal grid pattern, the algorithm comprising the following steps:

[0027] S1: Construct an initial polygon cluster in a two-dimensional coordinate system, where each polygon satisfies the vertex spacing constraint D low ≤d≤D upp and adjacent edge angle constraint A low ≤θ≤A upp ;

[0028] Set the lower limit and upper limit of the distance between any points in each irregular polygon to be D low and D upp , the lower and upper limits of the angle between adjacent sides are A low and A upp , D low and D upp Satisfies the following relationship: D upp -D low ≥0.3*D low , ensuring the spacing difference, and A low and A upp Satisfy A upp -A low ≥45°, ensuring angle disorder.

[0029] Step S1 specifically includes, when generating a seed polygon at the origin, using random sampling to determine the vertex sequence in a clockwise direction, and verifying the Euclidean distance between the new vertex and the most recent historical vertex and the constraint value of the angle between adjacent edge vectors after each sampling.

[0030] Starting from the origin (0,0), a vertex sequence is generated in a clockwise direction. Each time a new vertex is generated, a direction angle θ∈[0,360°) is randomly selected, and the step length ∈[D low ,D upp ], calculate the coordinates of the candidate points, if the angle between the new edge and the previous adjacent edge satisfies A low ≤θ≤A upp , then accept the vertex, otherwise resample; when generating the Nth vertex (N≥3), calculate its distance to the first vertex, if it exceeds Dupp, adjust the position of the last vertex to within the closing tolerance ε (ε=0.05*D low ).

[0031] Taking the generation of a quadrilateral as an example, the starting point P0 = (0, 0), the direction angle θ1 = 30° is randomly selected, the step size step1 = 1.0 mm, thereby generating P1 = (0.866, 0.5), and the angle between the side P0-P1 and the next candidate side is calculated: θ2 = 120° is selected, the step size step2 = 0.9 mm, thereby generating P2 = (0.866-0.45, 0.5+0.779) = (0.416, 1.279); repeat until closed, and finally generate a quadrilateral that meets the constraints.

[0032] S2: Extract the outer boundary polygons of the current polygon cluster as the growth base point to determine the anchor point position of subsequent expansion to avoid repeated generation of internal areas;

[0033] Calculate the minimum convex hull of the polygon cluster, retain the polygons on the boundary of the convex hull, check the adjacency relationship of each polygon, and if an edge has no adjacent polygons, mark it as a boundary edge, and the polygon to which it belongs is the growth base point; the growth base point selection rule is: only select units that are not surrounded by other polygons, and mark each base point with its expandable boundary edge.

[0034] S3: Perform Poisson disk sampling on each growth base point to generate a secondary polygon cluster whose polygons satisfy the vertex spacing constraint D low , k1 D low = and D upp , =k2D upp , where 0.9≤k1<1, 1 <k2≤1.1;

[0035] The exclusion radius R of Poisson disk sampling satisfies: R = α*(D low +D upp ) / 2, where α∈[0.8,1.2].

[0036] Taking each extensible edge of the growth base point as the starting edge, candidate polygons are generated in the outward direction of their normals. The distance between the new polygon and the existing unit is checked to see if it is ≥ R. If there is a conflict, resampling is performed. The number of polygons in the secondary cluster is dynamically determined by the exclusion radius and the area of the region.

[0037] S4: Use edge matching algorithm to topologically stitch the secondary polygon cluster with the current polygon cluster. The polygons in the overlapping area are geometrically fused by weighted averaging of vertex coordinates, seamlessly stitching the secondary cluster with the main cluster, eliminating geometric conflicts in the overlapping area and ensuring mesh topological continuity.

[0038] The weighted average of vertex coordinates uses an adaptive weight: w = 1-exp(-Δd / σ), where Δd is the vertex spacing in the overlapping area, σ is the characteristic scale parameter, and σ = 0.5*D low .

[0039] Calculate the Euclidean distance between the vertices of two polygons. If there is a vertex distance Δd≤0.2*D low , then it is determined to be overlapping; for overlapping vertices P1(x1,y1) and P2(x2,y2),

[0040] The coordinates after fusion are: P new =w*P1+(1-w)*P2;

[0041] Non-overlapping polygons are directly inserted into the main cluster; for partially overlapping edges, curve interpolation is used for smooth transition.

[0042] S5: Use the fused polygon cluster as the new current cluster and repeat S2-S4 until the preset area size is reached;

[0043] S6: Perform curvature smoothing on the final polygon cluster to eliminate local sharp corners.

[0044] Curvature smoothing uses the geometric diffusion equation based on the Laplace-Beltrami operator: Where λ is the smoothing coefficient and Δ is the discrete Laplace operator.

[0045] Discrete Laplace smoothing: The vertex position update formula is:

[0046] X i ^{new}=X i +λ*(1 / N)*Σ(X j -X i )

[0047] Where λ = 0.3 is the smoothing coefficient, and N is the number of adjacent vertices;

[0048] Iterate 3-5 times until the maximum curvature is ≤0.05mm -1 .

[0049] The method of the generation algorithm is applied to an irregular polygon mesh pattern generation system, which includes a seed generation module, configured to execute step S1 of any method of claims 1-6; a fractal expansion module, configured to iteratively execute steps S2-S5; a constraint verification unit, which detects in real time whether the polygon vertex spacing and angle meet the set constraints; and an exception handling unit, which triggers local resampling when a constraint violation is detected.

[0050] The exception handling unit uses the following constraint adjustment: when it is detected that the polygon density in the local area exceeds the threshold, the D low and D upp Adjust to D low ”=βD low , D upp ”=βD upp , where β∈[1.05,1.2].

[0051] In summary, the random polygon grid pattern generation algorithm proposed in the present invention can effectively eliminate the moiré phenomenon in the touch display screen, thereby significantly improving the viewing experience and visual effects. By adopting a random polygon grid pattern, the regular structure of the optical components is reduced, so that the touch screen can maintain high-quality display effects at various viewing angles and frequencies. The algorithm ensures that the size distribution of polygons in the generated random polygon grid pattern is uniform, avoiding the problem of local over-density or over-sparseness, and improving the overall aesthetics and practicality; the algorithm can ensure that the structural characteristics of each polygon meet the preset constraints, such as the vertex spacing and the angle between adjacent edges, thereby ensuring the stability and reliability of the grid pattern, and can quickly generate a random polygon grid pattern of a certain size, which is suitable for large-scale production and practical applications; through the edge matching algorithm and the vertex coordinate weighted averaging method, the secondary polygon cluster is seamlessly spliced with the current polygon cluster, ensuring the topological continuity of the grid pattern, performing curvature smoothing processing on the final polygon cluster, eliminating local sharp angles, and further improving the visual effect of the grid pattern and the durability of the touch screen.

[0052] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. An algorithm for generating irregular polygonal mesh patterns, characterized by: The generation algorithm includes the following steps: S1: Construct an initial polygon cluster in a two-dimensional coordinate system, where each polygon satisfies the vertex spacing constraint D low ≤d≤D upp and adjacent edge angle constraint A low ≤θ≤A upp ; S2: Extract the outer boundary polygon of the current polygon cluster as the growth base point; S3: Perform Poisson disk sampling on each growth base point to generate a secondary polygon cluster whose polygons satisfy the vertex spacing constraint D low 'k1 D low = and D upp '=k2 D upp , where 0.9≤k1<1, 1 <k2≤1.1; S4: Use edge matching algorithm to topologically join the secondary polygon cluster with the current polygon cluster, and geometrically fuse the polygons in the overlapping area by weighted averaging of vertex coordinates; S5: Use the fused polygon cluster as the new current cluster and repeat S2-S4 until the preset area size is reached; S6: Perform curvature smoothing on the final polygon cluster to eliminate local sharp corners.

2. The algorithm for generating a random polygonal grid pattern according to claim 1, wherein: The step S1 specifically includes, when generating a seed polygon at the origin, using random sampling to determine the vertex sequence in a clockwise direction, and verifying the Euclidean distance between the new vertex and the most recent historical vertex and the constraint value of the angle between adjacent edge vectors after each sampling.

3. The algorithm for generating a random polygonal grid pattern according to claim 1, wherein: Set the lower limit and upper limit of the distance between any points in each irregular polygon to be D low and D upp , the lower and upper limits of the angle between adjacent sides are A low and A upp , D low and D upp Satisfies the following relationship: D upp -D low ≥0.3*D low , and A low and A upp Satisfy A upp -A low ≥45°.

4. The algorithm for generating a random polygonal grid pattern according to claim 1, wherein: The exclusion radius R of the Poisson disk sampling satisfies: R=α*(D low +D upp ) / 2, where α∈[0.8,1.2].

5. The algorithm for generating a random polygonal grid pattern according to claim 1, wherein: The weighted average of vertex coordinates adopts an adaptive weight: w=1-exp(-Δd / σ), where Δd is the distance between vertices in the overlapping area and σ is a characteristic scale parameter.

6. The algorithm for generating a random polygonal grid pattern according to claim 1, wherein: The curvature smoothing process uses a geometric diffusion equation based on the Laplace-Beltrami operator: Where λ is the smoothing coefficient and Δ is the discrete Laplace operator.

7. The algorithm for generating a random polygonal grid pattern according to claim 1, wherein: The method of the generation algorithm is applied to a system for generating irregular polygonal mesh patterns, the generation system comprising a seed generation module configured to perform step S1 of any method of claims 1-6; The fractal extension module is configured to iteratively execute steps S2-S5; the constraint verification unit detects in real time whether the polygon vertex spacing and angles meet the set constraints; and the exception handling unit triggers local resampling when a constraint violation is detected.

8. The algorithm for generating a random polygonal grid pattern according to claim 7, wherein: The exception handling unit adopts the following constraint adjustment: when it is detected that the polygon density in the local area exceeds the threshold, D low and D upp Adjust to D low ”=βD low , D upp ”=βD upp , where β∈[1.05,1.2].