Method for generating grid pattern based on two-dimensional lattice
By establishing a two-dimensional dot matrix on the object to be drawn and filtering the dot matrix to obtain rectangular vertices, forming a grid pattern, the problem of single functions and inability to take into account multiple graphic types in the prior art is solved, and gap-free filling and specified change rules for multiple graphic types are achieved.
Patent Information
- Application Number
- CN202111199707.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-14
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2041-10-14
AI Technical Summary
The prior art has problems such as single functions, inability to take into account multiple graphic types, gaps or intersections, inability to generate three-dimensional spatial grids, and inability to achieve the effects of specified variation patterns when generating grid patterns.
By establishing a two-dimensional dot matrix on the object to be drawn and combining the vertex characteristics of the rectangle pattern, filtering the dot matrix to obtain the vertices of each rectangle, thereby forming a grid pattern. This method can generate various graphic types such as rectangles, diamonds, triangles and hexagons, and achieve gap-free filling and specified change patterns through expansion and deletion operations.
The problem of single function of the pattern generation method in the prior art has been overcome, gapless overflow of various graphic types has been achieved, and the application scope of the pattern drawing method has been expanded.
Smart Images

Figure CN114119915B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of drawing of spatial graphics, and particularly relates to a method for generating a grid pattern based on a two-dimensional lattice. Background Art
[0002] After entering the 21st century, with the progress of design means and technological capabilities, and through the efforts of architects such as Zaha Hadid, parametric design has emerged in large numbers in the architecture industry. This design method usually divides the facade of a building regularly through a certain computer algorithm, and automatically generates complex and orderly patterns by the computer, making the appearance of the building present a more rich and interesting sensory effect without changing the basic form of the building. After 2015, this trend has gradually spread to industries such as home appliances, automobiles, games, clothing, and printing.
[0003] Parametric design can not only bring a more shocking visual impact to the audience, but also has other advantages: First, since the pattern is automatically generated by the computer through an algorithm, it changes the previous work process of manual design by designers, and can save a large amount of manpower. Generally, it is considered that the work efficiency can be increased by more than ten times; Second, since the pattern can be modified and updated by modifying parameters, the result can be continuously iterated and optimized, making the result more reasonable; Third, by adjusting parameters, some possibilities that are basically impossible to design manually can also be discovered, making the design more diverse.
[0004] In nature, there are only four single graphics that can cover a canvas without gaps, namely triangles, rectangles, rhombuses, and hexagons. Due to this property, these four graphics and their derivative graphics are extremely common as basic elements in parametric design. Related algorithms have also emerged in an endless stream.
[0005] However, these algorithms usually may have one or more of the following problems: 1. A certain set of algorithms can only use one of the triangles, rectangles, rhombuses, and hexagons as the basic element, and cannot take into account all four graphics; 2. There are gaps or intersections between the generated elements, and seamless coverage cannot be achieved; 3. The generated grid pattern cannot change conformally according to the contour of the specified area; 4. Only planar grid patterns can be generated, and grid patterns in three-dimensional space cannot be generated; 5. The generated grid pattern cannot achieve effects such as random, gradually increasing, gradually decreasing, or other specified variation rules; 6. Adding gaps in the elements cannot be achieved. Summary of the Invention
[0006] The purpose of the embodiment of the present invention is to provide a method for generating a grid pattern based on a two-dimensional lattice, which can overcome the technical problem of the single function of the pattern generation method in the prior art.
[0007] To achieve the above object, an embodiment of the present invention provides a method for generating a grid pattern based on a two-dimensional lattice, including:
[0008] Forming a virtual quadrilateral canvas based on the object to be drawn;
[0009] Taking a vertex of the quadrilateral canvas as the origin, establishing a two-dimensional coordinate system on the quadrilateral canvas to form a two-dimensional lattice;
[0010] Determining the type of the graph to be drawn currently;
[0011] When the type of the image to be drawn currently is a rectangle, deleting the last row and the last column of the two-dimensional lattice to obtain a first array including the upper left corner point of the two-dimensional lattice;
[0012] Deleting the last row and the first column of the two-dimensional lattice to obtain a second array including the upper right corner point of the two-dimensional lattice;
[0013] Deleting the first row and the first column of the two-dimensional lattice to obtain a third array including the lower right corner point of the two-dimensional lattice;
[0014] Deleting the first row and the last column of the two-dimensional lattice to obtain a fourth array including the lower left corner point of the two-dimensional lattice;
[0015] Combining the first array, the second array, the third array, and the fourth array according to the one-to-one correspondence of the row and column numbers to form a rectangular array;
[0016] Connecting adjacent points in each element of the rectangular array to obtain the grid pattern.
[0017] Optionally, the grid pattern generation method further includes:
[0018] When the type of the image to be drawn currently is a rhombus, for one of the odd rows and the even rows of the two-dimensional lattice, selecting points with odd numbers, and for the other of the odd rows and the even rows of the two-dimensional lattice, selecting points with even numbers to form a rhombus center array;
[0019] Performing a rhombus expansion operation on the two-dimensional lattice to obtain a rhombus-expanded two-dimensional lattice;
[0020] Taking each point in the rhombus center array as the center, selecting adjacent points in the corresponding upper, lower, left, and right directions in the rhombus-expanded two-dimensional lattice to form corresponding elements;
[0021] Combining each element to form a rhombus array;
[0022] Connect adjacent points within each element of the rhombus array in the two-dimensional lattice to obtain the grid pattern;
[0023] Among them, the rhombus expansion operation includes:
[0024] Add a row in front of the first row of the two-dimensional lattice;
[0025] Add a column in front of the first column of the two-dimensional lattice;
[0026] Add a row behind the last row of the two-dimensional lattice;
[0027] Add a column behind the last column of the two-dimensional lattice.
[0028] Optionally, the grid pattern generation method further includes:
[0029] When the image type to be drawn currently is a rhombus, for one of the odd rows and even rows of the two-dimensional lattice, select the points with odd serial numbers, and for the other of the odd rows and even rows of the two-dimensional lattice, select the points with even serial numbers to form a rhombus center array;
[0030] Delete the points located at the edge of the two-dimensional lattice in the rhombus center array;
[0031] Taking each point in the rhombus center array as the center, select the adjacent points in the corresponding up, down, left, and right directions in the two-dimensional lattice to form the corresponding elements;
[0032] Combine each element to form a rhombus array;
[0033] Connect adjacent points within each element of the rhombus array in the two-dimensional lattice to obtain the grid pattern.
[0034] Optionally, the grid pattern generation method further includes:
[0035] When the image type to be drawn currently is a triangle, for one of the odd rows and even rows of the two-dimensional lattice, select the points with odd serial numbers, and for the other of the odd rows and even rows of the two-dimensional lattice, select the points with even serial numbers to form a triangle center array;
[0036] Perform a triangle expansion operation on the two-dimensional lattice to obtain a triangle-expanded two-dimensional lattice;
[0037] Taking each point in the triangle center array as the center, select the adjacent points in the corresponding up, down, left, and right directions in the triangle-expanded two-dimensional lattice to form the corresponding elements;
[0038] Combine each element to form a triangle array;
[0039] Connect non - adjacent points within each element of the triangular array in the two - dimensional lattice to obtain the grid pattern;
[0040] Wherein, the triangular expansion operation includes:
[0041] Add a row in front of the first row of the two - dimensional lattice;
[0042] Add a column in front of the first column of the two - dimensional lattice;
[0043] Add a row behind the last row of the two - dimensional lattice;
[0044] Add a column behind the last column of the two - dimensional lattice.
[0045] Optionally, the grid pattern generation method further includes:
[0046] When the current image type to be drawn is a triangle, for one of the odd - numbered rows and even - numbered rows in the two - dimensional lattice, select points with odd serial numbers, and for the other of the odd - numbered rows and even - numbered rows in the two - dimensional lattice, select points with even serial numbers to form a triangular center array;
[0047] Delete the points located at the edge of the two - dimensional lattice in the triangular center array;
[0048] Taking each point in the triangular center array as the center, select the adjacent points in the upper, lower, left, and right directions corresponding to it in the two - dimensional lattice to form corresponding elements;
[0049] Combine each element to form a triangular array;
[0050] Connect non - adjacent points within each element of the triangular array in the two - dimensional lattice to obtain the grid pattern.
[0051] Optionally, the grid pattern generation method further includes:
[0052] When the current image type to be drawn is a hexagon, for one of the odd - numbered rows and even - numbered rows in the two - dimensional lattice, select points with serial numbers 6n + d, and for the other of the odd - numbered rows and even - numbered rows in the two - dimensional lattice, select points with serial numbers 6n + d+3 to form a hexagonal center array, where n is an integer between 0 and m, m is the length of the abscissa of the two - dimensional lattice, and d = 0, 1, or 2;
[0053] Perform a hexagonal expansion operation on the two - dimensional lattice to obtain a hexagonal - expanded two - dimensional lattice;
[0054] With each point in the hexagonal center array as the center, select adjacent points in the hexagonal extended two-dimensional lattice to form corresponding elements;
[0055] Combine each element to form a hexagonal array;
[0056] Connect adjacent points within each element of the hexagonal array in the two-dimensional lattice to obtain the grid pattern.
[0057] Optionally, the grid pattern generation method further includes:
[0058] When the type of the image to be drawn currently is hexagonal, for one of the odd rows and even rows of the two-dimensional lattice, select points with serial numbers 6n + d, and for the other of the odd rows and even rows of the two-dimensional lattice, select points with serial numbers 6n + d + 3 to form a hexagonal center array, where n is an integer between 0 and m, m is the length of the abscissa of the two-dimensional lattice, and d = 0, 1, or 2;
[0059] Delete the points located at the edges in the hexagonal center array;
[0060] With each point in the deleted hexagonal center array as the center, select adjacent points in the hexagonal center array before deletion to form corresponding elements;
[0061] Combine each element to form a hexagonal array;
[0062] Connect adjacent points within each element of the hexagonal array in the two-dimensional lattice to obtain the grid pattern.
[0063] Optionally, the grid pattern generation method further includes:
[0064] When the type of the image to be drawn currently is hexagonal, perform a transpose operation on the two-dimensional lattice. For one of the odd rows and even rows of the two-dimensional lattice, select points with serial numbers 6n + d, and for the other of the odd rows and even rows of the two-dimensional lattice, select points with serial numbers 6n + d + 3 to form a hexagonal center array, where n is an integer between 0 and m, m is the length of the abscissa of the two-dimensional lattice, and d = 0, 1, or 2;
[0065] Perform a hexagonal extension operation on the two-dimensional lattice to obtain a hexagonal extended two-dimensional lattice;
[0066] With each point in the hexagonal center array as the center, select adjacent points in the hexagonal extended two-dimensional lattice to form corresponding elements;
[0067] Combine each element to form a hexagonal array;
[0068] Connect adjacent points within each element of the hexagonal array in the two-dimensional lattice to obtain the grid pattern.
[0069] Optionally, the grid pattern generation method further includes:
[0070] When the type of the image to be drawn currently is a hexagon, perform a transpose operation on the two-dimensional lattice. For one of the odd rows and even rows of the two-dimensional lattice, select points with serial numbers 6n + d, and for the other of the odd rows and even rows of the two-dimensional lattice, select points with serial numbers 6n + d + 3 to form a hexagonal center array, where n is an integer between 0 and m, m is the length of the abscissa of the two-dimensional lattice, and d = 0, 1, or 2;
[0071] Delete the points located at the edge in the hexagonal center array;
[0072] Taking each point in the hexagonal center array after deletion as the center, select adjacent points in the hexagonal center array before deletion to form corresponding elements;
[0073] Combine each element to form a hexagonal array;
[0074] Connect adjacent points within each element of the hexagonal array in the two-dimensional lattice to obtain the grid pattern.
[0075] Optionally, the hexagonal expansion operation includes:
[0076] When one is an odd row and the other is an even row, and the two-dimensional lattice is not transposed:
[0077] Add two rows in front of the first row of the two-dimensional lattice;
[0078] Add two rows behind the last row of the two-dimensional lattice;
[0079] Add one column in front of the first column of the two-dimensional lattice;
[0080] Add one column behind the last column of the two-dimensional lattice;
[0081] When one is an even row and the other is an odd row, and the two-dimensional lattice is not transposed:
[0082] Add one row in front of the first row of the two-dimensional lattice;
[0083] Add one row behind the last row of the two-dimensional lattice;
[0084] Add two columns in front of the first column of the two-dimensional lattice;
[0085] Add two columns after the last column of the two-dimensional lattice;
[0086] When one of them is an odd row, the other is an even row, and the two-dimensional lattice has been transposed:
[0087] Add one row before the first row of the two-dimensional lattice;
[0088] Add one row after the last row of the two-dimensional lattice;
[0089] Add two columns before the first column of the two-dimensional lattice;
[0090] Add two columns after the last column of the two-dimensional lattice;
[0091] When one of them is an even row, the other is an odd row, and the two-dimensional lattice has been transposed:
[0092] Add two rows before the first row of the two-dimensional lattice;
[0093] Add two rows after the last row of the two-dimensional lattice;
[0094] Add one column before the first column of the two-dimensional lattice;
[0095] Add one column after the last column of the two-dimensional lattice.
[0096] Through the above technical solutions, the grid pattern generation method based on a two-dimensional lattice provided by the present invention establishes a coordinate system on the surface to be drawn, combines the vertex characteristics of the rectangular pattern, and obtains the vertices of each rectangle by screening the lattice in the coordinate system, thereby forming a grid pattern. Compared with the prior art, it overcomes the technical problem of being unable to achieve gapless filling due to relying on pattern filling, and expands the application range of the pattern drawing method.
[0097] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent specific embodiment part. Brief Description of the Drawings
[0098] The drawings are used to provide a further understanding of the embodiments of the present invention, and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the embodiments of the present invention, but do not constitute a limitation to the embodiments of the present invention. In the drawings:
[0099] Figure 1 is a flowchart of a grid pattern generation method based on a two-dimensional lattice according to an embodiment of the present invention;
[0100] Figure 2 is a flowchart of a method for generating a rhombic grid pattern according to an embodiment of the present invention;
[0101] Figure 3 is a flowchart of a method for generating a diamond grid pattern according to an embodiment of the present invention;
[0102] Figure 4 is a flowchart of a method for generating a triangular grid pattern according to an embodiment of the present invention;
[0103] Figure 5 is a flowchart of a method for generating a triangular grid pattern according to an embodiment of the present invention;
[0104] Figure 6 is a flowchart of a method for generating a hexagonal grid pattern according to an embodiment of the present invention;
[0105] Figure 7 is a flowchart of a method for generating a hexagonal grid pattern according to an embodiment of the present invention;
[0106] Figure 8 is a flowchart of a method for generating a hexagonal grid pattern according to an embodiment of the present invention;
[0107] Figure 9 is a flowchart of a method for generating a hexagonal grid pattern according to an embodiment of the present invention. Detailed Embodiments
[0108] The following will describe in detail the specific embodiments of the embodiments of the present invention with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for the purpose of illustrating and explaining the embodiments of the present invention, and are not used to limit the embodiments of the present invention.
[0109] In the embodiments of the present invention, unless otherwise stated, the orientation terms such as "upper, lower, top, bottom" are generally used in the direction shown in the drawings or in terms of the vertical, perpendicular or gravitational direction for describing the relative positional relationship of the components.
[0110] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only for descriptive purposes, and cannot be understood as indicating or implying their relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of such features. In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on the fact that those skilled in the art can implement them. When the combination of the technical solutions results in contradictions or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0111] AsFigure 1 The figure shows a flowchart of a method for generating a grid pattern based on a two-dimensional lattice according to an embodiment of the present invention. In this Figure 1 method, the method may include:
[0112] In step S10, a virtual quadrilateral canvas is formed based on the object to be drawn;
[0113] In step S11, taking a vertex of the quadrilateral canvas as the origin, a two-dimensional coordinate system is established on the quadrilateral canvas to form a two-dimensional lattice.
[0114] In the prior art, the conventional method for generating a grid pattern is to directly fill and render with a pattern. When the object to be drawn is a plane, this method can better complete the filling and rendering of the pattern. However, for a three-dimensional object, it is impossible to perform filling and rendering. Therefore, in the method for generating a grid pattern provided by the present invention, in step S10, a quadrilateral canvas is formed based on the surface of the housing to be drawn, and further, in step S11, based on this quadrilateral canvas, a two-dimensional coordinate system is established to form a two-dimensional lattice. As for how to establish this two-dimensional coordinate system and further how to form a two-dimensional lattice, there are various ways known to those skilled in the art. In a preferred example of the present invention, this way may be, for example, first taking a vertex of the quadrilateral canvas as the origin and the two adjacent vertices as the endpoints of two coordinate axes (u-axis and v-axis) to establish this two-dimensional coordinate system. Among them, there may be m points on the u-axis and n points on the v-axis. Then, a plurality of coordinate points are selected between the origin and the endpoints through a preset coordinate point determination method, and each coordinate point is used as each point in the two-dimensional lattice, thereby forming this two-dimensional lattice. The formed two-dimensional lattice may be as follows:
[0115] For the u-axis direction, each point can be expressed as:
[0116] The first column: [u 1 , u 2 , …, u m
[0117] The second column: [u 1 , u 2 , …, u m
[0118] The third column: [u 1 , u 2 , …, u m
[0119] …
[0120] The nth column: [u 1 , u 2 , …, u m , and each column has m points.
[0121] For the v-axis direction, each point can be expressed as:
[0122] The 1st row: [v 1 , v 1 , …, v 1
[0123] The 2nd row: [v 2 , v 2 , …, v 2
[0124] The 3rd row: [v 3 , v 3 , …, v 3
[0125] …
[0126] The mth row: [v n , v n , …, v n , and there are m points in each row.
[0127] As for the distance between each point, it can be determined by the coordinate point determination method. For this coordinate point determination method, depending on the different patterns finally formed, this coordinate point determination method can also be of various types.
[0128] In an example of the present invention, if the finally formed pattern is evenly distributed, the coordinate point determination method can be to set the distance between two adjacent points to be equal. Then the two-dimensional dot matrix formed can be as follows:
[0129] For the u-axis direction, each point can be expressed as:
[0130] The 1st column:
[0131] The 2nd column:
[0132] The 3rd column:
[0133] …
[0134] The nth column:
[0135] Correspondingly, the coordinate dot matrix in the v-axis direction can be expressed as:
[0136] The 1st row:
[0137] The 2nd row:
[0138] The 3rd row:
[0139] …
[0140] Row m:
[0141] In the case where a grid pattern with a gradient characteristic is required, in the generated two-dimensional lattice, the distance between two adjacent points needs to change gradually. Therefore, this coordinate point determination method can determine the coordinates of the point at the y-th position in the x-th row according to formulas (1) to (4):
[0142]
[0143]
[0144] u = 0, v = 0, x = 1, y = 1, (4)
[0145] Wherein, u is the coordinate of the point on the u-axis in the two-dimensional lattice, v is the coordinate of the point on the v-axis in the two-dimensional lattice, j is the change rate in the u-axis direction, and k is the change rate in the v-axis direction.
[0146] In the case where a grid pattern with a random change is required, in the generated two-dimensional lattice, the distance between two adjacent points needs to change randomly. Therefore, this coordinate point determination method can determine the coordinates of the point at the y-th position in the x-th row in the two-dimensional lattice according to formulas (5) to (8):
[0147]
[0148] u = 0, v = 0, x = 1, y = 1, (8)
[0149] Wherein, Random u1 is the coordinate of the point (u1, v1) in the u-axis direction, and the rest, such as Random u2 , Random u3 and so on, for the same reason, so it will not be elaborated here. Random v1 is the coordinate of the point (u1, v1) in the v-axis direction, and the rest, such as Random v2 , Random v3 and so on, for the same reason, so it will not be elaborated here.
[0150] In the case where a grid pattern with a relatively complex smoothness but a non-unique change rate of density change is required, in the generated two-dimensional lattice, the distance between two adjacent points needs to change according to the change law of a certain driving curve in the xy plane. Therefore, this coordinate point determination method can determine the coordinates of the point at the j-th position in the i-th row in the two-dimensional lattice according to formulas (9) to (12):
[0151]
[0152] u = 0, v = 0, x = 1, y = 1, (12)
[0153] where y u1 is the y - coordinate of the first point among the (m - 1) evenly - distributed points on the u - direction driving curve; yu2 is the y - coordinate of the second point among the (m - 1) evenly - distributed points on the u - direction driving curve; and so on. y umin is the minimum value among this group of (m - 1) y - coordinates.
[0154] where y v1 is the y - coordinate of the first point among the (n - 1) evenly - distributed points on the v - direction driving curve; y v2 is the y - coordinate of the second point among the (n - 1) evenly - distributed points on the v - direction driving curve; and so on. y vmin is the minimum value among this group of (n - 1) y - coordinates.
[0155] In step S12, determine the type of the graph to be drawn currently.
[0156] In step S13, when the type of the image to be drawn currently is a rectangle, delete the last row and the last column of the two - dimensional lattice to obtain a first array including the upper - left corner point of the two - dimensional lattice;
[0157] In step S14, delete the last row and the first column of the two - dimensional lattice to obtain a second array including the upper - right corner point of the two - dimensional lattice;
[0158] In step S15, delete the first row and the first column of the two - dimensional lattice to obtain a third array including the lower - right corner point of the two - dimensional lattice;
[0159] In step S16, delete the first row and the last column of the two - dimensional lattice to obtain a fourth array including the lower - left corner point of the two - dimensional lattice;
[0160] In step S17, combine the first array, the second array, the third array, and the fourth array according to the one - to - one correspondence of the row and column numbers to form a rectangular array;
[0161] In step S18, connect the adjacent points within each element of the rectangular array to obtain a grid pattern.
[0162] Based on as Figure 1In the method shown, taking the points in the first row and the first column of each array as an example, the coordinates of the points in the first row and the first column obtained in step S13 are (0, 0), the coordinates of the points in the first row and the first column obtained in step S14 are (1, 0), the coordinates of the points in the first row and the first column obtained in step S15 are (1, 1), and the coordinates of the points in the first row and the first column obtained in step S16 are (0, 1). Then, after being combined in step S17, the four points form the four vertices of a rectangle. After connecting the four vertices in step S18, a rectangular pattern is obtained.
[0163] In this embodiment, if the type of the image to be drawn is a rhombus, then the grid pattern generation method may include the steps as Figure 2 shown. In this Figure 2 case, the grid pattern generation method may include:
[0164] In step S20, when the type of the image to be drawn is a rhombus currently, for one of the odd rows and the even rows of the two-dimensional lattice, select the points with odd serial numbers, and for the other of the odd rows and the even rows of the two-dimensional lattice, select the points with even serial numbers to form a rhombus center array;
[0165] In step S21, perform a rhombus expansion operation on the two-dimensional lattice to obtain a rhombus-expanded two-dimensional lattice. Among them, the rhombus expansion operation may be, for example, adding a row in front of the first row of the two-dimensional lattice; adding a column in front of the first column of the two-dimensional lattice; adding a row behind the last row of the two-dimensional lattice; adding a column behind the last column of the two-dimensional lattice.
[0166] In step S22, taking each point in the rhombus center array as the center, select the adjacent points in the upper, lower, left, and right directions corresponding to it in the rhombus-expanded two-dimensional lattice to form the corresponding elements;
[0167] In step S23, combine each element to form a rhombus array;
[0168] In step S24, connect the adjacent points within each element of the rhombus array in the two-dimensional lattice to obtain a grid pattern;
[0169] Based on the such as Figure 2For the method shown, taking the point in the first row and the first column of the rhombus center array as an example, the coordinates of this point are (0, 0). Due to the rhombus-expanded two-dimensional lattice operation on the two-dimensional lattice, the expanded lattice includes points (-1, 0), (0, -1), (0, 1), and (1, 0) surrounding the point (0, 0). The points (-1, 0), (0, -1), (0, 1), and (1, 0) can form an element in the rhombus array in step S23. Step S24 is to connect adjacent points (without cross-connection) for each of the four points in each element, thereby forming a rhombus grid in the rhombus grid pattern. Similarly, the entire rhombus grid pattern can be obtained.
[0170] In this embodiment, if the image type to be drawn is a rhombus, the grid pattern generation method may further include the steps as Figure 3 shown. In this Figure 3 , the grid pattern generation method may include:
[0171] In step S30, when the image type to be drawn currently is a rhombus, for one of the odd rows and even rows of the two-dimensional lattice, select the points with odd serial numbers, and for the other of the odd rows and even rows of the two-dimensional lattice, select the points with even serial numbers to form a rhombus center array;
[0172] In step S31, delete the points located at the edge of the two-dimensional lattice in the rhombus center array;
[0173] In step S32, taking each point in the rhombus center array as the center, select the adjacent points in the corresponding up, down, left, and right directions in the two-dimensional lattice to form the corresponding elements;
[0174] In step S33, combine each element to form a rhombus array;
[0175] In step S34, connect the adjacent points within each element of the rhombus array in the two-dimensional lattice to obtain a grid pattern.
[0176] In this embodiment, since the rectangular grid pattern itself is similar to the layout of each point of the two-dimensional lattice and there are no diagonal lines in the generated grid pattern, it is not necessary to consider whether there are enough points at the edge. However, when generating the rhombus array, since the rhombus itself consists of four diagonal sides, there must be diagonal lines in the rhombus grid pattern. Since the diagonal lines must span at least two rows or two columns of points, it is necessary to consider whether there are enough points at the edge during drawing. Therefore, in Figure 2 , the inventor expands the two-dimensional lattice through step S21 to pre-supplement the points that may be missing at the edge of the two-dimensional lattice, thereby facilitating subsequent drawing. Figure 3Although it is also a method for drawing a grid pattern of rhombuses, it is different from the method shown in Figure 2 in that it pre-deletes the points located at the edges in the rhombus array. In fact, when drawing the grid pattern, the reason that may cause insufficient points at the edge of the two-dimensional lattice is exactly the points at the edge in the rhombus array. Therefore, in step S31, directly deleting the points at the edge in the rhombus array can well avoid the occurrence of the above problems.
[0177] In this embodiment, if the image type to be drawn is a triangle, the grid pattern generation method may further include the steps as shown in Figure 4 . In this Figure 4 , the grid pattern generation method may include:
[0178] In step S40, when the current image type to be drawn is a triangle, for one of the odd rows and even rows of the two-dimensional lattice, select the points with odd serial numbers, and for the other of the odd rows and even rows of the two-dimensional lattice, select the points with even serial numbers to form a triangle center array;
[0179] In step S41, perform a triangle expansion operation on the two-dimensional lattice to obtain a triangle-expanded two-dimensional lattice. Among them, the triangle expansion operation includes: adding a row in front of the first row of the two-dimensional lattice; adding a column in front of the first column of the two-dimensional lattice; adding a row behind the last row of the two-dimensional lattice; adding a column behind the last column of the two-dimensional lattice.
[0180] In step S42, with each point in the triangle center array as the center, select the points adjacent to it in the upper, lower, left, and right directions in the triangle-expanded two-dimensional lattice to form the corresponding elements;
[0181] In step S43, combine each element to form a triangle array;
[0182] In step S44, connect at least a pair of diagonal points in each element of the triangle array in the two-dimensional lattice to obtain a grid pattern.
[0183] Based on this as shown in Figure 4For the method shown, taking the point in the first row and the first column of the triangular center array as an example, the coordinates of this point are (0, 0). Due to the operation of expanding the two-dimensional lattice into a triangular expanded two-dimensional lattice, the expanded lattice includes points (-1, 0), (0, -1), (0, 1), and (1, 0) surrounding the point (0, 0). The points (-1, 0), (0, -1), (0, 1), and (1, 0) can form an element in the triangular array of step S43. Step S44 is to connect (cross-connect) at least a pair of diagonal points for each of the four points in each element, thereby forming two triangular meshes in the triangular grid pattern. Similarly, the entire triangular grid pattern can be obtained.
[0184] In this embodiment, if the type of the image to be drawn is a triangle, the grid pattern generation method may further include the steps as Figure 5 shown. In this Figure 5 , the grid pattern generation method may include:
[0185] In step S50, for one of the odd rows and even rows of the two-dimensional lattice, select the points with odd serial numbers, and for the other of the odd rows and even rows of the two-dimensional lattice, select the points with even serial numbers to form a triangular center array;
[0186] In step S51, delete the points located at the edge of the two-dimensional lattice in the triangular center array;
[0187] In step S52, taking each point in the triangular center array as the center, select the adjacent points in the upper, lower, left, and right directions corresponding to it in the two-dimensional lattice to form the corresponding element;
[0188] In step S53, combine each element to form a triangular array;
[0189] In step S54, connect at least a pair of diagonal points in each element of the triangular array in the two-dimensional lattice to obtain the grid pattern.
[0190] In this embodiment, since the rectangular grid pattern itself is similar to the layout of each point of the two-dimensional lattice and there are no slant lines in the generated grid pattern, it is not necessary to consider whether there are enough points at the edge. However, when generating the triangular array, since the triangle itself consists of at least one slant side, there must be slant lines in the triangular grid pattern. Since the slant lines must span at least two rows or two columns of points, it is necessary to consider whether there are enough points at the edge when drawing. Therefore, in Figure 4 , the inventor expands the two-dimensional lattice through step S41 to pre-supplement the points that may be missing at the edge of the two-dimensional lattice, so as to facilitate subsequent drawing. Figure 5Although it is also a method for drawing a triangular grid pattern, it is different from the method shown in Figure 4 in that it pre-deletes the points located at the edges in the triangle array. In fact, when drawing the grid pattern, the reason that may cause insufficient points at the edges of the two-dimensional lattice is exactly the points at the edges in the triangle array. Therefore, in step S51, directly deleting the points at the edges in the triangle array can well avoid the occurrence of the above problems.
[0191] In this embodiment, if the image type to be drawn is a hexagon, the grid pattern generation method may further include steps as shown in Figure 6 . In this Figure 6 , the grid pattern generation method may include:
[0192] In step S60, when the current image type to be drawn is a hexagon, for one of the odd rows and even rows of the two-dimensional lattice, select the points with serial numbers 6n + d, and for the other of the odd rows and even rows of the two-dimensional lattice, select the points with serial numbers 6n + d + 3 to form a hexagon center array, where n is an integer between 0 and m, m is the length of the abscissa of the two-dimensional lattice, and d = 0, 1, or 2;
[0193] In step S61, perform a hexagon expansion operation on the two-dimensional lattice to obtain a hexagon-expanded two-dimensional lattice. Wherein, the hexagon expansion operation may include: when one of the odd rows and even rows is an odd row and the other is an even row, add two rows in front of the first row of the two-dimensional lattice, add two rows behind the last row of the two-dimensional lattice, add one column in front of the first column of the two-dimensional lattice, and add one column behind the last column of the two-dimensional lattice; on the contrary, when one of the odd rows and even rows is an even row and the other is an odd row, add one row in front of the first row of the two-dimensional lattice, add one row behind the last row of the two-dimensional lattice, add two columns in front of the first column of the two-dimensional lattice, and add two columns behind the last column of the two-dimensional lattice.
[0194] In step S62, with each point in the hexagon center array as the center, select adjacent points in the hexagon-expanded two-dimensional lattice to form corresponding elements;
[0195] In step S63, combine each element to form a hexagon array;
[0196] In step S64, connect the adjacent points within each element of the hexagon array in the two-dimensional lattice to obtain a grid pattern.
[0197] Based on this as shown in Figure 6For the method shown, taking the point in the first row and the first column of the hexagonal center array as an example, the coordinates of this point are (0, 0). Since the two-dimensional lattice has undergone the hexagonal extended two-dimensional lattice operation, the extended lattice includes points (-2, 0), (-1, -1), (1, -1), (2, 0), (1, 1), and (-1, 1) surrounding the point (0, 0). The points (-2, 0), (-1, -1), (1, -1), (2, 0), (1, 1), and (-1, 1) can form an element in the hexagonal center array of step S63. Step S64 is to connect adjacent points (non-crossing connection) among the six points in each element, thereby forming a hexagonal grid in the hexagonal grid pattern. Similarly, the entire hexagonal grid pattern can be obtained.
[0198] In this embodiment, if the type of the image to be drawn is a hexagon, the grid pattern generation method may further include the steps as Figure 7 shown. In this Figure 7 , the grid pattern generation method may include:
[0199] In step S70, when the type of the image to be drawn currently is a hexagon, for one of the odd rows and the even rows of the two-dimensional lattice, select the points with the serial number 6n + d, and for the other of the odd rows and the even rows of the two-dimensional lattice, select the points with the serial number 6n + d + 3 to form a hexagonal center array, where n is an integer between 0 and m, m is the length of the abscissa of the two-dimensional lattice, and d = 0, 1, or 2;
[0200] In step S71, delete the points located at the edge in the hexagonal center array;
[0201] In step S72, taking each point in the hexagonal center array after deletion as the center, select adjacent points in the hexagonal center array before deletion to form the corresponding element;
[0202] In step S73, combine each element to form a hexagonal array;
[0203] In step S74, connect adjacent points within each element of the hexagonal array in the two-dimensional lattice to obtain the grid pattern.
[0204] In this embodiment, since the grid pattern of the rectangle itself is similar to the layout of each point of the two-dimensional lattice and there are no diagonal lines in the generated grid pattern, it is not necessary to consider whether there are enough points at the edge. However, when generating the hexagonal array, since the hexagon itself is composed of at least four diagonal sides, there must be diagonal lines in the hexagonal grid pattern. Since the diagonal lines must span at least two rows or two columns of points, it is necessary to consider whether there are enough points at the edge when drawing. Therefore, inFigure 6 In this, the inventor expands the two-dimensional lattice through step S61, and pre-supplements the points that may be missing at the edge of the two-point lattice, thus facilitating subsequent drawing. Figure 7 Although it is also a method for drawing a hexagonal grid pattern, it is different from the method shown in Figure 6 in that it pre-removes the points located at the edge in the hexagonal array. In fact, when drawing the grid pattern, the reason that may cause insufficient points at the edge of the two-dimensional lattice is exactly the points at the edge in the hexagonal array. Therefore, in step S71, directly deleting the points at the edge in the hexagonal array can well avoid the occurrence of the above problems.
[0205] In this embodiment, if the image type to be drawn is a hexagon, the grid pattern generation method may further include the steps as shown in Figure 8 In this Figure 8 the grid pattern generation method may include:
[0206] In step S80, when the image type to be drawn currently is a hexagon, a transpose operation is performed on the two-dimensional lattice. For one of the odd rows and even rows of the two-dimensional lattice, the points with serial numbers 6n + d are selected, and for the other of the odd rows and even rows of the two-dimensional lattice, the points with serial numbers 6n + d + 3 are selected to form a hexagonal center array, where n is an integer between 0 and m, m is the length of the abscissa of the two-dimensional lattice, and d = 0, 1 or 2;
[0207] In step S81, a hexagonal expansion operation is performed on the two-dimensional lattice to obtain a hexagonal expanded two-dimensional lattice. Among them, the hexagonal expansion operation may include: when one of the odd rows and even rows is an odd row and the other is an even row, a row is added before the first row of the two-dimensional lattice, a row is added after the last row of the two-dimensional lattice, two columns are added before the first column of the two-dimensional lattice, two columns are added after the last column of the two-dimensional lattice; when one of the odd rows and even rows is an even row and the other is an odd row, two rows are added before the first row of the two-dimensional lattice, two rows are added after the last row of the two-dimensional lattice, one column is added before the first column of the two-dimensional lattice, and one column is added after the last column of the two-dimensional lattice.
[0208] In step S82, with each point in the hexagonal center array as the center, adjacent points are selected in the hexagonal expanded two-dimensional lattice to form corresponding elements;
[0209] In step S83, each element is combined to form a hexagonal array;
[0210] In step S84, adjacent points within each element of the hexagonal array are connected in the two-dimensional lattice to obtain a grid pattern.
[0211] Based on the method as Figure 8 shown, taking the points in the first row and the first column of the hexagonal center array as an example, the coordinates of this point are (0, 0). Due to the hexagonal extended two-dimensional lattice operation on the two-dimensional lattice, the extended lattice includes points (0, -2), (-1, -1), (1, -1), (0, 2), (1, 1), and (1, -1) around this point (0, 0). These points (0, -2), (-1, -1), (1, -1), (0, 2), (1, 1), and (1, -1) can form an element in the hexagonal center array of step S83. Step S84 is to connect the adjacent points (non-crossing connection) among the six points in each element, thereby forming a hexagonal grid in the hexagonal grid pattern. Similarly, the entire hexagonal grid pattern can be obtained.
[0212] In this embodiment, if the image type to be drawn is a hexagon, the grid pattern generation method may further include the steps as Figure 9 shown in. In this Figure 9 the grid pattern generation method may include:
[0213] In step S90, when the current image type to be drawn is a hexagon, perform a transpose operation on the two-dimensional lattice. For one of the odd rows and even rows of the two-dimensional lattice, select points with serial number 6n + d, and for the other of the odd rows and even rows of the two-dimensional lattice, select points with serial number 6n + d + 3 to form a hexagonal center array, where n is an integer between 0 and m, m is the length of the abscissa of the two-dimensional lattice, and d = 0, 1, or 2;
[0214] In step S91, delete the points located at the edge in the hexagonal center array;
[0215] In step S92, taking each point in the hexagonal center array after deletion as the center, select adjacent points in the hexagonal center array before deletion to form the corresponding element;
[0216] In step S93, combine each element to form a hexagonal array;
[0217] In step S94, connect the adjacent points within each element of the hexagonal array in the two-dimensional lattice to obtain the grid pattern.
[0218] In this embodiment, since the rectangular grid pattern itself is similar to the layout of the points of the two-dimensional lattice and there are no diagonal lines in the generated grid pattern, it is not necessary to consider whether there are enough points at the edges. However, when generating a hexagonal array, since a hexagon is composed of at least four diagonal edges, there must be diagonal lines in the hexagonal grid pattern. Since the diagonal lines necessarily span at least two rows or two columns of points, it is necessary to consider whether there are enough points at the edges during drawing. Therefore, in Figure 8 , the inventor first performs a transposition operation on the two-dimensional lattice in step S80, and then expands the two-dimensional lattice in step S81 to pre-supplement the points that may be missing at the edges of the two-site lattice, so as to facilitate subsequent drawing. Figure 9 Although it is also a method for drawing a hexagonal grid pattern, the difference from the method shown in Figure 8 is that it pre-deletes the points located at the edges in the hexagonal array. In fact, when drawing the grid pattern, the reason that may cause insufficient points at the edges of the two-dimensional lattice is exactly the points at the edges in the hexagonal array. Therefore, in step S91, directly deleting the points at the edges in the hexagonal array can well avoid the occurrence of the above problems.
[0219] In addition, in an embodiment of the present invention, if it is necessary to scale the grid pattern generated as Figures 1 to 9 , the coordinates in the two-dimensional lattice can be enlarged or reduced in proportion, and then the coordinates of the corresponding array can be enlarged or reduced in proportion again. Finally, through a method similar to the original one, the array and the two-dimensional lattice are combined to obtain the scaled grid pattern.
[0220] Through the above technical solutions, the grid pattern generation method based on a two-dimensional lattice provided by the present invention establishes a coordinate system on the surface to be drawn, combines the vertex characteristics of the rectangular pattern, and obtains the vertices of each rectangle by screening the lattice in the coordinate system, thereby forming a grid pattern. Compared with the prior art, it overcomes the technical problem of being unable to achieve gapless filling due to relying on pattern filling, and expands the application range of the pattern drawing method. The above has described in detail the optional embodiments of the present invention with reference to the accompanying drawings. However, the embodiments of the present invention are not limited to the specific details in the above embodiments. Within the technical concept scope of the embodiments of the present invention, various simple modifications can be made to the technical solutions of the embodiments of the present invention, and these simple modifications all belong to the protection scope of the embodiments of the present invention.
[0221] It should be noted that, in the above specific embodiments, the various specific technical features described can be combined in any suitable way without contradiction. To avoid unnecessary repetition, the embodiments of the present invention do not separately describe various possible combination methods.
[0222] Those skilled in the art can understand that all or part of the steps in implementing the above-described implementation methods can be completed by instructing relevant hardware through a program. The program is stored in a storage medium, including several instructions to enable a single-chip microcomputer, a chip, etc. or a processor to execute all or part of the steps of the grid pattern generation method described in various embodiments of the present application. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs.
[0223] In addition, any combination can be made among various different embodiments of the embodiments of the present invention, as long as it does not violate the idea of the embodiments of the present invention, and it should also be regarded as the content disclosed in the embodiments of the present invention.
Claims
1. A method for generating a grid pattern based on a two-dimensional lattice, characterized in that, the grid pattern generation method includes: forming a virtual quadrilateral canvas based on the object to be drawn; establishing a two-dimensional coordinate system on the quadrilateral canvas with a vertex of the quadrilateral canvas as the origin to form a two-dimensional lattice; determining the type of the figure to be drawn currently; when the type of the image to be drawn currently is a rectangle, deleting the last row and the last column of the two-dimensional lattice to obtain a first array including the upper left corner point of the two-dimensional lattice; deleting the last row and the first column of the two-dimensional lattice to obtain a second array including the upper right corner point of the two-dimensional lattice; deleting the first row and the first column of the two-dimensional lattice to obtain a third array including the lower right corner point of the two-dimensional lattice; deleting the first row and the last column of the two-dimensional lattice to obtain a fourth array including the lower left corner point of the two-dimensional lattice; combining the first array, the second array, the third array and the fourth array according to the one-to-one correspondence of the row and column numbers to form a rectangular array; connecting adjacent points within each element in the rectangular array to obtain the grid pattern.
2. The grid pattern generation method according to claim 1, characterized in that, the grid pattern generation method further includes: when the type of the image to be drawn currently is a rhombus, for one of the odd rows and even rows of the two-dimensional lattice, selecting points with odd serial numbers, and for the other of the odd rows and even rows of the two-dimensional lattice, selecting points with even serial numbers to form a rhombus center array; performing a rhombus expansion operation on the two-dimensional lattice to obtain a rhombus-expanded two-dimensional lattice; centering on each point in the rhombus center array, selecting adjacent points in the corresponding upper, lower, left and right directions in the rhombus-expanded two-dimensional lattice to form corresponding elements; combining each element to form a rhombus array; connecting adjacent points within each element of the rhombus array in the two-dimensional lattice to obtain the grid pattern; wherein, the rhombus expansion operation includes: adding a row in front of the first row of the two-dimensional lattice; adding a column in front of the first column of the two-dimensional lattice; adding a row behind the last row of the two-dimensional lattice; adding a column behind the last column of the two-dimensional lattice.
3. The grid pattern generation method according to claim 1, characterized in that, the grid pattern generation method further includes: when the type of the image to be drawn currently is a rhombus, for one of the odd rows and even rows of the two-dimensional lattice, selecting points with odd serial numbers, and for the other of the odd rows and even rows of the two-dimensional lattice, selecting points with even serial numbers to form a rhombus center array; deleting the points located at the edge of the two-dimensional lattice in the rhombus center array; centering on each point in the rhombus center array, selecting adjacent points in the corresponding upper, lower, left and right directions in the two-dimensional lattice to form corresponding elements; combining each element to form a rhombus array; connecting adjacent points within each element of the rhombus array in the two-dimensional lattice to obtain the grid pattern.
4. The grid pattern generation method according to claim 1, wherein, the grid pattern generation method further includes: when the current image type to be drawn is a triangle, for one of the odd rows and even rows of the two-dimensional dot matrix, select the points with odd serial numbers, and for the other of the odd rows and even rows of the two-dimensional dot matrix, select the points with even serial numbers to form a triangle center array; perform a triangle expansion operation on the two-dimensional dot matrix to obtain a triangle-expanded two-dimensional dot matrix; centered on each point in the triangle center array, select the adjacent points in the corresponding up, down, left, and right directions in the triangle-expanded two-dimensional dot matrix to form the corresponding elements; combine each element to form a triangle array; connect at least a pair of diagonal points in each element of the triangle array in the two-dimensional dot matrix to obtain the grid pattern; wherein, the triangle expansion operation includes: add a row before the first row of the two-dimensional dot matrix; add a column before the first column of the two-dimensional dot matrix; add a row after the last row of the two-dimensional dot matrix; add a column after the last column of the two-dimensional dot matrix.
5. The grid pattern generation method according to claim 1, wherein, the grid pattern generation method further includes: when the current image type to be drawn is a triangle, for one of the odd rows and even rows of the two-dimensional dot matrix, select the points with odd serial numbers, and for the other of the odd rows and even rows of the two-dimensional dot matrix, select the points with even serial numbers to form a triangle center array; delete the points located at the edge of the two-dimensional dot matrix in the triangle center array; centered on each point in the triangle center array, select the adjacent points in the corresponding up, down, left, and right directions in the two-dimensional dot matrix to form the corresponding elements; combine each element to form a triangle array; connect at least a pair of diagonal points in each element of the triangle array in the two-dimensional dot matrix to obtain the grid pattern.
6. The grid pattern generation method according to claim 1, wherein, the grid pattern generation method further includes: when the current image type to be drawn is a hexagon, for one of the odd rows and even rows of the two-dimensional dot matrix, select the points with serial numbers 6n + d, and for the other of the odd rows and even rows of the two-dimensional dot matrix, select the points with serial numbers 6n + d + 3 to form a hexagon center array, where n is an integer between 0 and m, m is the length of the abscissa of the two-dimensional dot matrix, and d = 0, 1, or 2; perform a hexagon expansion operation on the two-dimensional dot matrix to obtain a hexagon-expanded two-dimensional dot matrix; centered on each point in the hexagon center array, select the adjacent points in the hexagon-expanded two-dimensional dot matrix to form the corresponding elements; combine each element to form a hexagon array; connect the adjacent points in each element of the hexagon array in the two-dimensional dot matrix to obtain the grid pattern.
7. The grid pattern generation method according to claim 1, wherein, the grid pattern generation method further includes: When the type of the image to be drawn currently is a hexagon, for one of the odd rows and even rows of the two-dimensional lattice, select the points with serial numbers 6n + d, and for the other of the odd rows and even rows of the two-dimensional lattice, select the points with serial numbers 6n + d + 3 to form a hexagon center array, where n is an integer between 0 and m, m is the length of the abscissa of the two-dimensional lattice, and d = 0, 1 or 2; Delete the points located at the edges in the hexagon center array; Taking each point in the hexagon center array after deletion as the center, select adjacent points in the hexagon center array before deletion to form corresponding elements; Combine each element to form a hexagon array; Connect the adjacent points within each element of the hexagon array in the two-dimensional lattice to obtain the grid pattern.
8. The grid pattern generation method according to claim 1, wherein, the grid pattern generation method further includes: When the type of the image to be drawn currently is a hexagon, perform a transpose operation on the two-dimensional lattice, for one of the odd rows and even rows of the two-dimensional lattice, select the points with serial numbers 6n + d, and for the other of the odd rows and even rows of the two-dimensional lattice, select the points with serial numbers 6n + d + 3 to form a hexagon center array, where n is an integer between 0 and m, m is the length of the abscissa of the two-dimensional lattice, and d = 0, 1 or 2; Perform a hexagon expansion operation on the two-dimensional lattice to obtain a hexagon-expanded two-dimensional lattice; Taking each point in the hexagon center array as the center, select adjacent points in the hexagon-expanded two-dimensional lattice to form corresponding elements; Combine each element to form a hexagon array; Connect the adjacent points within each element of the hexagon array in the two-dimensional lattice to obtain the grid pattern.
9. The grid pattern generation method according to claim 1, wherein, the grid pattern generation method further includes: When the type of the image to be drawn currently is a hexagon, perform a transpose operation on the two-dimensional lattice, for one of the odd rows and even rows of the two-dimensional lattice, select the points with serial numbers 6n + d, and for the other of the odd rows and even rows of the two-dimensional lattice, select the points with serial numbers 6n + d + 3 to form a hexagon center array, where n is an integer between 0 and m, m is the length of the abscissa of the two-dimensional lattice, and d = 0, 1 or 2; Delete the points located at the edges in the hexagon center array; Taking each point in the hexagon center array after deletion as the center, select adjacent points in the hexagon center array before deletion to form corresponding elements; Combine each element to form a hexagon array; Connect the adjacent points within each element of the hexagon array in the two-dimensional lattice to obtain the grid pattern.
10. The grid pattern generation method according to claim 6 or 8, wherein, the hexagon expansion operation includes: When one is an odd row and the other is an even row, and the two-dimensional lattice is not transposed: Add two rows in front of the first row of the two-dimensional lattice; Add two rows behind the last row of the two-dimensional lattice; Add one column in front of the first column of the two-dimensional lattice; Add one column behind the last column of the two-dimensional lattice; When one of them is an even row, the other is an odd row, and the two-dimensional lattice is not transposed: Add one row in front of the first row of the two-dimensional lattice; Add one row behind the last row of the two-dimensional lattice; Add two columns in front of the first column of the two-dimensional lattice; Add two columns behind the last column of the two-dimensional lattice; When one of them is an odd row, the other is an even row, and the two-dimensional lattice is transposed: Add one row in front of the first row of the two-dimensional lattice; Add one row behind the last row of the two-dimensional lattice; Add two columns in front of the first column of the two-dimensional lattice; Add two columns behind the last column of the two-dimensional lattice; When one of them is an even row, the other is an odd row, and the two-dimensional lattice is transposed: Add two rows in front of the first row of the two-dimensional lattice; Add two rows behind the last row of the two-dimensional lattice; Add one column in front of the first column of the two-dimensional lattice; Add one column behind the last column of the two-dimensional lattice.
Citation Information
Patent Citations
Dot matrix two-dimensional code coding and recognition method
CN105760919A
Jet printing speed increasing method and device
CN107160873A