A quasi-regular pattern generation method based on k-uniform paving structure
Through the quasi-rule plot generation method based on k-uniform paved structure, the problem of monotony of spatial structure and difficult to control in the existing technology is solved, and the generation of digital art graphic with diversity and flexibility is realized to ensure the diversity of graphics and robustness.
Patent Information
- Application Number
- CN202210272611.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-18
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2042-03-18
AI Technical Summary
The existing digital art graphic generation methods have shortcomings in spatial structure and pattern style control, especially methods based on dynamic systems, Penrose paving and chaotic dynamics, and classification theory are difficult to generate rich and diverse spatial structures and flexible pattern patterns.
Using a quasi-rule plot generation method based on k-uniform paving structure, the construction of paving translation grid, mapping functions, invariant mapping and basic area iteration can realize the controllable generation of digital art graphics, ensuring the diversity and flexibility of graphics. sex.
It realizes the generation of a variety of global and local symmetrical figures, enriches the spatial structure, avoids seam problems, and the parameters can be adjusted at will, and the method is robust.
Smart Images

Figure CN114638913B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of computer graphics and digital art graphics generation, and in particular to a quasi-regular pattern generation method based on a k-uniform paving structure, which introduces the degree of freedom of spatial composition to generate a quasi-regular pattern based on a k-uniform paving structure, thereby realizing controllable generation of digital art graphics. Background Art
[0002] K-uniform paving is a periodic paving. Its characteristic is that all the paving contains regular polygons, including regular triangles, regular quadrilaterals, regular hexagons, regular octagons, and regular dodecagons. These polygons either share a vertex or an edge. There are 15 types of regular polygon combinations that can be combined to generate plane paving, such as Figure 2 The k in the k-uniform tiling represents that the tiling has k types of vertices.
[0003] Traditional digital art graphics generation methods include methods based on dynamic systems combined with chaos theory, methods combining Penrose paving with chaotic dynamics to generate digital art graphics, methods using fractal theory to generate fractal art graphics, and methods based on weak chaos theory to generate quasi-regular pattern graphics.
[0004] The method based on dynamical systems is based on the mathematical model of dynamical systems and constructs digital art graphics with specific symmetry through ordinary differential equations. This method can generate digital art graphics with several different symmetries, but it contains too few spatial structures and it is difficult to control the generated graphic pattern style.
[0005] A method for generating digital art graphics by combining Penrose paving and chaotic dynamics. This method combines digital art graphics generated by chaotic dynamics with Penrose paving by designing an invariant mapping to generate graphics with a Penrose paving spatial structure and no joints. However, this method can only adapt to this paving structure, and the means of controlling the transformation of graphic patterns are very limited. It is necessary to set the mapping function specifically to avoid the seam problem.
[0006] A method for generating fractal art graphics based on fractal theory, through which self-similar fractal graphics are generated through L system, DOL system, complex dynamic system, etc., but the spatial structure is monotonous and difficult to control.
[0007] Based on the ZZSUC mapping when the qth resonance condition is met, Hamiltonian transformation and smoothing processing are performed to derive a mathematical model, namely the mathematical model of the quasi-regular pattern. The digital art graphics generated thereby have certain translational and rotational symmetry, but their spatial structure is also too monotonous and the pattern is difficult to control. Summary of the invention
[0008] The present invention aims to address the deficiencies of the prior art and to propose a quasi-regular pattern generation method based on a k-uniform paving structure.
[0009] The object of the present invention is achieved through the following technical solution: a method for generating a quasi-regular pattern based on a k-uniform paving structure, the method comprising the following steps:
[0010] Step 1: Select a k-uniform paving form. After selecting, construct a paving translation grid, denoted as T. The paving translation grid is defined as follows: by translating the grid, the paving blocks of the k-uniform paving seamlessly cover the plane of the pattern to be generated; determine the polygonal paving blocks P contained in the paving translation grid T. n The type of n represents the number of edges of the polygonal paving block; the information contained in the paving translation grid T includes: 1) the translation vector (t1, t2) of the grid area on the plane; 2) all paving blocks P in the grid area n Vertex information of
[0011] The k in k-uniform tiling represents that the tiling has k types of vertices; since all edges of k-uniform tiling have the same length, the edges are normalized to unit length; the data structure for constructing the paved translation grid is represented as a (2+n)×4 integer matrix, which contains two translation vectors and the lattice coordinates of n seed vertices; the linear combination of translation vectors can cover the entire paved plane with the paved translation grid; the seed vertex is the basic unit of the data structure of the paved translation grid, which is the path expression from the origin to other points in the paved translation grid, and the translation vector is the path expression from the origin to the vertex of the paved translation grid. To generate the data structure of the paved translation grid, first select a vertex as the origin to normalize the paving position, and then select a set of normalized directions to normalize the paving direction;
[0012] The paved translation mesh is reconstructed according to the translation vector and seed vertex of the paved translation mesh, and its Cartesian coordinates need to be restored for final rendering.
[0013] Step 2: Construct a mapping function to translate the paving blocks P in the paving grid T nMap to the center position of the Cartesian coordinate system, the center of the paving block coincides with the origin of the coordinate system, and the paving block is straightened through rotation transformation to ensure that it always has an edge perpendicular to the x-axis; the mapping function refers to: through rigid body transformation, the paving block before the transformation and the paving block after the transformation are matched one by one in the form of a function; first, the paving block is moved to the origin of the coordinate system through translation according to its center coordinate; then, according to the number of edges of the paving block, the angle α between the origin and the vertex of the paving block after straightening is determined, and the angle β between the origin and the current vertex is calculated, and the difference between β and α is the angle required to rotate to straighten the polygon;
[0014] Step 3: Construct paving blocks P according to the paving block type of k-uniform paving n The basic area is denoted as U; the basic area is located in the paving block, and each paving block P n The basic area of the paving block is constructed according to the number of sides n, and P n The two vertices of an edge that intersects the positive semi-axis of the x-axis are n The two vertices are connected at the center, and the triangular area formed by the two vertices and the center of the paving block is the basic area, and the basic area is symmetrical about the x-axis;
[0015] Step 4: Construct an invariant mapping function to tile the polygon into blocks P n The other regions in the inner region are mapped to the basic region U; the invariant mapping function is a rigid body transformation, and its invariance is expressed as the mapped region and the basic region are congruent; its mapping method is included in the symmetry group of the paving, and the symmetry group is denoted as the finite cyclic group C n , the order of its generator is n, the finite cyclic group C n Produced by n rotations around a point;
[0016] Step 5: After the invariant mapping is completed, the points of the basic area U are substituted into the quasi-regular pattern model in the coordinate space according to the set image size for iteration. After the iteration is completed, the quasi-regular pattern iteration value is obtained, which is recorded as Determine the color value of the point in the basic area U according to the position of the value on the set color palette;
[0017] Step 6: Since the paving block P in step 4 n The other areas in the base area are mapped to the basic area U for iteration, so the color value of the point in the basic area U will be mapped back to P n The corresponding positions of the points in other areas within the grid are used to complete the coloring of the entire paved block; after the paved blocks in the entire paved translation grid T are colored, T is translated on the paved plane according to its translation vector (t1, t2), and finally the entire plane is paved to complete the drawing.
[0018] Furthermore, in step 1, the k-uniform paving is a periodic paving, which is characterized in that the paving blocks included in the paving are all regular polygons, including regular triangles, regular quadrilaterals, regular hexagons, regular octagons and regular dodecagons.
[0019] Furthermore, in step 1, due to the k-uniform paving, except for a special case of a paving structure composed of squares and octagons, all paving blocks are composed of triangles, squares, regular hexagons and dodecagons, so the angles between the sides are multiples of 30; the paving direction is normalized by aligning the edges with the 12 unit roots in the complex plane, that is,
[0020] Furthermore, in step 1, the translation vector and seed vertex are generated as follows:
[0021] 1) Establish an origin [0 0 0 0];
[0022] 2) The path of the seed vertex and the translation vector can be expressed by an integer polynomial of ω; let Z[ω] be the set of integer polynomials of ω, let {ω 0 ,ω 1 ,ω 2 ,ω 3} is a differential basis of Z[ω] on Z; then Z[ω]=Zω 0 +Zω 1 +Zω 2 +Zω 3 , so each vertex is uniquely represented by four integers [a0 a1 a2 a3], corresponding to the point a0ω 0 +a1ω 1 +a2ω 2 +a3ω 3 ∈Z[ω]; Since only the basic directions {ω 0 ,ω 1 ,ω 2 ,ω 3} appears in the path, and the other directions can be expressed by the identity of formula (1):
[0023]
[0024] Furthermore, in step 1, the paving translation mesh is reconstructed according to the translation vector and seed vertex of the paving translation mesh, and the specific steps for restoring its Cartesian coordinates during final rendering are as follows:
[0025] (1) Store the vertices in a hash table that uses the lattice coordinates of the vertices as indices; suppose a vertex v and the points w connected to it form a star data structure in which w is arranged cyclically around the vertex v, and vw is a paved edge. The star data structure facilitates traversal of the edges around the vertex; so w = v + ω k ; These edges can be represented by an ordered sequence of the indices of ω corresponding to these edges; through this structure, all seed vertices can be traversed and all edges in the paving can be reconstructed;
[0026] (2) An angle of a polygon consists of a vertex v and a pair of edges. The indices of ω corresponding to the two edges are denoted by k and k'. Let the number of edges of the polygon corresponding to the angle be m, then By traversing the adjacent edges k and k' around the point v, the polygons surrounding the vertex can be obtained according to the calculation formula; the sorting method is to sort the polygons surrounding the vertex v counterclockwise, and sort them from small to large according to the number of edges of the polygons; this step reconstructs the surface of the paving block; in order to avoid repeated reconstruction of the polygon, reconstruction is performed only when and only when the vertex is the lower left corner point of the face;
[0027] (3) The above reconstructions are all based on the lattice coordinates of the tiling. If the tiling needs to be rendered, the Cartesian coordinates of its vertices are required. Let e1, e1 be the plane R 2 The standard basis is as shown in formula (2):
[0028]
[0029] W = BE, so the Cartesian coordinates can be obtained as formula (3):
[0030]
[0031] Furthermore, in step 2, the inner point of the paving block is recorded as (P x ,P y ), the mapped point is (P′ x ,P′ y ), the mapping function is defined as formula (4)
[0032]
[0033] To ensure that the regular polygon P n It always has one side perpendicular to the x-axis, where θ is the minimum angle required to rotate, which is calculated as formula (5)
[0034]
[0035] Where V x With V yThe polygon obtained by formula (4) after translation falls on any vertex in the first and second quadrants; through the two-step mapping of formulas (4) and (5), the polygon is mapped to the center of the coordinate system and straightened. The regular polygon P n There is always one edge perpendicular to the x-axis.
[0036] Furthermore, the methods for constructing the basic area in step 3 are divided into the following two methods:
[0037] (a) With center paving block
[0038] First, select a paving block as the center paving block. Center Paving Blocks The geometric center is located at the origin of the coordinate system, and its basic area U is based on the origin of the coordinate system and It is constructed by an edge that intersects the positive semi-axis of the x-axis;
[0039] and Other tiles with different numbers of sides are called non-central tiles P. n ; Non-center paving block P n After translation, its geometric center is located on the positive half axis of the x-axis, and one of its sides is It coincides with an edge intersecting the positive semi-axis of the x-axis, and its basic area U is constructed according to its center and the coincident edge;
[0040] For selected center paving blocks Its center is located at the coordinate origin O; An edge that intersects the positive x-axis at point K The two vertices R and S are connected to the center O; the two triangular areas ΔORK and ΔOSK formed are the basic areas of the paving block;
[0041] For non-central paving blocks P n , whose center is denoted as O' n , translate from the origin to the positive x-axis so that the edge that originally intersects with the negative x-axis intersects Overlap, record the displacement distance as shown in formula (6)
[0042]
[0043] Among them, n1 is The number of edges of P n |S| is the side length of the paving block. In k-uniform paving, all paving blocks have the same side length. The ΔO' n RK、ΔO' n The two triangular areas of SK are the basic areas of the paving block; this step makes The basic area and Pn The basic areas are combined into continuous areas, and after the quasi-regular pattern model is iterated, there will be no seams between the two areas;
[0044] (b) No center paving block
[0045] Since all the paving blocks P in step 2 n are mapped to the center of the coordinate system, P n The center of P coincides with the coordinate origin O; n Translate toward the positive half axis of the x-axis so that P n An edge of It coincides with the y-axis and intersects the x-axis and the coordinate origin O; its displacement distance is shown in formula (7)
[0046]
[0047] Where n is P n |S| is the side length of the paving block. In k-uniform paving, all paving blocks have the same side length. After translation, P n The center point is denoted as O' n ;connect The ΔO' n RO, ΔO' n SO The two triangular areas are the paving blocks P n basic area.
[0048] Furthermore, in step 4, the method of mapping other areas of the paving block to the basic area by constructing an invariant mapping function includes the following two cases:
[0049] (1) With center paving block
[0050] For center paving blocks Let the number of edges be n1, and the composite transformation (R OR *R OO' ) is counterclockwise rotation around point O (R OR *R OO' ) is the finite cyclic group C of paving blocks n The mapping function can be constructed as in formula (8). The basic mapping method is to map the point (x0, y0) in the non-basic region to the basic region U in a rotationally symmetric way.
[0051]
[0052] For non-central paving blocks P n , composite transformation For around O' n Point rotates clockwise n is the number of sides of the polygon, C n The generator, the mapping function can be constructed as formula (9), the mapping method is the same as the central paving block method, but the direction is inconsistent;
[0053]
[0054] where γ(x0,y0) converts the point (x0,y0) in the non-basic region into n The generators in the basic area U are rotated to make them fall within the basic area U; the absolute value of y is taken to make the reflection symmetry about the x-axis in order to make P n The basic area within the P n There will be no seams between other areas within;
[0055] (2) No center paving block
[0056] For paving blocks P n , composite transformation For around O' n Point rotates clockwise n is the number of sides of the polygon, C n The generator of , the mapping function can be constructed as formula (10)
[0057]
[0058] where γ(x0,y0) converts the point (x0,y0) in the non-basic region into n The generators in the base region are made to fall within the base region by means of rotational symmetry.
[0059] Furthermore, the method of iterating and coloring the points in the basic area in step 5 is:
[0060] The quasi-regular pattern basic model is used for iteration. The quasi-regular pattern basic model is shown in formula (11):
[0061]
[0062] The iteration method is:
[0063] 1) Set the x-axis control parameter x min , y-axis control parameter y min and global size control parameter s; calculate x max =s*π+x min ,y max =s*π+y min ;
[0064] 2)W is the drawing interval, then
[0065] 3) For all points in the basic area U (U x ,U y ) Perform the following operations: First, let x = x min +U x *Δx,y=y min +U y *Δy; then the quasi-regular pattern iteration value is calculated according to the quasi-regular pattern basic model, which is recorded as according to The value of the basic area point (U x ,U y ) color; the coloring method is: pre-set the color palette, according to The position where it falls determines the color value; the color palette refers to a one-dimensional array with a length of the difference between the maximum and minimum values of the model and a height of 1, and the storage content is the color value; finally, the points in the basic area are iteratively colored and the drawing is completed.
[0066] Furthermore, the method of completing the coloring of the entire paved plane in step 6 is:
[0067] After all paving blocks of the paving translation grid T are colored, the entire paving plane is paved by using the translation information t1 and t2 in the two directions contained in the paving translation grid T; the formula for calculating the number of translations in the two directions is as shown in formula (12):
[0068]
[0069] Where scale is the image magnification factor, L x is the width of the paved surface display area, L y Displays the height of the area for the paved surface.
[0070] The main advantages of the present invention include: (a) the iterative quasi-regular pattern model and parameters can be adjusted at will without seam problems; (b) all paving structures under k-uniform paving are included; (c) for color adaptation schemes, the color scheme can be changed by only reading the set color palette; (d) the method has good robustness. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 A flowchart of a method for generating digital art graphics by combining k-uniform tiling with quasi-regular patterns in one embodiment of the present invention;
[0072] Figure 2 A summary graph of vertex types included in the k-uniform paving of the present invention;
[0073] Figure 3 is an example diagram of 12 unit roots in the complex plane of the present invention;
[0074] Figure 4 A method for generating seed vertices for k-uniform paving of the present invention;
[0075] Figure 5 The star-shaped structure used for constructing the paving translation grid of the present invention;
[0076] Figure 6 A schematic diagram of a paved translation grid as an input in one embodiment of the present invention;
[0077] Figure 7 is a schematic diagram of basic area construction within a paving block in one embodiment of the present invention;
[0078] Figure 8 A paved translation grid map after paving and coloring in one embodiment of the present invention;
[0079] Fig. 9 A schematic diagram of a paved plane after the color palette is changed in one embodiment of the present invention;
[0080] Fig.10 A schematic diagram of the change of iterative function model parameters in one embodiment of the present invention;
[0081] Fig.11 A schematic diagram of the change of an iterative function model in one embodiment of the present invention;
[0082] Fig.12 A schematic diagram of the entire paved plane being colored in accordance with an embodiment of the present invention;
[0083] Fig.13 The diagram is a schematic diagram showing paving structure lines on a paving plane in one embodiment of the present invention. DETAILED DESCRIPTION
[0084] In view of the shortcomings of the background technology, the purpose of the present invention is to provide a quasi-regular pattern generation method based on k-uniform paving structure. The method is applicable to any quasi-regular pattern model, so that it has any k-uniform paving spatial structure, which greatly enriches the spatial structure of quasi-regular pattern digital art graphics. At the same time, the method has high flexibility, and the model and parameters can be changed at will without any seam problems. Through this method, a variety of quasi-regular pattern digital art graphics with global symmetry, local symmetry and periodic structure can be generated.
[0085] The present invention will be further described below in conjunction with specific examples. It should be understood that these examples are only used to illustrate the present invention and are not intended to limit the scope of the present invention.
[0086] It should be noted that in the claims and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0087] All documents mentioned in the present invention are cited as references in this application, just as each document is cited as reference individually. In addition, it should be understood that after reading the above teachings of the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms also fall within the scope defined by the claims attached to this application.
[0088] The first embodiment of the present invention relates to a method for generating a quasi-regular pattern based on a k-uniform paving structure, which has great flexibility and rich effects and is robust.
[0089] Figure 1 1 is a flow chart of a method for generating a quasi-regular pattern based on a k-uniform paving structure in one embodiment of the present invention. The method comprises the following steps:
[0090] Step 101, input the selected k-uniform paving and construct the paving translation grid; k-uniform paving is a periodic paving, which is characterized by the fact that the paving blocks are all regular polygons, including regular triangles, regular quadrilaterals, regular hexagons, regular octagons, and regular dodecagons. These polygons either share a vertex or an edge, and there are 15 types of regular polygon combinations that can be combined to generate plane paving such as Figure 2 shown.
[0091] Step 102, construct a mapping function to map all paving blocks to the coordinate origin and align them;
[0092] Step 103, constructing the basic area of each paving block;
[0093] Step 104, constructing an invariant mapping to map other areas of the paving block to the basic area;
[0094] Step 105, iterating the points in the basic area and setting the color according to the result;
[0095] Step 106, mapping the color value back to the original position to complete the paving plane drawing.
[0096] Specifically, in one embodiment, the method for generating a quasi-regular pattern based on a k-uniform paving structure comprises the following steps:
[0097] Step 1: The selected k-uniform is laid out as Figure 6 As shown, the GLM type is selected, which contains three types of vertices, so it is a 3-uniform tiling. The data structure representation of constructing the tiling translation grid T is a (2+10)×4 integer matrix, which contains two translation vectors and the lattice coordinates of n seed vertices. The linear combination of translation vectors can cover the entire tiling plane with the tiling translation grid. The seed vertices are used to construct the tiling translation grid. To generate the data structure: first select a vertex as the origin to normalize the tiling position, and then select a set of normalized directions to normalize the tiling direction. Since all tiling blocks of k-uniform tiling are composed of triangles, squares, regular hexagons and dodecagons, the angles between the edges are all multiples of 30. The tiling direction is normalized by aligning the edges with the 12 roots of unity in the complex plane, that is, like Figure 3 The data structure of the paved translation grid T is shown in formula (1):
[0098]
[0099] It contains two translation vectors and the lattice coordinates of 10 seed vertices. The paving translation grid is constructed through this matrix to determine the paving blocks P contained in the paving translation grid. n The type of n represents the number of edges of the polygonal paving block. The paving translation grid T contains polygons P3, P4, P 12 , contains the following information: 1) the translation vector t1, t2 of the translation grid on the plane; 2) the paving block P in the area n Vertex information and center vertex information.
[0100] See the example diagram of the generation method Figure 4 , the generation method of k-uniform tiling seed vertices, the lattice coordinates of point A are [0 0 00], and the path from point A to point B is ω 2 +ω 1 +ω 0, the lattice coordinates of point B are [1 1 1 0]. After obtaining the translation vector and seed vertex of the paved translation grid T, the paved translation grid is reconstructed, and its Cartesian coordinates are restored based on this information during rendering. The restoration steps are as follows:
[0101] (1) Store the vertices in a hash table that uses the lattice coordinates of the vertices as indices. Suppose a vertex v and the points w connected to it form a star-shaped data structure in which w is arranged cyclically around the vertex v, and vw is a paved edge. This star-shaped structure facilitates the system to traverse the edges around the vertex. Each edge of the "v star" is aligned with the basic direction ω k Aligned, so w=v+ω k These edges can be represented by an ordered sequence of the indices of ω corresponding to these edges, such as Figure 5 The structure can be represented as (0,3,6,8,10). Through this structure, all seed vertices of the GLM type can be traversed to reconstruct all edges in the paving.
[0102] (2) An angle of a polygon consists of a vertex v and a pair of edges. The indices of ω corresponding to the two edges are denoted by k and k'. Let the number of edges of the polygon corresponding to the angle be m, then By traversing the adjacent edges k and k' around point v, the polygons surrounding the vertex can be obtained according to the calculation formula. The sorting method is to sort the polygons around vertex v counterclockwise, and sort them from small to large according to the number of edges of the polygon, such as Figure 5 The list of polygons around vertex v can be represented as (3,3,3,4,4). Based on this method, the face of the paving block can be reconstructed. The GLM type seed vertices are traversed again. In order to avoid repeated reconstruction of polygons, reconstruction is performed only when the vertex is the bottom left corner of the face.
[0103] (3) The above reconstructions are all based on the lattice coordinates of the tiling. If the tiling needs to be rendered, the Cartesian coordinates of its vertices are required. Let e1, e1 be the plane R 2 The standard basis is as shown in formula (2):
[0104]
[0105] W = BE, and the GLM type seed point is substituted into formula (3) to obtain its Cartesian coordinates
[0106]
[0107] Step 2: Construct a mapping function to map the paving blocks of the paving translation grid to the coordinate origin and align them. First, translate the center coordinates of the paving blocks to the coordinate origin, and then calculate the rotation angle to rotate them to align the paving blocks.
[0108] The inner point of the paving block is (P x ,P y ), the mapped point is (P′ x ,P′ y ), the mapping function is defined as formula (4)
[0109]
[0110] Where θ is the angle of rotation required to straighten the polygon. GLM type paving has three types of paving blocks: P3, P4, P 12 , so substitute n=3, n=4, n=12 into formula (5) to calculate the corresponding rotation angle θ
[0111]
[0112] Where V x With V y The translated polygon obtained by formula (1) falls on any vertex on the positive half axis of the y-axis. Through this mapping, the polygon is mapped to the origin and straightened.
[0113] Step three, constructing the basic area of each paving block according to the type of paving blocks of this type, and the basic area of each paving block is constructed according to the number of its sides.
[0114] In this example, a square is selected as the central paving block. For the selected central paving block, its center is located at the coordinate origin O; the two vertices R and S of an edge of the paving block intersecting the positive semi-axis of the x-axis at point K are connected to the center O. The two triangular areas ΔORK and ΔOSK formed are the basic areas of the paving block.
[0115] For non-central paving blocks, the center point is recorded as O' n The non-center paving blocks in this example are P4, P 12 , so n = 3 or n = 12. The edge that originally intersects with the negative half axis of the x-axis is translated from the origin to the positive half axis of the x-axis. coincidence, and the displacement distance is calculated as formula (6)
[0116]
[0117] |S| is the side length of the paving block. In k-uniform paving, all paving blocks have the same side length. The ΔO' n RK、ΔO' n The two triangular areas SK are the basic areas of the paving block. Figure 7 As shown, the k-uniform tiling GLM type basic region construction: Figure 7 (a) The central paving block is a square; Figure 7 (b) There is no central tiling block. The basic area is represented by the symbol U. The purpose of this step is to combine the basic area of the non-central tiling block with the basic area of the central tiling block into a continuous area, so that there will be no seam between the two areas after the function iteration.
[0118] Step 4: Map the other regions of the paving block to the basic region by constructing an invariant mapping function. Since the symmetries of the basic regions in the paving are congruent transformations, the symmetry group of the paving includes all its symmetries.
[0119] Note the finite cyclic group C n , where the order of the generator is n, C n It is generated by performing n rotations around a point. The finite cyclic groups of GLM type paving include C3, C4, C 12 For the central tile square, the number of sides is 4, so the composite transformation (R OR *R OO' ) is counterclockwise rotation around point O (R OR *R OO' ) is the generator of C4, and the mapping function can be constructed as formula (7)
[0120]
[0121] For non-central tiles, the composite transformation For around O' n Point rotates clockwise (R O'R *R O'O ) is C n The generator n = 3 or n = 12, the mapping function can be constructed as formula (8)
[0122]
[0123] Among them, γ(x0,y0) uses the cyclic group C to convert the points in the non-basic area into n The generators in the basic area U are rotated to make them fall within the basic area U. The absolute value of y is taken to perform reflection symmetry about the x-axis in order to perform the iteration of the quasi-regular pattern model. n The basic area within the P n There will be no seams between other areas within.
[0124] Step 5: After the mapping is completed, the points in the basic area are iterated, and the points are brought into the iterative function quasi-regular pattern model, and the color value of the points in the basic area is set by the value.
[0125] The quasi-regular pattern basic model is used for iteration. The quasi-regular pattern basic model is shown in formula (9):
[0126]
[0127] The iteration method is:
[0128] 1) Select the parameter to control the drawing range x min ,y min ,s; while calculating x max =s*π+x min ,y max =s*π+y min ;
[0129] 2)W is the drawing interval, then
[0130] 3) For each point (U x ,U y ) to perform the following operations: First, let x = x min +U x *Δx,y=y min +U y *Δy; then calculate according to the quasi-regular pattern basic model according to The value of the basic area point (U x ,U y ) color. The drawing is completed after the points in the basic area are colored. The coloring method is: pre-set the color palette, according to The location where the point falls determines the color value. Finally, the drawing is completed after iterative coloring of the points in the basic area. Figure 8 Tiles of a tiling translation grid drawn using the basic model with default parameters. Fig. 9 The parameters are q = 0, s = 8, x min =0,y min = 0, the k-uniform tiling GLM type changes, and the tiling plane is drawn after changing the color palette.
[0131] The characteristic of this method is that the graphic transformation can be controlled by changing the parameters: for example, changing the parameter q, the drawing range parameter x min ,y min ,s and other methods to change the k-uniform paving GLM type quasi-regular pattern, the effect is visible Fig.10 , the corresponding parameters are: q = 2.5, s = 6, x min =2.5,y min =0,. Graphic transformation can also be achieved by modifying the quasi-regular pattern model, such as changing the function expression of the quasi-regular pattern model, or applying a composite function to the function, taking derivatives of the function, and the like. Fig.11 The corresponding quasi-regular pattern function model is: The parameters are: q = 5, s = 8, x min =0,y min =0. It can be seen that these transformations will not cause joints between paving blocks and greatly increase the variation of graphics.
[0132] Step 6: In step 5, the coloring of the basic area is completed. Since the paving block P in step 4 n The other areas in the base area are mapped to the basic area U for iteration, so the color value of the point in the basic area U will be mapped back to P n The corresponding positions of the points in other areas of the paving grid are used to complete the coloring of the entire paving block. After all the paving blocks of the paving translation grid T are colored, the entire paving plane is paved by using the translation information t1 and t2 in two directions contained in the paving translation grid.
[0133] In order to avoid too many displacements, it is necessary to calculate the minimum number of translations required in each direction. The formula for calculating the number of translations in two directions is as shown in formula (10), where scale is the image magnification factor, L x is the width of the paved surface display area, L y Display the height of the area for the paved plane:
[0134]
[0135] Fig.12 The default parameters of the k-uniform paving GLM type are the basic model paving plot, with parameters: q = 5, s = 8, X min =0, Y min =0,. Fig.13 Tiling structure of type GLM for k-uniform tiling.
[0136] It should be noted that in the claims and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0137] While the present invention has been shown and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention.
Claims
1. A quasi-regular pattern generation method based on k-uniform paving structure, It is characterized in that The method comprises the following steps: Step 1: Select a k-uniform paving form and construct a paving translation grid, denoted as T; the paving translation grid is defined as follows: by translating the grid, the paving blocks of the k-uniform paving seamlessly cover the plane to be generated; determine the polygonal paving blocks P contained in the paving translation grid T n The type of n represents the number of edges of the polygonal paving block; the information contained in the paving translation grid T includes: 1) the translation vector (t 1 ,t 2 );2) All paving blocks P in the grid area n Vertex information of The k in k-uniform paving represents that the paving has k types of vertices. Since all edges of k-uniform paving have the same length, the edges are normalized to unit length. The data structure for constructing the paving translation grid is represented as a (2+n)×4 integer matrix, which contains two translation vectors and the lattice coordinates of n seed vertices. The linear combination of translation vectors can cover the entire paving plane with the paving translation grid. The seed vertex is the basic unit of the data structure of the paving translation grid, which is the path expression from the origin to other points in the paving translation grid, and the translation vector is the path expression from the origin to the vertex of the paving translation grid. To generate the data structure of the paving translation grid, first select a vertex as the origin to normalize the paving position, and then select a set of normalized directions to normalize the paving direction. Reconstruct the paving translation mesh according to its translation vector and seed vertex, and finally restore its Cartesian coordinates for rendering; Step 2: Construct a mapping function to translate the paving blocks P in the paving grid T n Map to the center position of the Cartesian coordinate system so that the center of the paving block coincides with the origin of the coordinate system, and straighten the paving block through rotation transformation to ensure that it always has an edge perpendicular to the x-axis; the mapping function refers to: through rigid body transformation, the paving block before the transformation and the paving block after the transformation are matched one by one in the form of a function; first, the paving block is translated to the origin of the coordinate system according to its center coordinate; then, according to the number of edges of the paving block, the angle α between the origin and the vertex of the paving block after straightening is determined, and the angle β between the origin and the current vertex is calculated, and the difference between β and α is the angle required to rotate to straighten the polygon; Step 3: Construct paving blocks P according to the paving block type of k-uniform paving n The basic area is denoted as U; the basic area is located in the paving block, and each paving block P n The basic area of the paving block is constructed according to the number of sides n, and P n The two vertices of an edge that intersects the positive semi-axis of the x-axis are n The two vertices are connected at the center, and the triangular area formed by the two vertices and the center of the paving block is the basic area, and the basic area is symmetrical about the x-axis; Step 4: Construct an invariant mapping function to tile the polygon into blocks P n The other regions in the inner region are mapped to the basic region U; the invariant mapping function is a rigid body transformation, and its invariance is expressed as the mapped region and the basic region are congruent; its mapping method is included in the symmetry group of the paving, and the symmetry group is denoted as the finite cyclic group C n , the order of its generator is n, the finite cyclic group C n Produced by n rotations around a point; Step 5: After the invariant mapping is completed, the points of the basic area U are substituted into the quasi-regular pattern model in the coordinate space according to the set image size for iteration. After the iteration is completed, the quasi-regular pattern iteration value is obtained, which is recorded as Determine the color value of the point in the basic area U according to the position of the value on the set color palette; Step 6: Since the paving block P in step 4 n The other areas in the basic area are mapped to the basic area U for iteration, so the color value of the point in the basic area U will be mapped back to P n After the paving blocks in the entire paving translation grid T are colored, T is transformed according to its translation vector (t 1 ,t 2 ) moves horizontally on the paving plane, eventually covering the entire plane and completing the drawing.
2. The method for generating a quasi-regular pattern based on a k-uniform paving structure according to claim 1, It is characterized in that In step 1, the k-uniform paving is a periodic paving, which is characterized in that the paving blocks are all regular polygons, including regular triangles, regular quadrilaterals, regular hexagons, regular octagons and regular dodecagons.
3. The method for generating a quasi-regular pattern based on a k-uniform paving structure according to claim 1, It is characterized in that In step 1, due to the k-uniform paving, except for a special case of a paving structure composed of squares and octagons, all paving blocks are composed of triangles, squares, regular hexagons and dodecagons, so the angles between the sides are multiples of 30; the paving direction is normalized by aligning the edges with the 12 unit roots in the complex plane, that is, 4. The method for generating a quasi-regular pattern based on a k-uniform paving structure according to claim 1, It is characterized in that In step 1, the translation vector and seed vertex are generated as follows: 1) Establish an origin [0 0 0 0]; 2) The path of the seed vertex and the translation vector can be expressed by an integer polynomial of ω; let Z[ω] be the set of integer polynomials of ω, let {ω 0 ,ω 1 ,ω 2 ,ω 3 } is a differential basis of Z[ω] on Z; then Z[ω]=Zω 0 +Zω 1 +Zω 2 +Zω 3 , so each vertex consists of four integers [a 0 a 1 a 2 a 3 ] uniquely represents point a 0 ω 0 +a 1 ω 1 +a 2 ω 2 +a 3 ω 3 ∈Z[ω]; Since only the basic directions {ω 0 ,ω 1 ,ω 2 ,ω 3 } appears in the path, and the other directions can be expressed by the identity of formula (1):
5. The method for generating a quasi-regular pattern based on a k-uniform paving structure according to claim 1, It is characterized in that In step 1, the paving translation mesh is reconstructed according to the translation vector and seed vertex of the paving translation mesh. The specific steps to restore its Cartesian coordinates for rendering are as follows: (1) Store the vertices in a hash table that uses the lattice coordinates of the vertices as indices; suppose a vertex v and the points w connected to it form a star data structure in which w is arranged cyclically around the vertex v, and vw is a paved edge. The star data structure facilitates traversal of the edges around the vertex; so w = v + ω k ; These edges can be represented by an ordered sequence of the indices of ω corresponding to these edges; through this structure, all seed vertices can be traversed and all edges in the paving can be reconstructed; (2) An angle of a polygon consists of a vertex v and a pair of edges. The indices of ω corresponding to the two edges are denoted by k and k'. Let the number of edges of the polygon corresponding to the angle be m, then By traversing the adjacent edges k and k' around the point v, the polygons surrounding the vertex can be obtained according to the calculation formula; the sorting method is to sort the polygons surrounding the vertex v counterclockwise, and sort them from small to large according to the number of edges of the polygons; this step reconstructs the surface of the paving block; in order to avoid repeated reconstruction of the polygon, reconstruction is performed only when and only when the vertex is the lower left corner point of the face; (3) The above reconstructions are all based on the lattice coordinates of the tiles. If the tiles need to be rendered, the Cartesian coordinates of their vertices are required. Let e 1 , e 1 For plane R 2 The standard basis is as shown in formula (2): W = BE, so the Cartesian coordinates can be obtained as formula (3):
6. The method for generating a quasi-regular pattern based on a k-uniform paving structure according to claim 1, It is characterized in that In the step 2, the inner point of the paving block is recorded as (P x ,P y ), the mapped point is (P′ x ,P′ y ), the mapping function is defined as formula (4) To ensure that the regular polygon P n It always has one side perpendicular to the x-axis, where θ is the minimum angle required to rotate, which is calculated as formula (5) Where V x With V y The polygon obtained by formula (4) after translation falls on any vertex in the first and second quadrants; through the two-step mapping of formulas (4) and (5), the polygon is mapped to the center of the coordinate system and straightened. The regular polygon P n There is always one edge perpendicular to the x-axis.
7. The method for generating a quasi-regular pattern based on a k-uniform paving structure according to claim 1, It is characterized in that The methods for constructing the basic area in step 3 are divided into the following two methods: (a) With center paving block First, select a paving block as the center paving block. Center Paving Blocks The geometric center is located at the origin of the coordinate system, and its basic area U is based on the origin of the coordinate system and It is constructed by an edge that intersects the positive semi-axis of the x-axis; and Other tiles with different numbers of sides are called non-central tiles P. n ; Non-center paving block P n After translation, its geometric center is located on the positive half axis of the x-axis, and one of its sides is It coincides with an edge intersecting the positive semi-axis of the x-axis, and its basic area U is constructed according to its center and the coincident edge; For selected center paving blocks Its center is located at the coordinate origin O; An edge that intersects the positive x-axis at point K The two vertices R and S are connected to the center O; the two triangular areas ΔORK and ΔOSK formed are the basic areas of the paving block; For non-central paving blocks P n , whose center is denoted as O′ n , translate from the origin to the positive x-axis so that the edge that originally intersects with the negative x-axis intersects Overlap, record the displacement distance as shown in formula (6) Among them, n 1 for The number of edges of P n |S| is the side length of the paving block. In k-uniform paving, all paving blocks have the same side length. The ΔO′ n RK, ΔO′ n The two triangular areas of SK are the basic areas of the paving block; this step makes The basic area and P n The basic areas are combined into continuous areas, and after the quasi-regular pattern model is iterated, there will be no seams between the two areas; (b) No center paving block Since all the paving blocks P in step 2 n are mapped to the center of the coordinate system, P n The center of P coincides with the coordinate origin O; n Translate toward the positive half axis of the x-axis so that P n An edge of It coincides with the y-axis and intersects the x-axis and the coordinate origin O; its displacement distance is shown in formula (7) Where n is P n |S| is the side length of the paving block. In k-uniform paving, all paving blocks have the same side length. After translation, P n The center point is denoted as O′ n ;connect The ΔO′ n RO, ΔO′ n SO The two triangular areas are the paving blocks P n basic area.
8. The method for generating a quasi-regular pattern based on a k-uniform paving structure according to claim 7, It is characterized in that In step 4, the method of mapping other areas of the paving block to the basic area by constructing an invariant mapping function includes the following two cases: (1) With center paving block For center paving blocks Let the number of edges be n. 1 , composite transformation (R OR *R OO' ) is counterclockwise rotation around point O (R OR *R OO' ) is the finite cyclic group C of paving blocks n The mapping function can be constructed as shown in formula (8); the basic way of mapping is: transform the point (x 0 ,y 0 ) is congruently mapped to the basic area U by rotational symmetry For non-central paving blocks P n , composite transformation To go around O' n Point rotates clockwise n is the number of sides of the polygon, C n The generator, the mapping function can be constructed as formula (9), the mapping method is the same as the central paving block method, but the direction is inconsistent; where γ(x 0 ,y 0 ) will be the point in the non-basic area (x 0 ,y 0 ), by using the cyclic group C n The generators in the basic area U are rotated to make them fall within the basic area U; the absolute value of y is taken to make reflection symmetry about the x-axis in order to make P n The basic area within the P n There will be no seams between other areas within; (2) No center paving block For paving blocks P n , composite transformation To go around O' n Point rotates clockwise n is the number of sides of the polygon, C n The generator of , the mapping function can be constructed as formula (10) where γ(x 0 ,y 0 ) will be the point in the non-basic area (x 0 ,y 0 ), by using the cyclic group C n The generators in the base region are made to fall within the base region by means of rotational symmetry.
9. The method for generating a quasi-regular pattern based on a k-uniform paving structure according to claim 1, It is characterized in that The method of iterating and coloring the points in the basic area in step 5 is: The quasi-regular pattern basic model is used for iteration. The quasi-regular pattern basic model is shown in formula (11): The iteration method is: 1) Set the x-axis control parameter x min , y-axis control parameter y min and global size control parameter s; calculate x max =s*π+x min ,y max =s*π+y min ; 2)W is the drawing interval, then 3) For any point (U x ,U y ) to perform the following operations: First, let x = x min +U x *Δx,y=y min +U y *Δy; then the quasi-regular pattern iteration value is calculated according to the quasi-regular pattern basic model, which is recorded as according to The value of the basic area point (U x ,U y ) color; the coloring method is: pre-set the color palette, according to The position where it falls determines the color value; the color palette refers to a one-dimensional array with a length of the difference between the maximum and minimum values of the model and a height of 1, and the storage content is the color value; finally, the points in the basic area are iteratively colored and the drawing is completed.
10. The method for generating a quasi-regular pattern based on a k-uniform paving structure according to claim 1, It is characterized in that The method of completing the entire paving plane coloring in step 6 is: After all tiles of the tiled translation grid T are colored, the translation information t in both directions contained in the tiled translation grid T is used. 1 ,t 2 Complete the paving of the entire paved surface; the formula for calculating the number of translations in two directions is as shown in formula (12) Where scale is the image magnification factor, L x is the width of the paved surface display area, L y Displays the height of the area for the paved surface.
