Triangle generation device, triangle generation method, and triangle generation program

By designing a triangle generation device, using the main and secondary segmentation numbers to divide the triangles, the problem of the new triangles being away from the regular triangles in the prior art is solved, improving the analysis accuracy and reducing the operation time.

CN119404228APending Publication Date: 2025-02-07DENSO CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202380049099.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-06-24
Filing Date
2023-06-23
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

When the prior art splits a triangle into smaller triangles, it is easy to cause the generated new triangle to be far away from the regular triangle, resulting in a decrease in analytical accuracy and an increase in operation time.

Method used

By designing a triangle generation device, the device can obtain the vertex coordinates of the basic triangle, and through the setting of the main and secondary division numbers, the split triangle is divided into multiple subdivided triangles to ensure that the side length of the subdivided triangle is close to the regular triangle. side length.

Benefits of technology

It effectively suppresses the situation where the new triangle generated by segmenting the basic triangle is far away from the regular triangle, thereby improving the resolution accuracy and reducing the operation time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119404228A_ABST
    Figure CN119404228A_ABST
Patent Text Reader

Abstract

The invention relates to a triangle generation device, a triangle generation method, and a triangle generation program. The triangle generation device includes an acquisition unit and a triangle division unit. The triangular division unit has a main division number setting unit, a sub-division number setting unit, and an execution unit. The main division points are a plurality of (M + 1) points including two end points of the first side and located at positions equally dividing the first side by a main division number, the branch lines are line segments passing through the main division points from the first side to the second side and along the third side, and the sub division points are a plurality of (N + 1) points including two end points of the branch lines and equally dividing the branch lines by a sub division number; the branch line pair is a combination of any two adjacent branch lines among the branch lines.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This international application claims priority based on Japanese Patent Application No. 2022-102150 filed in the Japan Patent Office on June 24, 2022, and the entire contents of Japanese Patent Application No. 2022-102150 are incorporated herein by reference. Technical Field

[0003] The present disclosure relates to a technique for splitting a triangle to generate a plurality of new triangles. Background Art

[0004] For example, Patent Document 1 listed below discloses a technique related to dividing a triangle into two equal parts with a size less than or equal to a predetermined size.

[0005] Patent Document 1: U.S. Patent No. 10832473

[0006] Subdivision is one of the image operation methods in computer graphics. Subdivision is a technique for more finely dividing multiple polygons (e.g., triangular polygons) used to express a three-dimensional solid on a two-dimensional image, and is a technique for expressing a three-dimensional solid in more detail and smoothly based on the divided triangles.

[0007] In the method described in Patent Document 1, a dividing line is repeatedly drawn from a vertex of a triangle toward its opposite side, and the triangle is divided into two equal parts using the dividing line. In this method, for example, if the triangle before the division is a relatively long and thin triangle, the triangle after the division may also become a relatively long and thin triangle. That is, the triangle after the division may be far from an equilateral triangle.

[0008] However, in image calculations in computer graphics, it is known that the further a triangle is from an equilateral triangle (that is, the lower the aspect ratio of the triangle), the lower the analytical accuracy and the longer the calculation time. Summary of the invention

[0009] An object of a technical solution of the present disclosure is to prevent a new triangle generated by splitting a triangle from being far away from the equilateral triangle.

[0010] A technical solution of the present disclosure is a triangle generation device. The triangle generation device as a technical solution of the present disclosure includes an acquisition unit and a triangle division unit. The acquisition unit is configured to acquire a vertex coordinate group including coordinates of each vertex for one or more basic triangles. The triangle division unit is configured to divide each basic triangle defined by the coordinates of each vertex included in the vertex coordinate group into a plurality of finely divided triangles. In addition, the triangle division unit includes a main division number setting unit, a secondary division number setting unit, and an execution unit.

[0011] The main division number setting unit is configured to set the main division number when the first side is divided into a plurality of equal parts based on a predetermined division length. The sub-division number setting unit is configured to set the sub-division number when the set branch line is divided into a plurality of equal parts based on the division length for each of the plurality of main division points set on the first side. The execution unit is configured to acquire combination information for each of the main division points, and calculate the coordinates of the vertices of the subdivided triangle according to each branch line pair set for each main division point using the vertex coordinate group, the main division number, and the combination information.

[0012] A finely divided triangle refers to one or more triangles that divide the area of ​​the basic triangle sandwiched by the branch line pair into non-repeating vertices using the sub-division points on the two branches belonging to the branch line pair as vertices. Combination information refers to information that specifies the combination method of the sub-division points belonging to each finely divided triangle. The main division point is a plurality of (M+1) points that include the two endpoints of the first side and are located at a position that divides the first side into equal parts by the number of main divisions. The branch line is a line segment that passes through the main division point from the first side to the second side and along the third side. The sub-division point is a plurality of (N+1) points that include the two endpoints of the branch line and divide the branch line into equal parts by the number of sub-divisions. A branch line pair is a combination of any two adjacent branches in the branch line.

[0013] The triangle generation device of one technical solution of the present disclosure constructed in this way can make the interval between the main division points and the interval between the sub-division points approximately the same by dividing based on the division length. That is, the side along the first side where the main division point is set and the side along the branch line where the sub-division point is set can be made to have approximately the same length among the three sides in the subdivided triangle. Therefore, the basic triangle can be divided into subdivided triangles having a shape with a relatively large degree of consistency with the regular triangle. As a result, it is possible to suppress the new subdivided triangles generated by dividing the basic triangle from being far away from the regular triangle.

[0014] Another technical solution disclosed in the present invention is a triangle generation method, which is configured to obtain a vertex coordinate group including the coordinates of each vertex for one or more basic triangles, and divide each basic triangle defined by the coordinates of each vertex included in the vertex coordinate group into multiple finely divided triangles.

[0015] The triangle generation method as another technical solution of the present disclosure constructed in this way is a method executed by the triangle generation device as one technical solution of the present disclosure, and can obtain the same effect as the triangle generation device as one technical solution of the present disclosure.

[0016] Another technical solution of the present disclosure is a triangle generation program executed by a triangle generation device as a technical solution of the present disclosure, which has an acquisition step and a triangle segmentation step. The triangle generation program as another technical solution of the present disclosure is a program executed by a triangle generation device as a technical solution of the present disclosure, and by executing the program, the same effect as that of the triangle generation device as a technical solution of the present disclosure can be obtained. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 This is a block diagram showing the structure of a radar simulator.

[0018] Figure 2 This is a flowchart of the triangle generation process.

[0019] Figure 3 It is a flowchart of triangle segmentation.

[0020] Figure 4 It is a pre-shaped flowchart.

[0021] Figure 5 This is an explanatory diagram for explaining the rearrangement of opposite side lengths in descending order.

[0022] Figure 6 It is an explanatory diagram showing the element vertices[] of the array before rearrangement.

[0023] Figure 7 This is an explanatory diagram showing the elements vertices[] of the array after rearrangement.

[0024] Figure 8 This is an explanatory diagram for explaining the division of non-target triangles.

[0025] Fig. 9 It is an explanatory diagram showing a plurality of basic triangles for explaining the operation of pre-shaping.

[0026] Fig.10 It is an explanatory diagram showing each array for explaining the operation of pre-shaping.

[0027] Fig.11 It is a flowchart of multi-level segmentation.

[0028] Fig.12 This is an explanatory diagram for explaining each side and each vertex in a basic triangle.

[0029] Fig.13 This is an explanatory diagram for explaining the outline of processing on a branch line.

[0030] Fig.14 This is an explanatory diagram for explaining the outline of the fine segmentation process.

[0031] Fig.15 This is the flowchart for the main line processing.

[0032] Fig.16 This is a flowchart of the processing on the branch line.

[0033] Fig.17 This is a flowchart of the prim_lookup_idx array generation process.

[0034] Fig.18 This is a flowchart of the fine segmentation process.

[0035] Fig.19 This is a flowchart of the maj_line_lookup_idx array generation process.

[0036] Fig. 20 This is an explanatory diagram for explaining the operation of the main line processing.

[0037] Fig.21 This is an explanatory diagram for explaining the operation of processing on the branch line.

[0038] Fig. 22 This is an explanatory diagram for explaining the fine segmentation process.

[0039] Fig.23 This is an explanatory diagram for explaining combination information.

[0040] Fig.24 It is an explanatory diagram showing an example of the array prim_lookup_idx[].

[0041] Fig.25 This is an explanatory diagram showing an example of the array maj_line_lookup_idx[].

[0042] Fig.26 It means in Figure 20 to Figure 23 An explanatory diagram of finely divided triangles for dividing the area sandwiched by the pair of branch lines set for the first main line upper point specified by maj_div_idx=3 in the basic triangle specified by prim_id=0.

[0043] Fig. 27 It is an explanatory diagram showing an example of the displacement amount of the main division point identification number.

[0044] Fig.28 It is an explanatory diagram showing an example of the shift amount of the sub-division point identification number.

[0045] Fig.29 is used for Figure 20 to Figure 23 An explanatory diagram for explaining each parameter in each basic triangle specified by prim_id=0 to 2.

[0046] Fig.30 It is a flowchart of accumulation and parallel processing.

[0047] Fig.31 This is an explanatory diagram for explaining the operation of accumulation and parallel processing. DETAILED DESCRIPTION

[0048] [First embodiment]

[0049] The following and attached Figure 1 The first embodiment of the present disclosure will be described.

[0050] [1-1. Structure]

[0051] like Figure 1 As shown, the radar simulator 1 of the present embodiment includes a display unit 11 , an operation input unit 12 , a data storage unit 13 , a data input / output unit 14 , and a control unit 15 .

[0052] The display unit 11 includes a display device (not shown) and displays various images on a display screen of the display device.

[0053] The operation input unit 12 outputs input operation information for specifying an input operation performed by a user via a keyboard and a mouse (not shown).

[0054] The data storage unit 13 is a storage device for storing various data.

[0055] The data input / output unit 14 performs data input / output with external devices connected by wire or wirelessly.

[0056] The control unit 15 is constructed around a microcomputer including an electronic computing device (hereinafter referred to as the computing device 20), ROM 23, and RAM 24. The computing device 20 includes at least one of a CPU 21 and a GPU 22. The various functions of the microcomputer are realized by executing a program stored in a non-migrating physical recording medium by the computing device 20. In this example, ROM 23 is equivalent to a non-migrating physical recording medium storing the program. In addition, by executing the program, a method corresponding to the program is executed. In addition, a part or all of the functions performed by the computing device 20 may be constituted in hardware by one or more ICs, etc. In addition, the number of microcomputers constituting the control unit 15 may be one or more.

[0057] For example, the ROM 23 stores a simulation program 25, a drawing program 26, and a triangle generation program 27. The simulation program 25, the drawing program 26, and the triangle generation program 27 may be pre-installed in the radar simulator 1 or installed via a recording medium or a network. Examples of the recording medium include an optical disk, a magnetic disk, and a semiconductor memory.

[0058] The simulation program 25 is a program for executing a simulation in which the three-dimensional shape of a road and the three-dimensional shape of the road periphery are reproduced in a virtual space, and a vehicle is caused to travel on the road reproduced in the virtual space. For example, the simulation may include a simulation of a radar device mounted on the vehicle transmitting and receiving radar waves in a vehicle traveling in a virtual space displayed on a display device. By starting the simulation program 25, a radar simulation simulating the traveling of a vehicle and the transmitting and receiving of radar waves by a radar device may be executed.

[0059] It is also possible to obtain data (hereinafter referred to as polygon data) representing the three-dimensional shape of the road and the surrounding area of ​​the road to be reproduced in the above-mentioned virtual space using multiple polygons by starting the simulation program 25. In addition, it is also possible to perform calculations to simulate the transmission and reception of radar waves based on the polygon data representing the three-dimensional shape. In addition, the simulation can include various other simulations.

[0060] For example, the drawing program 26 is a program for generating an image representing the three-dimensional shape of the road and the surrounding area of ​​the road, etc., which are reproduced in the virtual space used for the above-mentioned radar simulation. The drawing program 26 can be activated when the simulation program 25 is activated, or the drawing program 26 can be activated independently. By activating the drawing program 26, polygon data such as the three-dimensional shape of the road and the surrounding area of ​​the road, etc., which should be reproduced in the above-mentioned virtual space, can be acquired to generate an image representing the three-dimensional shape.

[0061] A plurality of polygon data representing a three-dimensional shape or the like may be stored in advance in the data storage unit 13, or may be acquired from outside the radar simulator 1 via the data input / output unit 14. The polygon data includes polygon vertex coordinate data representing coordinates (hereinafter referred to as vertex coordinates) of each vertex of a plurality of polygons (e.g., triangular polygons).

[0062] For example, the triangle generation program 27 is a program for dividing a triangular polygon defined by vertex coordinates included in the polygon vertex coordinate data (hereinafter also referred to as a basic triangle) into a plurality of triangles smaller than the basic triangle. The processing performed by the operation device 20 executing the triangle generation program 27 is also referred to as triangle generation processing.

[0063] The triangle generation process outputs new vertex coordinate data including vertex coordinates of a triangle smaller than the basic triangle, and an image representing a three-dimensional shape is generated based on the vertex coordinate data. This generates a more detailed and smooth image when the display unit 11 draws on the display device.

[0064] [1-2. Processing]

[0065] use Figure 2 The flowchart of FIG. 1 illustrates the sequence of the triangle generation process executed by the computing device 20. For example, the triangle generation process is started by the execution of the simulation program 25 or the execution of the drawing program 26. However, the execution of the triangle generation process is not limited to the execution of the simulation program 25 or the drawing program 26, and the triangle generation process may be executed at any time.

[0066] When the triangle generation process is executed, the computing device 20 acquires polygon vertex coordinate data in S1. For example, the polygon vertex coordinate data includes vertex coordinates of a plurality of basic triangles.

[0067] Next, in S2, the computing device 20 performs triangle division. The triangle division divides the basic triangle to generate a plurality of triangles smaller than the basic triangle (hereinafter, also referred to as finely divided triangles). In addition, the triangle generation mentioned below includes the case where the calculation of the vertex coordinates of the triangle is performed and the calculated vertex coordinates are output (i.e., stored) to a memory such as the RAM 24.

[0068] In S3, the computing device 20 outputs new vertex coordinate data including vertex coordinates of triangles smaller than the basic triangle (i.e., finely divided triangles). For example, the computing device 20 may output the vertex coordinate data to any memory that can be used by the simulation program 25, the drawing program 26, or other applications. The computing device 20 terminates the triangle generation process.

[0069] Next, based on Figure 3 The flowchart shown explains the details of the triangle division (that is, triangle generation processing) executed by the calculation device 20 in S2.

[0070] In S11, the computing device 20 performs pre-tessellation reshaping. Pre-tessellation reshaping is a process for reshaping a triangle having a shape with a relatively small degree of consistency with an equilateral triangle among basic triangles into a plurality of triangles having a shape with a relatively large degree of consistency with an equilateral triangle based on polygon vertex coordinate data.

[0071] In the next S12, the computing device 20 performs multi-level segmentation (i.e., Cascade Tessellation). Multi-level segmentation refers to a process for generating fine segmentation triangles for each basic triangle. In the present embodiment, before multi-level segmentation (i.e., before generating fine segmentation triangles), the above-mentioned pre-shaping process is performed as a pre-processing. That is, in the present embodiment, multi-level segmentation is performed on a basic triangle having a shape relatively close to an equilateral triangle. In addition, in the present embodiment, the fine segmentation triangles are a plurality of triangles smaller than the basic triangle obtained by segmenting a basic triangle having a shape relatively close to an equilateral triangle. The computing device 20 ends the triangle segmentation as described above.

[0072] [1-2-1. Pre-shaping]

[0073] based on Figure 4 The flowchart shown explains the details of the pre-shaping executed by the calculation device 20 in S11.

[0074] <Processing>

[0075] First, in S105, the computing device 20 obtains polygon vertex coordinate data. A basic triangle has three vertex coordinates. Here, the polygon vertex coordinate data includes vertex coordinates of L basic triangles. For example, (v0, v1, v2, v3, v4, v5, ..., v 3k 、v 3k+1 、v 3k+2 , . . . ) represent each element included in the polygon vertex coordinate data. K is an integer from 0 to L-1. V is the vertex coordinate. The vertex coordinate v can also be represented by coordinates such as (x, y) or by a position vector.

[0076] Hereinafter, polygon vertex coordinate data is recorded as in the array vertices[].

[0077] The element vertices[] of the array is represented by a floating point number. In addition, regarding the elements of the array, sometimes [] is omitted, such as simply recording the elements of the array vertices[] as vertices. The index (hereinafter, idx) is a variable used to specify the elements of the array, and here, 0≤idx≤L-1 is set as the range. That is, the elements vertices[3idx], vertices[3idx+1], vertices[3idx+2] of the array represent the vertex coordinates of a basic triangle specified by idx. 3idx, or 3*idx represents the product of 3 and idx. For example, the basic triangle specified by idx=0 is a basic triangle in which the vertex coordinates stored in the elements vertices[0], vertices[1], vertices[2] of the array (that is, specifically, the above-mentioned (v0, v1, v2)) are set as the vertices of the triangle.

[0078] In S110-S130, the computing device 20 determines a triangle in the basic triangle specified by the value stored in idx that is not the object triangle. The object triangle refers to a triangle having a shape that is relatively close to an equilateral triangle. A shape that is relatively close to an equilateral triangle refers to a shape that has a relatively large consistency with the equilateral triangle. The consistency with the equilateral triangle is represented by, for example, an aspect ratio. For the aspect ratio, 0≤aspect ratio≤1 is set as a range, and the aspect ratio of the equilateral triangle is 1. The larger the aspect ratio is relatively (i.e., the closer it is relatively to 1), the greater the consistency with the equilateral triangle. The object triangle may also be a triangle with a relatively large aspect ratio (i.e., relatively close to 1). Hereinafter, a triangle that is not an object triangle will also be referred to as a non-object triangle.

[0079] First, in S110 , the computing device 20 stores 0 in idx.

[0080] Next, in S115, the computing device 20 changes the storage order of the vertex coordinates in the array vertices[] to the descending order of the length of the opposite side for the basic triangle specified by the value stored in idx. That is, the vertex coordinates stored in the array elements vertices[3idx], vertices[3idx+1], and vertices[3idx+2] are rearranged to the descending order of the length of the opposite side. The opposite side refers to the side opposite to the vertex. Descending order means arranging from the longest to the shortest.

[0081] For example, Figure 5 Represents a basic triangle specified by idx=k. Figure 6 represents the elements of the array before rearrangement. That is, assuming that the vertex coordinates stored in the element vertices[3k] of the array are v 3k, the vertex coordinates stored in the array element vertices[3k+1] are v 3k+1 , the vertex coordinates stored in the array element vertices[3k+2] are v 3k+2 .

[0082] First, the computing device 20 calculates the vertex coordinate v based on the vertex coordinates. 3k The length of the opposite side a of the vertex represented by the vertex, the vertex coordinate v 3k+1 The length of the opposite side b of the vertex represented by 3k+2 The length of the opposite side c of the vertex represented by . Furthermore, the computing device 20 determines the order of the length of the opposite side a, the opposite side b, and the opposite side c (i.e., the descending order of the length). Figure 5 In the example of , the lengths of the opposite sides are c>b>a. The computing device 20 rearranges the order of the vertices so that the vertices corresponding to the determined order of the lengths of the opposite sides (ie, c>b>a) are arranged in sequence.

[0083] Therefore, after rearrangement, Figure 7 As shown, as the element of the array vertices[3k], v is stored 3k+1 , as the element of the array vertices[3k+1], storing v 3k+2 , as the element of the array vertices[3k+2], storing v 3k That is, the vertex coordinates are rearranged so that the lengths of the opposite sides are in descending order.

[0084] Next, in S120, the computing device 20 determines whether the basic triangle specified by the value stored in idx is the above-mentioned target triangle. Here, in the present embodiment, when the maximum value of the internal angle is less than the predetermined allowable angle, the computing device 20 determines it as a target triangle. On the other hand, when the maximum value of the internal angle is greater than the allowable angle, the computing device 20 determines it as a non-target triangle. In the present embodiment, the allowable angle is 120°. In addition, the allowable angle is not limited to 120°, and may be any angle within a specified range including 120°.

[0085] As described above, the vertex coordinates of the basic triangle specified by the value stored in idx are rearranged in the array vertices[] in descending order of the length of the opposite side. That is, among the array elements vertices[3idx], vertices[3idx+1], and vertices[3idx+2], the vertex coordinates stored in the first array element vertices[3idx] represent the vertex with the largest internal angle.

[0086] The computing device 20 uses the cosine theorem, i.e., c 2 =a2 +b 2 -2abcosθ, calculate θ as the angle representing the maximum value of the internal angle. Here, c is the length of the opposite side of the vertex with the largest internal angle, and a and b are the lengths of the remaining sides. The opposite side of the vertex with the largest internal angle refers to the opposite side of the vertex represented by the vertex coordinates stored in the element vertices[3idx] of the array, which is the first of the three vertex coordinates. The remaining sides refer to the opposite sides of the vertices represented by the vertex coordinates stored in the elements vertices[3idx+1] and vertices[3idx+2] of the array.

[0087] The array flag[idx] indicates the value of the flag associated with the basic triangle specified by the value stored in idx. Here, when the computing device 20 determines that the basic triangle is an asymmetric triangle, that is, when the maximum value θ of the internal angle is determined to be greater than the allowable angle, 1 is stored in the array flag[idx]. On the other hand, when the computing device 20 determines that the basic triangle is a symmetric triangle, that is, when the maximum value of the internal angle is determined to be less than the allowable angle, 0 is stored in the array flag[idx].

[0088] In S125, the calculation device 20 increments idx by 1. That is, the calculation device 20 adds 1 to the value stored in idx and stores the value in idx.

[0089] In S130, the computing device 20 determines whether the value stored in idx is greater than L. Here, the computing device 20 transfers the process to S135 when it is determined to be greater than L. On the other hand, the computing device 20 transfers to S115 when it is determined to be less than L, and repeats the processes of S115-S130 until idx is greater than L.

[0090] In S135, the computing device 20 stores the cumulative sum of the array elements flag[] in the array scan[idx] specified by the value stored in idx. The cumulative sum of the array elements flag[] here refers to the sum of the values ​​of the array elements flag[0] to flag[idx].

[0091] For example, the value stored as the element flag[0] of the array is stored as the element scan[0] of the array, and the sum (i.e., cumulative sum) of the value stored as the element flag[0] of the array and the value stored as the element flag[1] of the array is stored as the element scan[1] of the array. Thus, when the value stored in idx is L-1, the total number of non-object triangles among the L basic triangles is stored as the element scan[L-1] of the array.

[0092] In S140 to S165, the computing device 20 divides the basic triangle determined as a non-target triangle in S120 into a plurality of (for example, two in the present embodiment) triangles so as to have a relatively large degree of consistency with the equilateral triangle.

[0093] First, in S140 , the computing device 20 stores 0 in idx.

[0094] In S145, the computing device 20 determines whether the basic triangle specified by the value stored in idx is a target triangle or a non-target triangle. Here, when the value of flag[idx] stored as an element of an array is 1, the computing device 20 determines that it is a non-target triangle and transfers the process to S150. On the other hand, when the value of flag[idx] stored as an element of an array is 0, the computing device 20 determines that it is a target triangle and transfers the process to S160.

[0095] In S150 , the computing device 20 divides the basic triangle specified by the value stored in idx into two by the bisector of the internal angle indicating the maximum value so that the divided triangles have a relatively high degree of consistency with the equilateral triangle.

[0096] As described above, in the basic triangle specified by the value stored in idx, the vertex represented by the vertex coordinates stored in the element vertices[3idx] of the array represents the vertex with the largest internal angle. Figure 8 As shown, from the vertex with the largest internal angle (for example, vertex coordinate v 3k+1 ) is a dividing line DL drawn toward the opposite side (for example, side c) as a bisector of the interior angle, the intersection of the dividing line DL and the opposite side c is set as point M. The opposite side c is divided into m:n=a:b by point M. The computing device 20 calculates the coordinates of point M based on equation (1).

[0097] [Formula 1]

[0098]

[0099] Here, the computing device 20 stores the vertex coordinates stored in the element vertices[3idx] of the array in the segmented triangle (i.e., Figure 8 v 3k+1 ), the vertex coordinates stored in the element vertices[3idx+1] of the array (i.e., v 3k+2 ), the coordinates of point M are stored as array elements vertices[3idx], vertices[3idx+1], and vertices[3idx+2] respectively.

[0100] On the other hand, the computing device 20 stores the vertex coordinates (i.e., the coordinates of the vertices[idx] in the divided triangle) in the array element vertices[idx]. Figure 8 v 3k+1 ), the vertex coordinates stored in the element vertices[idx+2] of the array (i.e., v 3k ), the coordinates of point M are used as the vertex coordinates of the new basic triangle and appended to the end of the array vertices[].

[0101] Specifically, the computing device 20 stores the value obtained by adding the value stored in idx at the end of the designated array vertices[], i.e., L-1, to the value stored in the element scan[idx] of the array in the variable aidx. aidx = (L-1) + scan[idx]. Furthermore, the vertex coordinates stored in the element vertices[3idx] of the array (i.e., v) are added to the vertex of the basic triangle designated by aidx as idx. 3k+1 ), the vertex coordinates stored in the element vertices[3idx+2] of the array (i.e., v 3k ), the coordinates of point M are stored as array elements vertices[3aidx], vertices[3aidx+1], and vertices[3aidx+2] respectively. Thus, the vertex coordinates of the new basic triangle are appended to the end of the array vertices[].

[0102] In addition, the computing device 20 may also make the array storing the vertex coordinates of the divided triangles reverse to the above. That is, in the above example, the vertex coordinates v 3k+1 , vertex coordinates v 3k The coordinates of point M are stored as the array elements vertices[3idx], vertices[3idx+1], and vertices[3idx+2] respectively. 3k+1 , vertex coordinates v 3k+2 , and the coordinates of point M are stored as array elements vertices[3aidx], vertices[3aidx+1], and vertices[3aidx+2] respectively.

[0103] In S160 , the calculation device 20 increments idx by 1. That is, the calculation device 20 adds 1 to the value stored in idx and stores the value in idx.

[0104] In S165, the computing device 20 determines whether the value stored in idx is greater than L. Here, the computing device 20 transfers the process to S170 when it is determined to be greater than L. On the other hand, when the computing device 20 determines that it is less than L, the processing is transferred to S145, and the processing of S145-S165 is repeated until idx becomes greater than L.

[0105] In S170-S185, the computing device 20 again rearranges the vertex coordinates stored in the elements vertices[3idx], vertices[3idx+1], and vertices[3idx+2] of the array so that the lengths of the opposite sides are in descending order for the basic triangle specified by the value stored in idx. In addition, in S170-S185, idx is set to a range of 0≤idx≤P. P is the value stored as (L-1)+the element scan[L-1] of the array. The processing of S170, S175, and S180 is the same as S110, S115, and S125, respectively.

[0106] In S185, when the calculation device 20 determines that idx is greater than or equal to P, the pre-shaping process ends.

[0107] Thus, in the array vertices[], the vertex coordinates of the basic triangles whose maximum internal angle is less than 120° are stored in sequence.

[0108] <Action>

[0109] use Fig. 9 as well as Fig.10 The operation of the pre-shaping process will be described. Fig. 9 This shows an example in which vertices[] contains the vertex coordinates of 10 basic triangles (ie, L=10). Fig.10 Represents the array vertices[], array flag[], array scan[]. In addition, Fig.10 In the array vertices[], the value stored in the array vertices[3idx] is recorded as vert[0], the value stored in the array vertices[3idx+1] is recorded as vert[1], and the value stored in the array vertices[3idx+2] is recorded as vert[2].

[0110] In S115, the computing device 20 rearranges the vertices in the basic triangle so that the lengths of the opposite sides are in descending order. Fig.10 As shown, in the array vertices[] (i.e., vert[0] to vert[2]), the coordinates of each vertex are stored such as v0, v1, v2,...

[0111] In S120, the computing device 20 determines non-target triangles. Fig.10 As shown, the basic triangles specified by idx=3, 5, 8, 9 are determined as non-object triangles, and 1 is stored as the elements flag[3], [5], [8], [9] of the array.

[0112] In S135, the computing device 20 determines the cumulative sum of flag[]. Fig.10 As shown, 1 is stored as an element of the array scan[3] specified by idx=3, and the accumulated value, that is, 4, is stored as an element of the array scan[9] specified by idx=9.

[0113] In S150, the computing device 20 divides the basic triangles specified by idx=3, 5, 8, and 9 that are determined to be non-object triangles, and updates the array vertices[]. For example, the basic triangle specified by idx=5 is divided by the dividing line DL into a triangle with v15, v16, and point M5 as vertex coordinates and a triangle with v15, v17, and point M5 as vertex coordinates. The value obtained by adding 9 (i.e., the value representing L-1) to the value stored in the element scan[5] of the array, i.e., 2, is 11.

[0114] Here, v15, v16, and point M5 are stored as elements of the array vertices[3*5][3*5+1][3*5+2]. That is, v15, v16, and point M5 are stored as elements of the array vert0[5], array element vert1[5], and array element vert2[5] in the basic triangle specified by idx=5. On the other hand, v15, v17, and point M are stored as elements of the array vertices[3*11][3*11+1][3*11+2]. That is, v15, v16, and point M5 are stored as elements of the array vert0

[11] , array element vert1

[11] , and array element vert2

[11] in the basic triangle specified by the new idx (i.e., aidx)=11.

[0115] In S175, the computing device 20 again rearranges the vertices in the basic triangle so that the lengths of opposite sides are in descending order. Thus, although not shown, in the new array vertices[], the coordinates of each vertex are stored in descending order of the lengths of opposite sides in the basic triangle specified by the value stored in idx.

[0116] [1-2-2. Overview of multi-level segmentation]

[0117] based on Fig.11 The flowchart shown, and Figure 12 to Figure 14 The outline of the multi-level division performed by the arithmetic device 20 in S12 will be described. Figure 12 to Figure 14 The triangle shown represents a basic triangle defined by the vertex coordinates included in the above array vertices[]. In this embodiment, due to the pre-shaping as described above, the basic triangles defined by the vertex coordinates included in the array vertices[] have shapes that are relatively consistent with regular triangles.

[0118] <Name>

[0119] First, the names of line segments and vertices in a basic triangle are explained.

[0120] The first main line is like Fig.12 The first main line l0 is the longest side in the basic triangle and is the side opposite to the internal angle IA having the largest angle in the basic triangle. In the basic triangle specified by the value stored in idx, the side connecting the vertex represented by the vertex coordinates stored in the element vertices[3idx+1] of the array and the vertex represented by the vertex coordinates stored in vertices[3idx+2] is equivalent to the first main line l0.

[0121] The second main line is like Fig.12 The second main line l1 shown in FIG. 1 is the second longest side in the basic triangle and is the opposite side having an internal angle that is smaller than the maximum angle in the basic triangle. In the basic triangle specified by the value stored in idx, the side connecting the vertex represented by the vertex coordinates stored in the element vertices[3idx] of the array and the vertex represented by the vertex coordinates stored in vertices[3idx+2] is equivalent to the second main line l1.

[0122] The third main line is like Fig.12 The side connecting the vertex represented by the vertex coordinates stored in the element vertices[3idx] of the array and the vertex represented by the vertex coordinates stored in vertices[3idx+1] in the basic triangle specified by the value stored in idx is equivalent to the third main line l2.

[0123] In addition, in the basic triangle, vertex A is also B Base Point A B . Base point A B It refers to the vertex that is the intersection of the first main line l0 and the second main line l1. R It is called right vertex A R . Right vertex AR It refers to the vertex that is the intersection of the first main line l0 and the third main line l2. L It is called right vertex A L . Left vertex A L It refers to the vertex that becomes the intersection point of the second main line l1 and the third main line l2.

[0124] <Operator>

[0125] Operators used in the following description are described.

[0126] As an operator, floor(a) is a function that returns the largest integer less than a. Ceil(a) is a function that returns the smallest integer greater than a. Mod(a, b) is a function that returns the remainder when a is divided by b. a / b means a divided by b. In addition, float(a) means a represented by a floating point number. Here, when a and b are integers, a / b returns the value obtained by discarding the remainder from the result of the division. For example, 5 / 2=2. On the other hand, when both a and b are floating point numbers, the result of the a / b division is, for example, 5.0 / 2.0=2.5.

[0127] <Overview of the treatment>

[0128] First, in S21, the computing device 20 performs main line processing. In the main line processing, the computing device 20 calculates the number of main divisions (e.g., M) in each basic triangle. M is an integer of M≥1. The number of main divisions is the number of divisions when the first main line (e.g., based on a predetermined division length d0) is equally divided in each basic triangle. The equal division mentioned here includes more than two divisions and one division.

[0129] The first main line points are a plurality of (for example, M+1) points located at positions where the first main line 10 is equally divided by the number of main divisions. The first main line points include the two end points of the first main line 10 (i.e., the base point A B and the right vertex A R ). That is, the points on the first main line l0 include at least two first main line points. The number of points on the first main line referred to below refers to the number of first main line points on the first main line (for example, the M+1 points mentioned above). Fig.12 , an example is shown in which four first main line points are included on the first main line 10 in the basic triangle. In addition, maj_vert_num described later corresponds to the number of first main line points.

[0130] Next, in S22, the computing device 20 performs branch line processing. In the branch line processing, the computing device 20 sets the number of sub-divisions (for example, N) for each of the plurality of first main line points set on the first main line l0. N is an integer of N ≥ 0. The number of sub-divisions is the number of divisions when the set branch line (for example, based on the above-mentioned division length d0) is equally divided for each of the plurality of first main line points. The equal division mentioned here includes more than two divisions, 1 division, and 0 divisions.

[0131] The branch line is a line segment that passes through the upper point of the first main line and runs from the first main line l0 to the second main line l1 and along the third main line l2. The line segment along the third main line l2 refers to a line segment parallel to the third main line l2, and the line segment along the third main line l2 also includes the third main line l2 itself. In the branch line, the line segment along the third main line l2 and the base point A which is the upper point of the first main line is B The set line segment also includes the third main line l2 itself.

[0132] exist Fig.13 In the example, the basic triangle has four branches (i.e., ml0 to ml3) respectively set for the four first main line points. The number of sub-divisions of ml0 is 0, the number of sub-divisions of ml1 is 1, the number of sub-divisions of ml2 is 2, and the number of sub-divisions of ml3 is 3. The computing device 20 calculates the coordinates of the first main line point and the second main line point. In addition, as described above, Fig.13 In the example, ml3 is the third main line l2, which is also a branch line.

[0133] Next, in S23, the computing device 20 performs fine segmentation processing. In the fine segmentation processing, the computing device 20 uses the array vertices[] after the above-mentioned pre-shaping as the vertex coordinate group, the above-mentioned main segmentation number, and the combination information to calculate the coordinates of the vertices of the fine segmentation triangles for each branch line pair set for the above-mentioned first main line upper point. The combination information is information that specifies the combination method of the branch line points belonging to each fine segmentation triangle.

[0134] The branch line point refers to a point that includes the two end points of the branch line and divides the branch line into equal parts (for example, N+1) as described above. The two end points of the branch line refer to the points on the first main line and the second main line located at the two ends of the branch line. The branch line point number mentioned below refers to the number of branch line points on the branch line (for example, the above-mentioned N+1). The main vert num described below is equivalent to the branch line point number.

[0135] The following describes an overview of branch line pairs, the number of finely divided triangles in the branch line pairs, and combination information.

[0136] <About branch line pairs>

[0137] A branch line pair refers to a combination of any two adjacent branches among the branches. A finely divided triangle refers to one or more triangles that divide the area of ​​the basic triangle sandwiched by the branch line pair into non-repeating vertices using the points on the two branches belonging to the branch line pair as vertices. Hereinafter, the area of ​​the basic triangle sandwiched by the branch line pair is also referred to as the area sandwiched by the branch line pair.

[0138] In addition, the branch lines set for the first main line points are also referred to as reference branch lines. B The side adjacent branch line is called the adjacent branch line. That is, the branch line pair is a combination of the base branch line and the adjacent branch line. In addition, the fine segmentation triangle is one or more triangles that divide the area sandwiched by the branch line pair with the branch line points on the base branch line belonging to the branch line pair and the branch line points on the adjacent branch line as vertices without duplication.

[0139] exist Fig.13 In the example, the two end points of the branch line are points on the first main line l0 and points on the second main line l1. For example, for the above four branches (i.e., ml0 to ml3), ml0 has one branch line end point (i.e., min_vert_num=1 described later), ml1 has two branch line end points (i.e., min_vert_num=2). ml2 has three branch line end points (i.e., min_vert_num=3), and ml3 has four branch line end points (i.e., min_vert_num=4). Set at base point A B The branch line ml0 has a branch line point (i.e., base point A B ).

[0140] exist Fig.13 In the example, for the right vertex A as a point on the first main line R , for the right vertex A R Set the branch line ml3 to the right vertex A R Base point A B The branch line ml2 set for the first main line upper point (hereinafter also referred to as point A2) adjacent to the side is a branch line pair. In this branch line pair, ml3 is equivalent to the reference branch line, and ml2 is equivalent to the adjacent branch line. For point A2, which is the upper point of the first main line, the branch line ml2 (i.e., the reference branch line) set for point A2 is the same as the base point A2 set for point A2. B The branch line ml1 (i.e., the adjacent branch line) set for the point adjacent to the side (hereinafter also referred to as point A1) is a branch line pair. Similarly, for point A1 which is a point on the first main line, the branch line ml1 (i.e., the reference branch line) set for point A1 and the base point A1 set for point A1 are B The point adjacent to the side (i.e., the base point A B ) sets the branch line ml0 (i.e., the adjacent branch line) as a branch line pair.

[0141] In addition, in the basic triangle, away from the base point A B Starting from the first main line, head towards the base point A B In this embodiment of setting the branch line pair, for the base point A which is the top point of the first main line B The branch line you set is not set as the reference branch line. Fig.13 As shown, the number of branch line pairs set in the basic triangle as an example is three.

[0142] <About the number of subdivided triangles in branch line pairs>

[0143] For example, for the right vertex A as the point on the first main line mentioned above R , for the right vertex A R The triangle formed by the branch line pair consisting of the set branch line ml3 and the adjacent branch line ml2 without overlapping each other is a fine segmentation triangle. In the segmentation, the points on the two branches ml3 (i.e., the reference branch line) and ml2 (i.e., the adjacent branch line) belonging to the branch line pair are set as the vertices of the fine segmentation triangle. In the above example, Fig.13 As shown, for example, for the right vertex A R The number of finely divided triangles used to divide the basic triangle region sandwiched between the set reference branch line ml3 and the adjacent branch line ml2 is calculated to be five.

[0144] In addition, each of the finely divided triangles that divide the area of ​​the basic triangle sandwiched by the branch line pair can also be individually identified by an intra-area identification number (i.e., tess_prim_idx described later). The intra-area number can be a number assigned to each of the finely divided triangles that divide the area sandwiched by the branch line pair, and is a number that starts from the first main line side (i.e., 0) and increases as it moves away from the first main line. For example, in Fig.14 The underlined numbers in the table are equivalent to the identification numbers within the area. Fig.13 As shown, for the right vertex A R The subdividing triangles that divide the area sandwiched between the set reference branch line ml3 and the adjacent branch line ml2 are assigned area identification numbers such as 0, 1, 2, 3, and 4 in order from the first main line side.

[0145] <About group information>

[0146] The combination information specifies the combination of points on the branch lines belonging to each subdivided triangle. The details will be described later, but the combination information specifies the combination of points on the main line belonging to each subdivided triangle in order from the subdivided triangle on the first main line side.

[0147] For example, in the branch line pair of the reference branch line ml3 and the adjacent branch line ml2, first, for the first subdivided triangle when viewed from the first main line, the combination information specifies the combination method of the points on the branch line as follows. The first subdivided triangle when viewed from the first main line refers to the subdivided triangle with the identification number = 0 in the region. That is, the first one is set as the branch line point on ml3 and is the first branch line point when viewed from the first main line. The second one is set as the branch line point on ml2 and is the first branch line point when viewed from the first main line. The third one is set as the branch line point on ml3 and is the second branch line point when viewed from the first main line.

[0148] In addition, for the second subdividing triangle when viewed from the first main line, the combination information specifies the combination method of the branch line points as follows. The second subdividing triangle when viewed from the first main line refers to the subdividing triangle with the identification number = 1 in the region. That is, the first is set as the branch line point on ml2 and is the first branch line point when viewed from the first main line. The second is set as the branch line point on ml3 and is the second branch line point when viewed from the first main line. The third is set as the branch line point on ml2 and is the second branch line point when viewed from the first main line.

[0149] For the third subdivided triangle when viewed from the first main line, the combined information is the same as the first subdivided triangle, that is, the image becomes the base point A B The combination of branch line points is specified like a triangle protruding from the side. The third subdividing triangle when observed from the first main line refers to the subdividing triangle with identification number = 2 in the area. That is, the first is set to the branch line point on ml3 and is the second branch line point when observed from the first main line. The second is set to the branch line point on ml2 and is the second branch line point when observed from the first main line. The third is set to the branch line point on ml3 and is the third branch line point when observed from the first main line. At this time, the first specified branch line point is set to the branch line point adjacent to the first specified branch line point in the first subdividing triangle in the direction along the branch line (that is, the direction away from the first main line).

[0150] For the fourth subdivided triangle when viewed from the first main line, the combined information is the same as the second subdivided triangle, that is, the image becomes the direction to the base point A. BThe combination of points on the branch line is specified like a triangle protruding on the opposite side. The fourth subdivided triangle when observed from the first main line refers to the subdivided triangle with identification number = 3 in the area. That is, the first one is set as the branch line point on ml2 and is the second branch line point when observed from the first main line. The second one is set as the branch line point on ml3 and is the third branch line point when observed from the first main line. The third one is set as the branch line point on ml2 and is the third branch line point when observed from the first main line. At this time, the first specified branch line point is set as the branch line point adjacent to the first specified branch line point in the second subdivided triangle in the direction along the branch line (that is, the direction away from the first main line). The same applies to the following.

[0151] That is, combined information such as Fig.14 As shown in the dashed line with an arrow, the combination of points on the branch line is specified for each branch line pair. In other words, the combination information may be, for example, a combination of points on the branch line when the identification number in the area is an even number, such as a combination of points on the branch line toward the base point A. B The combination of points on the branch line can be specified as a triangle with a convex side (hereinafter also referred to as the first specified pattern). In addition, when the identification number in the area is an odd number, it can also be specified as a triangle toward the base point A. B The combination of points on the branch line is specified like a triangle protruding on the opposite side of the rim (hereinafter also referred to as the second specified pattern).

[0152] The points on the branch lines can be identified by the main division point identification number (i.e., maj_div_idx) and the sub-division point identification number (i.e., mai_div_idx) described later. The combination information, as described later, identifies the subdivision triangle that divides the area between the branch line pair by the intra-area identification number, and specifies the combination of the points on the branch lines belonging to the identified subdivision triangle based on the main division point identification number and the sub-division identification number. In addition, as described later, the combination information may specify the combination of the points on the branch lines belonging to the subdivision triangle based on the displacement of the main division point identification number and the displacement of the sub-division point identification number.

[0153] In this embodiment, the computing device 20 generates combination information that specifies the combination method of the branch line points belonging to the fine segmentation triangle as described above. The computing device 20 uses the vertex coordinate group, the main segmentation number, and the combination information to calculate the coordinates of the vertices of the fine segmentation triangle for each branch line pair set for the first main line points. The computing device 20 generates fine segmentation triangles in all basic triangles, in other words, in all first main line points, and ends the multi-level segmentation.

[0154] [1-2-3. Details of multi-level segmentation]

[0155] Specifically, the details of multi-level segmentation will be described.

[0156] (1) Mainline processing

[0157] based on Fig.15 The flowchart shown in the figure illustrates the main line processing performed in S21 of the multi-level segmentation. In this processing, the array vertices[] after the above-mentioned pre-shaping is performed is set as the input array, and the following array is output. The output array refers to the generated array (that is, the values ​​are stored in the elements of the array). The output array is also called the output array. The output array is the array prim_id[idx], the array maj_vert_num[idx], and the array csum_maj_vert_num[idx].

[0158] Here, the variable idx (hereinafter, referred to as idx) has a range of 0≤idx≤P-1. The total number of idx used in this process is equal to the total number of basic triangles defined by the vertex coordinates stored in the array vertices[] (hereinafter, also referred to as the number of basic triangles P). In addition, for the sake of distinction, the idx used in the main line processing is also referred to as idx_p.

[0159] <Description of each array>

[0160] The array prim_id[idx] is an array that stores values ​​equivalent to identification numbers (hereinafter also referred to as basic IDs) for identifying basic triangles, respectively, for the basic triangles defined by the vertex coordinates stored in the array vertices[]. The array maj_vert_num[idx] is an array that stores the number of points on the first main line described above for the basic triangle specified by idx. In addition, in the following, similar to the description of multi-level segmentation, the elements of the array are described as prim_id only.

[0161] In addition, the element vertices[] of the array is represented by a floating point number, the element prim_id[] of the array is represented by an integer greater than 0, and the element maj_vert_num[] of the array is represented by a positive integer.

[0162] <Processing>

[0163] First, in S200 , the computing device 20 stores 0 in idx.

[0164] Next, in S210, the computing device 20 sets the basic triangle number P. The computing device 20 stores the number of basic triangles defined by the vertex coordinates stored in the array vertices[] after the pre-shaping process is performed in the basic triangle number P. The basic triangle number P corresponds to the number of loops (i.e., the number of iterations) of the process of S220 to S260 described later.

[0165] First, in S220 , the computing device 20 stores the value stored in idx in the array prim_id[idx]. For example, if idx=0, 0 is stored as the element prim_id[0] of the array, and 0 is set as the basic ID of the first basic triangle defined by the array vertices[].

[0166] Next, in S230 , the computing device 20 obtains the vertex coordinates of the basic triangle specified by the value stored in idx, that is, the computing device 20 obtains the elements vertices[3idx], vertices[3idx+1], and vertices[3idx+2] of the array.

[0167] In the next S240, the computing device 20 calculates the number of points on the first main line for the basic triangle specified by the value stored in idx. Fig.12 As shown, the points on the first main line include the vertices A at both ends of the first main line l0. B , A R .

[0168] The computing device 20 calculates the number of points on the first main line based on equation (2), and stores the calculated value in the array maj_vert_num[idx].

[0169] [Formula 2]

[0170] maj_vert_num[idx] = ceil(length of the longest side of the triangle / division length)+1…(2)

[0171] The first term in formula (2) is equivalent to the above-mentioned number of main divisions. That is, the operation device 20 calculates the value obtained by dividing the length of the first main line by the division length d0, rounds the calculated value to the value closest to the calculated value, and calculates the value obtained by adding 1 to the rounded value as the number of points on the first main line. Since the rounded value is used, the interval between the points on the first main line becomes a length equivalent to the division length d0. The length equivalent to the division length d0 may not be a length strictly consistent with the division length d0, but a length within a specified range including the division length d0. The division length d0 may also be pre-stored in a memory such as ROM23. The division length d0 is a value that can be appropriately set according to the application (for example, the accuracy required for computer graphics, etc.). Through formula (2), the number of points on the first main line is calculated as an integer greater than 2.

[0172] The length of the first main line is calculated based on the vertex coordinates stored in the elements vertices[3idx+1] and vertices[3idx+2] of the array. For example, if the value stored in idx is 0, then for the basic triangle whose basic ID is 0 stored in the element prim_id[0] of the array, the value indicating the number of points on the first main line is stored as the element maj_vert_num[0] of the array.

[0173] Next, in S250 , the calculation device 20 increments idx by 1. That is, the calculation device 20 adds 1 to the value stored in idx and stores the value in idx.

[0174] In the next S260 , the computing device 20 determines whether the value stored in idx is greater than or equal to the basic triangle number P. Here, when the value stored in idx is greater than or equal to the basic triangle number P, the process proceeds to S270 .

[0175] On the other hand, when the value stored in idx is smaller than the basic triangle number P, the operation device 20 moves to S220 and repeats the processes of S220 to S260 based on the value stored in the new idx.

[0176] In S270, the computing device 20 may calculate the total number of array elements maj_vert_num[idx] by varying idx by 1 in the range of 0≤idx≤P-1, and store the calculated total number in csum_maj_vert_num[idx]. The total number of array elements maj_vert_num[idx] is the sum of array elements maj_vert_num[0] to maj_vert_num[idx].

[0177] The element csum_maj_vert_num[P-1] of the array when P-1 is stored in idx corresponds to the total number Q of first main line points included in all P basic triangles (hereinafter also referred to as cumulative sum Q). Then, the computing device 20 ends the main line processing.

[0178] <Action>

[0179] use Fig. 20 , Fig.29 , an example of the actions processed on the main line is explained. Fig. 20 In the example of the basic triangle number P = 3, the following is described. If the number of loops processed on the main line is equal to the value stored in the basic triangle number P as described above, then by repeating S220, the value is stored in the array prim_id[0] to prim_id[P-1] (for example, P = 2). Fig. 20 In the example, Fig.29 As shown, as the elements of the array prim_id[0] to prim_id[2], 0, 1, and 2 are stored respectively, and the basic IDs are set to 0, 1, and 2 in order from the first triangle.

[0180] In addition, by repeating S240, for example Fig. 20 As shown, for each basic triangle, the number of points on the first main line is calculated, as Fig.29 As shown, the elements of the array maj_vert_num[0] to maj_vert_num[2] store 4, 3, and 3 respectively.

[0181] In addition, by executing S270, as Fig.29 As shown, as the array elements csum_maj_vert_num[0] to csum_maj_vert_num[2], 4, 7, and 10 are stored respectively. That is, the value 10 stored as the array element csum_maj_vert_num[P-1] (for example, P=3) is calculated as the total number Q of points on the first main line of all basic triangles (that is, the cumulative sum Q).

[0182] In addition, hereinafter, the array prim_id[], the array maj_vert_num[], and the array csum_maj_vert_num[] are also collectively referred to as triangle parameter arrays.

[0183] (2) Processing on branch lines

[0184] based on Fig.16 The flowchart shown in the figure explains the branch line processing executed in S22 of the multi-level segmentation. In this processing, the array vertices[] and the above-mentioned triangle parameter array are set as input arrays, and the following arrays are set as output arrays.

[0185] The output arrays are array prim_lookup_idx[idx], array maj_div_idx[idx], array point_on_maj_line0[idx], array point_on_maj_line1[idx], array min_vert_num[idx], array prim_num_per_edge[idx], array csum_prim_num_per_edge[idx].

[0186] Here, the idx indicating the element of the array is set to the range of 0≤idx≤Q-1. The total number of idx used in this process is equal to the total number Q (i.e., the cumulative sum Q) of the points on the first main line contained in all basic triangles. In addition, for the sake of distinction, the idx used in the branch line processing is also recorded as idx_m below.

[0187] <Description of each array>

[0188] The array prim_lookup_idx[idx] is a so-called lookup table used to refer to the above-mentioned triangle parameter array when executing branch line processing. In other words, the array prim_lookup_idx[idx] is the correspondence information used to establish a correspondence between a first main line point specified by idx (i.e., idx_m) and the basic ID (i.e., idx_p) of the basic triangle containing the first main line point.

[0189] The array maj_div_idx[idx] stores the major division point identification number for the first main line point specified by the value stored in idx (ie, idx_m).

[0190] The array point_on_maj_line0[idx] stores a position vector for a first main line point specified by the value stored in idx (i.e., idx_m). The array point_on_maj_line1[idx] stores a position vector for a second main line point corresponding to the first main line point specified by the value stored in idx (i.e., idx_m). The second main line point is a point at a position where the second main line is equally divided at the same division ratio as the division ratio of the first main line.

[0191] The array min_vert_num[idx] stores the number of branch line points on the branch line set for the first main line point specified by the value stored in idx (ie, idx_m).

[0192] The array prim_num_per_edge[idx] stores, for the first main line point specified by the value stored in idx (ie, idx_m), the number of finely divided triangles used to divide the area sandwiched by the branch line pair set for the first main line point using the branch line point.

[0193] Furthermore, the array elements prim_lookup_idx[], maj_div_idx[], prim_num_per_edge[], and csum_prim_num_per_edge[] are represented as integers greater than 0. The array element min_vert_num[] is represented as a positive integer. The array elements point_on_maj_line0[] and point_on_maj_line1[] are represented by floating point numbers.

[0194] <Processing>

[0195] First, in S300 , the computing device 20 executes a prim_lookup_idx array generation process to generate an array prim_lookup_idx[idx].

[0196] In the prim_lookup_idx array generation process, such as Fig.17 As shown, first, in S400 , the arithmetic device 20 obtains the cumulative sum Q.

[0197] Next, in S401 , the computing device 20 stores 0 in idx.

[0198] In the next S402 , the computing device 20 stores the element maj_vert_num[idx] of the array in the variable rep_num. In addition, the computing device 20 stores the difference between the element csum_maj_vert_num[idx] of the array and the element maj_vert_num[idx] of the array in the variable ofs_idx.

[0199] Next, in S403 , the computing device 20 determines whether the value stored in rep_num is greater than 0. The computing device 20 shifts the process to S404 when the value stored in rep_num is greater than 0, and shifts the process to S408 when the value stored in rep_num is less than 0.

[0200] In S404 , the computing device 20 stores 0 in the variable m.

[0201] Next, in S405 , the calculation device 20 stores the value stored in idx as the element prim_lookup_idx[ofs_idx+m] of the array specified by “ofs_idx+m”.

[0202] In the next S406 , the computing device 20 increments the variable m by 1. That is, the computing device 20 stores the value obtained by adding 1 to the value stored in the variable m in the variable m.

[0203] Next, in S407, the computing device 20 determines whether the value stored in the variable m is greater than or equal to the value stored in rep_num. Here, if the value stored in the variable m is greater than or equal to the value stored in rep_num, the process proceeds to S408.

[0204] On the other hand, when the value stored in the variable m is smaller than the value stored in rep_num, the arithmetic device 20 moves to S405 and repeats the processes of S405 to S407 based on the value stored in the new variable m.

[0205] In S408 , the calculation device 20 increments idx by 1. That is, the calculation device 20 adds 1 to the value stored in idx and stores the value in idx.

[0206] Next, in S409 , the calculation device 20 determines whether the value stored in idx is equal to or greater than the cumulative sum Q. Here, if the value stored in idx is equal to or greater than the cumulative sum Q, the prim_lookup_idx array generation process ends.

[0207] On the other hand, if the value stored in idx is less than the cumulative sum Q, the computing device 20 transfers to S402 and repeats the processing of S402 to S409 based on the value stored in the new idx. If the value stored in idx is greater than the cumulative sum Q, the computing device 20 ends the prim_lookup_idx array generation processing.

[0208] return Fig.16 , continue the explanation.

[0209] In S310 , the computing device 20 stores 0 in idx.

[0210] Next, in S320, the calculation device 20 obtains the total number Q of points on the first main line (ie, the cumulative sum Q). The cumulative sum Q corresponds to the number of cycles (ie, the number of repetitions) of S350 to S380 described later.

[0211] First, in S330, the computing device 20 calculates a main dividing point identification number for the first main line point specified by the value stored in idx. The main dividing point identification number is a number assigned to each first main line point in the basic triangle containing the first main line point specified by idx. In this embodiment, the main dividing point identification number is a base point A which is a vertex of the basic triangle and connects the first main line and the second main line. B From the beginning, the base point A B The numbering starts from 0, starting from the base point A B Towards right vertex A B The calculation device 20 stores the calculated main division point identification number in the array maj_div_idx[idx]. The main division point identification number, that is, the element maj_div_idx[idx] of the array is calculated based on equations (3) and (4).

[0212] [Formula 3]

[0213] lookup_idx=prim_lookup_id[idx]…(3)

[0214] maj_div_idx[idx]=idx-csum_maj_vert_num]lookup_idx+maj_vert_num[lookup_idx]…(4)

[0215] The lookup_idx shown in formula (3) corresponds to an index (ie, idx_p) for specifying a triangle parameter array to be referenced.

[0216] Next, in S340, the computing device 20 calculates a position vector for the first main line point specified by the value stored in idx, and stores it in the array point_on_maj_line0[idx]. In addition, the computing device 20 calculates a position vector for the second main line point corresponding to the first main line point specified by the value stored in idx, and stores it in the array point_on_maj_line1[idx]. The correspondence here refers to the position vector from the base point A to the second main line point corresponding to the first main line point specified by the value stored in idx. B The counting order is the same.

[0217] The coordinates of the point on the first main line are calculated by dividing the first main line at a ratio of maj_div_idx[idx] / maj_vert_num[idx]. The coordinates of the point on the second main line are also calculated by dividing the second main line at a ratio of maj_div_idx[idx] / maj_vert_num[idx]. In addition, the point on the first main line specified by the value stored in idx is the base point A. BIn this case, the coordinates of a point on the first main line are consistent with the coordinates of a point on the corresponding second main line.

[0218] First, similarly to the above-mentioned formula (3), the calculation device 20 calculates lookup_idx.

[0219] Next, the computing device 20 converts the base point A to B The coordinates of are stored in the variable org.

[0220] [Formula 4]

[0221] org=verices[3*lookup_idx+2]…(5)

[0222] Next, the calculation device 20 calculates the edge vector edge0 of the first main line which is the longest side and the edge vector edge1 of the second main line which is the second longest side based on equations (6) and (7).

[0223] [Formula 5]

[0224] edge0=vertices[3*lookup_idx+1]-vertices[3*lookup_idx+2]…(6)

[0225] edge1=vertices[3*lookup_idx+0]-vertices[3*lookup_idx+2]…(7)

[0226] Furthermore, the computing device 20 calculates the base point A based on equation (8). B (i.e., the shortest side, i.e., the third main line, is set as the vertex of the opposite side) as a reference to calculate the coordinates of the point on the first main line and store them in the array point_on_maj_line0[idx]. Similarly, the computing device 20 calculates the coordinates of the point on the first main line based on equation (9) with the base point A B The coordinates of the points on the second main line are calculated based on the value and stored in the array point_on_maj_line1[idx].

[0227] [Formula 6]

[0228] point_on_maj_line0[idx]=org+((float)maj_div_idx / (float)(maj_vert_num-1))*edge0

[0229] …(8)

[0230] point_on_maj_line1[idx]=org+((float)maj_div_idx / (float)(maj_vert_num-1))*edge1

[0231] …(9)

[0232] In the next S350, the computing device 20 calculates the number of points on the branch line set for the first main line point specified by the value stored in idx. The computing device 20 stores the calculated number of points on the branch line in the array min_vert_num[idx]. The length of the branch line is calculated based on the array element point_on_maj_line0[idx] and the array element point_on_maj_line1[idx]. That is, the array element min_vert_num[idx] is calculated by the following formula (10) in the same way as the above-mentioned array maj_vert_num[idx].

[0233] [Formula 7]

[0234] min_vert_num[idx]=ceil((point_on_maj_line1[idx]-point_on_maj_line0[idx]) / division length)+1

[0235] …(10)

[0236] The first term in the formula (10) corresponds to the above-mentioned number of sub-divisions. In addition, among the first main line points specified by the value stored in idx, the first main line point whose element maj_dev_idx[idx] of the array is 0 corresponds to the base point A. B For base point A B , and store 1 as the element min_vert_num[idx] of the array.

[0237] In the next S360, the computing device 20 calculates the number of finely divided triangles that divide the area between the branch line pairs for each branch line pair set for the first main line point specified by the value stored in idx. The computing device 20 stores the calculated number in the array prim_num_per_edge[idx].

[0238] In addition, the reference branch line point mentioned below refers to the branch line point on the reference branch line. The adjacent branch line point refers to the branch line point on the adjacent branch line. That is, the adjacent branch line point refers to the branch line (i.e., the reference branch line) set for the first main line specified by the value stored in idx, which is adjacent to the base point A. BIn the present embodiment, of the two branch lines forming a pair, the branch line set for the first main line point with a larger maj_div_idx is set as the reference branch line.

[0239] In the area of ​​the basic triangle sandwiched between the reference branch and the adjacent branch pair, the number of vertices constituting the subdivided triangles is the sum of the points on the reference branch and the points on the adjacent branch. Note that when 0 is stored in idx, the number of subdivided triangles that divide the area sandwiched by the branch pair is calculated based on formula (11). The calculated value is stored in the array prim_per_edge[idx].

[0240] [Formula 8]

[0241] if(idx==0){

[0242] prim_num_per_edge[idx]=0;

[0243] }

[0244] else{

[0245] prim_num_per_edge[idx]=min_vert_num[idx]+min_vert_num[idx-1]-2;

[0246] }…(11)

[0247] Next, in S370 , the computing device 20 increments idx by 1. That is, the computing device 20 adds 1 to the value stored in idx and stores the value obtained by adding 1 to idx.

[0248] In the next S380 , the calculation device 20 determines whether the value stored in idx is equal to or greater than the cumulative sum Q. Here, when it is determined that the value stored in idx is equal to or greater than the cumulative sum Q, the process proceeds to S390 .

[0249] On the other hand, when it is determined that the value stored in idx is smaller than the cumulative sum Q, the calculation device 20 proceeds to S330 and repeats the processes of S330 to S380 based on the value stored in the new idx.

[0250] In S390, the computing device 20 may, for example, change idx by 1 in the range of 0≤idx≤Q-1, calculate the total number of array elements prim_num_per_edge[idx], and store the calculated total number in the array csum_prim_num_per_edge[idx]. The total number of array elements prim_num_per_edge[idx] refers to the sum of array elements prim_num_per_edge[0] to prim_num_per_edge[idx].

[0251] The element csum_prim_num_per_edge[Q-1] of the array when Q-1 is stored in idx is equivalent to the total number R of finely divided triangles (hereinafter also referred to as cumulative sum R) that divide the area sandwiched by the branch line pairs set for all Q first main line points. In other words, the cumulative sum R is the total number of finely divided triangles included in all basic triangles (i.e., P). The computing device 20 ends the branch line processing.

[0252] <Action>

[0253] use Figure 20 to Figure 22 , Fig.24 , Fig.29 The operation of the branch line processing is described below. If the number of loops is the cumulative sum Q as described above, then through S300, the values ​​are stored in the elements prim_lookup_idx[0] to prim_lookup_idx[Q-1] of the array. For example, Fig.21 As shown in , if Q = 10 and the first main line point is configured, then Fig.24 , Fig.29 As shown, as the elements of the array prim_lookup_idx[0] to prim_lookup_idx[9], 0, 0, 0, 0, 1, 1, 1, 2, 2, 2 are stored respectively. That is, for the first main line point, the index when referencing the triangle parameter array (that is, the basic ID) is stored respectively.

[0254] In addition, by repeating S330, as Fig.21 , Fig.29 As shown, the elements of the array maj_div_idx[0] to maj_div_idx[9] store 0, 1, 2, 3, 0, 1, 2, 0, 1, 2, respectively. That is, for each basic triangle, the base point A is respectively set to the first main line point. B Set it to 0 and set the main split point identification number in sequence.

[0255] In addition, by repeating S340, as Fig.29As shown, as the elements of the array point_on_maj_line0[0] to point_on_maj_line0[9], mv00, mv01, ..., mv09 are stored respectively. Similarly, as the elements of the array point_on_maj_line1[0] to point_on_maj_line1[9], mv10, mv11, ..., mv19 are stored respectively. Mv is a position vector.

[0256] In addition, by repeating S350, as Fig.21 , Fig.29 As shown in FIG. 1 , as the elements of the array min_vert_num[0] to min_vert_num[9] (i.e., the number of points on the branch line), 1, 2, 3, 4, 1, 2, 3, 1, 2, 3 are stored respectively. In addition, by repeating S360, as shown in FIG. Fig. 22 , Fig.29 As shown, the elements of the array prim_num_per_edge[0] to prim_num_per_edge[9] store 0, 1, 3, 5, 0, 1, 3, 0, 1, and 3 respectively.

[0257] For example, in Fig.21 In the basic triangle specified by prim_id=0, the first main line point specified by idx=3 is the right vertex A R In this case, the number of finely divided triangles used to divide the area between the branch line pairs is as follows: Fig. 22 As shown, it is 5, such as Fig.29 As shown, 5 is stored in prim_num_per_edge[3]. In this branch line pair, the reference branch line is the branch line set for the first main line point specified by idx=3, and the adjacent branch line is the branch line set for the first main line point specified by idx=2.

[0258] In addition, by executing S390, as Fig. 22 , Fig.29 As shown, the array elements csum_prim_num_per_edge[0] to csum_prim_num_per_edge[9] store 0, 1, 4, 9, 9, 10, 13, 13, 14, and 17 respectively.

[0259] exist Figure 20 to Figure 22 In the example, the value of the element csum_maj_vert_num[9] stored in the array, 17, is equivalent to the total number of finely divided triangles (i.e., cumulative sum R) that divide the area sandwiched by the branch line pairs set for the 9 (i.e., Q=9) first main line points. In other words, 17 is equivalent to Figure 20 to Figure 22The total number R of finely divided triangles contained in all three basic triangles (ie, P=3) is shown.

[0260] In addition, hereinafter, the array prim_lookup_idx[idx], the array maj_div_idx[idx], the array point_on_maj_line0[idx], the array point_on_maj_line1[idx], the array min_vert_num[idx], the array prim_num_per_edge[idx], and the array csum_prim_num_per_edge[idx] are also collectively referred to as the main line parameter array.

[0261] (3) Fine segmentation processing

[0262] based on Fig.18 The flowchart shown in the figure explains the fine segmentation process performed in S23 of the multi-level segmentation. In this process, the above-mentioned main line parameter array is set as an input array, and the following arrays are set as output arrays. The output arrays are array maj_line_lookup_idx[idx] and array tess_vert[idx].

[0263] Here, the idx indicating the element of the array is set to the range of 0≤idx≤R-1. The total number of idx used in this process is equal to the total number R of subdivided triangles contained in all basic triangles (i.e., the cumulative sum R). In addition, for the sake of distinction, the idx used in the subdivided process below is also recorded as idx_sub.

[0264] <Description of each array>

[0265] The array maj_line_lookup_idx[idx] is a lookup table used to refer to the main line parameter array mentioned above when performing the subdivision process. In other words, the array maj_line_lookup_idx[idx] is the correspondence information for establishing a correspondence between a subdivision triangle specified by idx (i.e., idx_sub) and the number (i.e., idx_m) of the first main line point that identifies the branch line pair containing the subdivision triangle.

[0266] The array tess_vert[idx] stores vertex coordinates for the subdivided triangle specified by the value stored in idx (i.e., idx_sub). The elements of the array tess_vert[3idx], tess_vert[3idx+1], and tess_vert[3idx+2] respectively represent the three vertex coordinates in a subdivided triangle. In addition, the array tess_vert[idx] can also be recorded as tess_vert[idy][idx] in the same way as the above-mentioned array vertices[]. Idy sets 0≤idy≤2 as the range. That is, tess_vert[0][idx] stores the first specified vertex coordinate for the subdivided triangle specified by the value stored in idx. Similarly, tess_vert[1][idx] stores the second specified vertex coordinate for the subdivided triangle specified by the value stored in idx, and tess_vert[2][idx] stores the third specified vertex coordinate for the subdivided triangle specified by the value stored in idx.

[0267] In addition, the element maj_line_lookup_idx[idx] of the array is represented by an integer greater than or equal to 0, and the element tess_vert[idx] of the array is represented by a floating-point number.

[0268] <Processing>

[0269] like Fig.18 As shown, first, in S500, the computing device 20 performs maj_line_lookup_idx array generation processing to generate an array maj_line_lookup_idx[idx]. Fig.19 As shown, S410, S412, S415, S419 of the maj_line_lookup_idx array generation process are Fig.17 The prim_lookup_idx array generation process shown in the figure is different, but the rest is the same, so the description is omitted here. That is, instead of the cumulative sum Q in the prim_lookup_idx array generation process, the cumulative sum R is used, and instead of the array maj_vert_num[], the array prim_num_per_edge[] is used. In addition, instead of the array csum_maj_vert_num[], the array csum_prim_num_per_edge[] is used. Thus, the array maj_line_lookup_idx[idx] is output. Return Fig.18 , continue the explanation.

[0270] In S505 , the computing device 20 stores 0 in idx.

[0271] Next, in S510 , the computing device 20 obtains the total number R of finely divided triangles (ie, the cumulative sum R). The cumulative sum R corresponds to the number of loops (ie, the number of iterations) of S515 to S570 .

[0272] In S515 - S570 , the computing device 20 calculates vertex coordinates for the subdivided triangle specified by the value stored in idx, and stores the calculated vertex coordinates in tess_vert[idy][idx].

[0273] First, in S515 , as shown in formula (12), the computing device 20 stores the value of the index (ie, idx_m) used to refer to the main line parameter array in the variable lookup_idx for the subdivided triangle specified by the value stored in idx (ie, idx_sub).

[0274] [Formula 9]

[0275] lookup_idx=maj_line_lookup_idx[idx]…(12)

[0276] This allows the main line parameters associated with the subdivided triangle specified by the value stored in idx (ie, idx_sub) to be specified. That is, it is not necessary to newly read the main line parameter array, but it is possible to refer to the main line parameters already stored in the memory.

[0277] In the next S520, the computing device 20 calculates the number indicating the position of the subdividing triangle specified by the value stored in idx (i.e., idx_sub) when viewed from the first main line among the subdividing triangles that divide the area sandwiched by the branch line pair containing the subdividing triangle based on formula (13). That is, the above-mentioned intra-region identification number is calculated. The computing device 20 stores the calculated intra-region identification number in the array tess_prim_id[idx].

[0278] [Formula 10]

[0279] tess_prim_idx=idx-csum_prim_num_per_edge[lookup_idx]+prim_num_per_edge[lookup_idx]

[0280] …(13)

[0281] In S525 and S530, the computing device 20 generates combination information. As described above, the combination information is information that specifies the combination of the points on the branch lines belonging to the determined subdividing triangles by using the in-region identification number to divide the region sandwiched by the branch line pair, and based on the main division point identification number and the secondary division point identification number. In the present embodiment, as described above, when the in-region identification number is an even number, the combination information specifies the combination in a manner that becomes a first designated pattern, and when the in-region identification number is an odd number, the combination information specifies the combination in a manner that becomes a second designated pattern. The first designated pattern is to become a direction to the base point A. B The second designation pattern is a pattern that specifies the combination of points on the branch line in the form of a triangle with a convex side. B The pattern of the combination of points on the branch line is specified in the form of a triangle protruding on the opposite side. The even number mentioned here includes 0.

[0282] In this embodiment, the combination information specifies the combination method of the points on the branch lines belonging to the fine dividing triangle based on the shift amount of the main dividing point identification number and the shift amount of the sub-dividing point identification number.

[0283] First, in S525, the displacement of the main division point identification number is calculated. Here, if only the main division point identification number (ie, maj_div_idx) is considered, in the first designated pattern, Fig.26 As shown, the main division point number of the first main line point of the branch line pair is set to maj_div_idx[idx], and the combination of the points on the branch line is expressed as maj_div_idx[idx]→maj_div_idx[idx-1]→maj_div_idx[idx]. Here, if the main division point number of the first main line point of the branch line pair, i.e., maj_div_idx[idx], is used as a reference, the combination of the points on the branch line is expressed by the displacement of the main division point identification number, such as 0→-1→0. On the other hand, in the second specified pattern, if the main division point number of the first main line point of the branch line pair, i.e., maj_div_idx[idx], is used as a reference, the combination of the points on the branch line is expressed by the displacement of the main division point identification number, such as -1→0→-1.

[0284] Therefore, in this step, the computing device 20 calculates the value stored in the variable maj_div_ofset for the fine division triangle specified by the value stored in idx based on equation (14). The value stored in the variable maj_div_ofset indicates the displacement amount of the main division point identification number.

[0285] [Formula 11]

[0286] maj_div_offset=

[0287] {-mod(tess_prim_id[idx],2),

[0288] -mod(tess_prim_id[idx]+1,2),

[0289] -mod(tess_prim_id[idx],2)}…(14)

[0290] Therefore, if Fig. 27 As shown, when tess_prim_idx[idx] is an even number, (0, -1, 0) is calculated as the shift amount of the main segmentation point identification number. When tess_prim_idx[idx] is an odd number, (-1, 0, -1) is calculated as the shift amount of the main segmentation point identification number.

[0291] Next, in S530, the displacement of the secondary division point identification number is calculated. Here, only the secondary division point identification number (ie, mai_div_idx) is considered. In the first designated pattern, Fig.26 As shown, the combination of points on the branch line is represented as 0→0→1 (for example, a finely divided triangle with identification number = 0 in the region), 1→1→2 (for example, a finely divided triangle with identification number = 2 in the region), and 2→2→3 (for example, a finely divided triangle with identification number = 4 in the region). On the other hand, in the second specified pattern, the combination of points on the branch line is represented as 0→1→1 (for example, a finely divided triangle with identification number = 1 in the region), and 1→2→2 (for example, a finely divided triangle with identification number = 3 in the region).

[0292] Here, in each combination, the sub-division identification number (hereinafter, also referred to as the reference sub-division identification number) of the second designated branch point is used as a reference. In the first designated pattern, for example, for a subdivision triangle with an identification number of 0 in the region, the combination of the branch points is represented by the displacement of the sub-division point identification number, such as 0→0→+1 (for example, the reference sub-division identification number=0) with respect to the reference sub-division identification number. Similarly, for a subdivision triangle with an identification number of 2 in the region, the displacement of the sub-division point identification number is represented by the displacement of the sub-division point identification number, such as 0→0→+1 (for example, the reference sub-division identification number=1) with respect to the reference sub-division identification number. On the other hand, in the second designated pattern, for a subdivision triangle with an identification number of 1 in the region, the combination of the branch points is represented by the displacement of the sub-division point identification number, such as -1→0→0 (for example, the reference sub-division identification number=1) with respect to the reference sub-division identification number. Similarly, for the fine division triangle with the intra-region identification number = 3, the displacement amount of the sub-division point identification number is expressed as -1→0→0 (for example, the reference sub-division identification number = 2) with respect to the reference sub-division identification number.

[0293] Therefore, in this step, the computing device 20 calculates the value stored in the variable ma_div_ofset for the fine division triangle specified by the value stored in idx based on equation (15). The value stored in the variable ma_div_ofset indicates the displacement amount of the sub-division point identification number.

[0294] [Formula 12]

[0295] min_div_offset=

[0296] {-mod(tess_prim_id[idx],2),

[0297] 0,

[0298] mod(tess_prim_id[idx]+1,2)}…(15)

[0299] Therefore, if Fig.28 As shown, when tess_prim_idx[idx], which is the intra-region identification number, is an even number, (0, 0, 1) is calculated as the shift amount of the sub-division point identification number. When tess_prim_idx[idx] is an odd number, (-1, 0, 0) is calculated as the shift amount of the sub-division point identification number.

[0300] Next, in S535-S560, for the finely divided triangle specified by the value stored in idx, the combination of the points on the branch line is sequentially stored in the array tess_vert[idy][idx]. When specifying the combination of points on the branch line, the main division point identification number and the secondary division point identification number are used. In this embodiment, the main division point identification number and the secondary division point identification number for specifying the combination of points on the branch line are determined based on the displacement of the main division point identification number and the displacement of the secondary division point identification number.

[0301] First, in S535 , the computing device 20 stores 0 in the variable idy.

[0302] Next, in S540, the computing device 20 calculates the coordinates of the two end points of the branch line including the point specified by the value stored in idy among the branch line points belonging to the subdivided triangle specified by the value stored in idx. The branch line point specified by the value stored in idy is the branch line point specified by the idy+1th in the combination method based on the combination information. The two end points are the first main line point and the second main line point.

[0303] The computing device 20 stores the position vector (i.e., coordinates) of one of the two endpoints, i.e., the point on the first main line, in the variable point_0 based on equation (16). In addition, the computing device 20 stores the position vector (i.e., coordinates) of the other of the two endpoints, i.e., the point on the second main line, in the variable point_1 based on equation (17).

[0304] [Formula 13]

[0305] point_0=point_on_maj_line0[lookup_idx+maj_div_offset[idy]]…(16)

[0306] point_1=point_on_maj_line1[lookup_idx+maj_div_offset[idy]]…(17)

[0307] In the next S545, first, the computing device 20 calculates the sub-division identification number for the upper point of the branch line specified by the value stored in idy in the fine division triangle specified by the value stored in idx based on formula (18). The sub-division identification number is calculated based on the base sub-division identification number and the displacement of the sub-division identification number calculated in S530. The computing device 20 stores the calculated sub-division identification number in the variable min_div_idx. floor((tess_prim_id[idx]+1) / 2) in formula (18) represents the sub-division identification number. Furthermore, the computing device 20 uses the calculated sub-division identification number to calculate the internal division ratio based on formula (19) and stores it in the variable div_ratio.

[0308] [Formula 14]

[0309] min_div_idx=floor((tess_prim_id[idx]+1) / 2)+min_div_offset[idy]…(18)

[0310] div_ratio=min_div_idx / min_vert_num[lookup_idx+maj_div_offsee[idy]]…(19)

[0311] The internal division ratio indicates a division ratio of a branch line including the point specified by the value stored in idy, among the points on the branch line belonging to the finely divided triangle specified by the value stored in idx, by which the point on the branch line specified by the value stored in idy divides the point.

[0312] Next, in S550 , the computing device 20 stores the calculated coordinates in the array tess_vert[idy][idx] based on equation (20).

[0313] [Formula 15]

[0314] tess_vert[idy][idx]=point_0+divratio*(point_1-point_0)…(20)

[0315] In the next S555, the calculation device 20 increments idy by 1. That is, the calculation device 20 stores the value stored in idy with 1 added thereto in idy.

[0316] Next, in S560, the computing device 20 determines whether the value stored in idy is greater than 3. Here, the computing device 20 transfers the process to S565 when it is determined to be greater than 3. On the other hand, when the computing device 20 determines that it is less than 3, it transfers to S540 and repeats the processes of S540-S560 until idy is greater than 3.

[0317] In S565, the calculation device 20 increments idx by 1. That is, the calculation device 20 adds 1 to the value stored in idx and stores the value obtained by adding 1 to idx.

[0318] In S570, the computing device 20 determines whether the value stored in idx is greater than or equal to R. Here, if the computing device 20 determines that it is less than R, the processing moves to S515 and the processing of S515 to S570 is repeated. On the other hand, if the computing device 20 determines that it is greater than or equal to R, the subdivision processing ends.

[0319] <Action>

[0320] use Figure 20 to Figure 23 , Fig.25 , Fig.29 The operation of the fine segmentation process will be described.

[0321] If the number of loops is the cumulative sum R as described above, then by repeating S515, the elements maj_line_lookup_idx[0] to maj_line_lookup_idx[R-1] of the array are stored. Fig. 22 As shown in , Q = 10, configure the points on each branch line. Fig.29 As shown, array elements maj_line_lookup_idx[0] to maj_line_lookup_idx[Q-1] store 1, 2, 2, 2, 3, 3, 3, 3, 3, 5, .... That is, for each subdivided triangle specified by the value stored in idx, an index (i.e., idx_m) is set when referring to the main line parameter array.

[0322] Below, in Figure 20 to Figure 23 In the example shown, the operation in the case of idx=9 (i.e., idx_sub=9) is described. Fig. 22 As shown, the finely divided triangle specified by idx=9 is included in the basic triangle specified by prim_id=1.

[0323] In S515, for the finely divided triangle specified by idx=9, maj_line_lookup_idx[9]=5 is set as lookup_idx. Fig.29 For example, the main line parameter array can be referenced as indicated by the arrow. For example, the main division point identification number (maj_div_idx) of the first main line point on the branch line pair including the fine division triangle specified by idx=9 is determined to be 1. That is, maj_div_idx[lookup_idx]=1 (for example, lookup_idx=5).

[0324] In S520, for the finely divided triangle specified by idx=9, the intra-region identification number (ie, tess_prim_id[9]) is calculated as 9-10+1=0 based on equation (13).

[0325] In S525, maj_div_offset is calculated as (0, -1, 0) based on equation (14), and in S530, maj_div_offset is calculated as (0, 0, 1) based on equation (15).

[0326] In S535 to S560, when idy=0, the two endpoints of the reference branch line in the branch line pair (i.e., the branch line set for maj_div_idx=1, i.e., the first main line point) are determined in S540. In S545, the sub-division identification number is calculated as 0 based on equation (18), and the internal division ratio is calculated as 0. In S550, based on the internal division ratio, the coordinates of one of the two end points of the reference branch line, i.e., the first main line point, are determined as the first branch line point belonging to the fine division triangle.

[0327] Similarly, when idy=1, the two endpoints (i.e., the base point A in this example) of the adjacent branch line in the branch line pair (i.e., the branch line set for maj_div_idx=0, i.e., the first main line midpoint) are determined in S540. B ). In S545, the sub-division identification number is calculated as 0 based on equation (18), and the internal division ratio is calculated as 0. In S550, based on the internal division ratio, the coordinates of one of the two end points of the adjacent branch line, i.e., the point on the first main line (i.e., the base point A in this example) are calculated as B ) is determined as the second branch point belonging to the finely divided triangle.

[0328] Similarly, when idy=2, the two endpoints of the reference branch line in the branch line pair (i.e., the branch line set for maj_div_idx=1, i.e., the first main line point) are determined in S540. The sub-division identification number is calculated as 1 based on equation (18) and the internal division ratio is calculated as 1 / 1=1 in S545. Based on the internal division ratio, the coordinates of the other of the two end points of the reference branch line, i.e., the second main line point, are determined as the third branch line point belonging to the fine division triangle in S550.

[0329] Thus, for the subdivided triangle specified by idx=9, the combination of points on the branch lines belonging to the subdivided triangle (i.e., the first specified pattern) is determined, and the position vectors (i.e., coordinates) determined in the order of the combination are stored in the array tess_vert[idy][idx].

[0330] The computing device 20 performs the same processing on the subdivided triangles specified by idx=0 to R-1. As a result, an array tess_vert[idy][idx] including the vertex coordinates of a total of R subdivided triangles is obtained.

[0331] In this way, according to a simple rule using the displacement amount as the combination information, the area sandwiched by the branch line pair is divided without overlapping each other, and finely divided triangles are generated by connecting points on the branch lines close to each other.

[0332] [1-3. Effect]

[0333] According to the first embodiment described in detail above, the following effects are achieved.

[0334] (1a) In each basic triangle, in S21, the operation device 20 sets the main division number as the number of divisions when the first main line is divided into a plurality of equal parts. The first main line is divided into equal parts based on the division length d0. In S22, the operation device 20 sets the sub-division number when the set branch line is divided into equal parts for each of the plurality of first main line points set on the first main line. The branch line is divided into equal parts based on the same division length d0 as when the first main line points are divided.

[0335] In S23, the computing device 20 uses the array vertices[], maj_vert_num and the combination information to calculate the coordinates of the vertices of the finely divided triangles according to each branch line pair set for the first main line point. The combination information is information that specifies the combination of the branch line points belonging to each finely divided triangle according to each branch line pair set for the main line point. The finely divided triangle refers to one or more triangles that divide the area of ​​the basic triangle sandwiched by the branch line pair without duplication, with the branch line points on the two branches belonging to the branch line pair as vertices, according to each branch line pair.

[0336] Such a computing device 20 can make the intervals between points on the first main line and the intervals between points on the branch line approximately the same by performing segmentation based on the segmentation length d0. That is, the sides along two sides of the three sides in the finely segmented triangle can be made to be approximately the same length. The two sides refer to the side along the first main line where points on the first main line are set, and the branch line where points on the branch line are set. Therefore, the basic triangle can be segmented into finely segmented triangles having a shape that is relatively consistent with the equilateral triangle. As a result, it is possible to suppress the new finely segmented triangles generated by segmenting the basic triangle from being away from the equilateral triangle. In addition, in the present embodiment, when the basic triangle has a shape that is relatively consistent with the equilateral triangle, a greater effect can be obtained.

[0337] (1b) The computing device 20 sets the opposite side of the interior angle with the largest angle as the first main line, the opposite side of the interior angle with the next larger angle after the largest angle as the second main line, and the opposite side of the interior angle with the smallest angle as the third main line in the basic triangle. That is, the second main line has a length relatively close to that of the first main line compared to the third main line. By dividing the second main line with the same division ratio as the first main line, the interval between the points on the second main line can be made relatively close to the interval between the points on the first main line (that is, the division length d0).

[0338] Such a calculation device 20 can make the side along the second main line of the set second main line point of the three sides of the subdivided triangle relatively close to the division length d0. As a result, the subdivided triangle can be made closer to a shape with a relatively high degree of consistency with an equilateral triangle.

[0339] (1c) When specifying a branch line point belonging to a finely divided triangle, the combination information specifies the branch line point as follows for each branch line pair set for the first main line point. The combination information specifies the branch line point on the branch line set for the first main line point (i.e., the reference branch line point) and the branch line point on the adjacent branch line (i.e., the adjacent branch line point) alternately along the branch line.

[0340] Sequentially along the branch line refers to the order in which the points on the branch line are arranged. Alternating means that after specifying a reference branch line point, the adjacent branch line point is specified, and after specifying an adjacent branch line point, the reference branch line point is specified.

[0341] The computing device 20 specifies a point on the branch line belonging to the triangle by alternately moving two branch lines in the branch line pair, thereby being able to specify a point on the branch line belonging to a subdivided triangle including two sides corresponding to the division length d0. The two sides corresponding to the division length d0 are the side parallel to the first main line and the side included in the branch line in the subdivided triangle of the area sandwiched by the branch line pair. As a result, the basic triangle can be divided into a plurality of subdivided triangles having shapes with a relatively large degree of consistency with the regular triangle.

[0342] (1) In addition, in the above (1c), specifically, the combination information may also include at least one of the first designated pattern and the second designated pattern when specifying the points on the branch line belonging to the fine splitting triangle. The first designated pattern specifies the points on the branch line belonging to the fine splitting triangle in the order of the base branch line points, the adjacent points on the branch line, and the adjacent other base branch line points. That is, the points on the branch line that are closest to each other and belong to the triangle are specified. The second designated pattern specifies the points on the branch line belonging to the fine splitting triangle in the order of the adjacent points on the branch line, the base branch line points, and the adjacent other adjacent points on the branch line. That is, similar to the first designated pattern, the points on the branch line that are closest to each other are specified.

[0343] The computing device 20 calculates the number of points in the first designated pattern toward the base point A. B The finely divided triangle protruding from the side is directed toward the base point A in the second designated pattern. B The finely divided triangle with the opposite side convex can obtain a shape with a relatively large degree of consistency with the equilateral triangle.

[0344] (2) In (1c) (1) above, the combination information may alternately designate the first designation pattern and the second designation pattern when there are a plurality of fine division triangles for dividing the area between the branch line pair. The computing device 20 repeatedly performs division into fine division triangles based on the first designation pattern and the second designation pattern based on the combination information, thereby enabling the basic triangle area between the branch line pair to be divided without duplication.

[0345] (1d) In any of (1c) and (1c) (1) and (2) above, in S330, the computing device 20 sets a main division point identification number (i.e., maj_div_idx) for the first main line upper point. In S545, the computing device 20 sets a secondary division point identification number (i.e., mai_div_idx) for the branch line upper point. For example, the secondary division point identification numbers are set in sequence from the first main line side. The branch line points are respectively identified by the main division point identification number and the secondary division point identification number. The combination information specifies the combination method of the branch line points belonging to the fine division triangle that divides the area of ​​the basic triangle sandwiched by the branch line pair based on the main division point identification number and the secondary division point identification number.

[0346] The calculation device 20 can use the combination information to uniquely identify the combination of points on the branch lines belonging to the finely divided triangle.

[0347] (1) In the above (1d), in the computing device 20, the combination information may specify the combination of points on the branch lines belonging to the subdividing triangle based on the displacement amount of the main dividing point identification number and the displacement amount of the subdividing point identification number.

[0348] Since the combination information can be simple information having regularity based on the displacement amount, the amount of the combination information can be reduced. As a result, when the computing device 20 generates the combination information, generation becomes easy, and when the computing device 20 stores the combination information in advance, the memory capacity can be reduced.

[0349] (2) In (1d) (1) above, in the computing device 20, the displacement of the main division point identification number may also be expressed as the displacement relative to the main division point identification number of the branch line point set for the first main line point. The displacement of the sub-division identification number may also be expressed as the displacement relative to the sub-division point identification number of the branch line point specified second when specifying the branch line point belonging to the subdivision triangle. The computing device 20 can use the combination information based on the displacement amount to generate the subdivision triangles such as the first specified pattern and the second specified pattern described above in the same way for each first main line point. In addition, when the computing device 20 is a device capable of parallel processing, the same parallel processing can be performed for each first main line point.

[0350] (3) As described above, the computing device 20 may generate the combination information. Since it is not necessary to store a table indicating the combination information in advance in a storage device or the like, the memory capacity in the computing device 20 can be reduced.

[0351] (1e) The computing device 20 performs pre-shaping in S11. In the pre-shaping, the computing device 20 determines in S120 whether the basic triangles defined by the polygon vertex coordinate data (i.e., the array vertices[]) are object triangles. In S150, the computing device 20 divides the basic triangle determined not to be the object triangle (i.e., the basic triangle determined to be the non-object triangle) into a plurality of triangles so as to form a shape with a relatively large degree of consistency with the regular triangle. In S155, the computing device 20 generates a new array vertices[] containing the vertex coordinates of the divided triangles. The computing device 20 sets the number of primary divisions in S21 and the number of secondary divisions in S22 for each of the basic triangles defined by the coordinates of each vertex contained in the new array vertices[] generated in S11. Furthermore, in S23, the computing device 20 calculates the coordinates of the vertices of a plurality of finely divided triangles that further divide the area of ​​the basic triangle.

[0352] Such a computing device 20 can perform multi-level segmentation on the pre-shaped basic triangle that is relatively consistent with the equilateral triangle. Compared with the case where the pre-shaping is not performed and the multi-level segmentation is performed, the computing device 20 can obtain finely segmented triangles with relatively higher consistency with the equilateral triangle.

[0353] (1e) Specifically, the computing device 20 determines whether the maximum value of the internal angle of each basic triangle is less than the allowable angle, and when the maximum value of the internal angle is less than the allowable angle, the computing device 20 determines that the basic triangle is the target triangle. In addition, when the maximum value of the internal angle is greater than the allowable angle, the computing device 20 determines that the basic triangle is not the target triangle. The computing device 20 can use the maximum value of the internal angle to more easily determine whether the basic triangle is the target triangle using a mathematical formula.

[0354] (1f) When the computing device 20 determines that the basic triangle is not the target triangle, the basic triangle is divided into two by a bisector that bisects the internal angle having the maximum value in the basic triangle. Thus, when the triangle before division is not a shape that is relatively close to an equilateral triangle, such as when the maximum internal angle is greater than 120°, the triangle is divided into two by bisecting the maximum internal angle. Compared with the case where the triangle is divided by repeatedly bisecting an arbitrary internal angle (for example, the minimum internal angle), the computing device 20 can make the divided triangle have a shape that is relatively consistent with an equilateral triangle.

[0355] (1g) For example, the allowable angle is 120°. Thus, the computing device 20 can set the maximum interior angle of the divided triangle to 60°≤maximum interior angle<90°, and can make the divided triangle close to a shape with a relatively high degree of consistency with an equilateral triangle.

[0356] <Correspondence of statements>

[0357] The computing device 20 is equivalent to a triangle generating device. The array vertices[] is equivalent to a vertex coordinate group. The value of the first item in formula (2) is equivalent to the number of primary divisions, and the value of the first item in formula (10) is equivalent to the number of secondary divisions. The first main line is equivalent to the first side, the second main line is equivalent to the second side, and the third main line is equivalent to the third side. The upper point of the first main line is equivalent to the primary division point, and the upper point of the branch line is equivalent to the secondary division point. maj_div_idx is equivalent to the primary division point identification number, and min_div_idx is equivalent to the secondary division point identification number. maj_div_offset is equivalent to the displacement of the primary division point identification number, and min_div_offset is equivalent to the displacement of the secondary division point identification number.

[0358] S1 is equivalent to the processing as the acquisition unit, S2 is equivalent to the processing as the triangle division unit, and S11 is equivalent to the processing as the pre-shaping unit. S120 is equivalent to the processing as the object determination unit, S150 is equivalent to the processing as the pre-shaping execution unit, and S155 is equivalent to the processing as the appending unit. S21 and S240 are equivalent to the processing as the main division number setting unit, S22 and S350 are equivalent to the processing as the sub-division number setting unit, and S23 is equivalent to the processing as the execution unit. S330 is equivalent to the processing as the main recognition setting unit, and S545 is equivalent to the processing as the sub-recognition setting unit.

[0359] [2. Second Embodiment]

[0360] [2-1. Structure]

[0361] The following and attached Figure 1 The second embodiment of the present disclosure will be described together. In the second embodiment, the parts different from the first embodiment will be described. The same reference numerals are given to the common structures.

[0362] The computing device 20 of the second embodiment includes a GPU 22, and is different from the first embodiment in that various processes are executed in parallel using the GPU 22. For example, the GPU 22 as the computing device 20 may also execute pre-shaping in S11 and multi-level segmentation in S12.

[0363] For example, the GPU 22 may perform the processing repeatedly performed for each basic triangle specified by the value stored in idx in parallel in the pre-shaping performed in S11 by parallel processing.

[0364] Specifically, Figure 4 The shown S105~S130 is a repeated process according to each idx, so GPU22 can also set a thread according to each idx in S105~S130, and execute the processes of S105~S120 in parallel in each thread. In addition, S140~S165 is a repeated process according to each idx, so GPU22 can also set a thread according to each idx in S140~S165, and execute the processes of S140~S155 in parallel in each thread. In addition, S170~S185 is a repeated process according to each idx, so GPU22 can also set a thread according to each idx in S170~S185, and execute the processes of S170~S175 in parallel in each thread.

[0365] In addition, for example, GPU22 can also perform processing repeatedly performed for each basic triangle specified by the value stored in idx, or processing repeatedly performed for each first main line point specified by the value stored in idx in parallel in the multi-level segmentation performed by S12.

[0366] Specifically, Fig.15 S200 to S260 shown in the figure are repeated processing for each idx, so GPU22 can also set threads for each idx in S200 to S260 and execute the processing of S200 to S240 in parallel in each thread. Fig.16 S300 to S380 shown in the figure are repeated processing for each idx, so GPU22 can also set threads for each idx in S300 to S380 and execute the processing of S300 to S360 in parallel in each thread. Fig.18 S500 to S570 shown are repeated processes for each idx, and therefore, the GPU 22 may set a thread for each idx in S500 to S570 and execute the processes of S500 to S560 in parallel in each thread.

[0367] [2-2. Effect]

[0368] (2a) Such a computing device 20 sorts the vertex coordinates of each basic triangle in descending order in parallel during pre-shaping and determines whether it is a target triangle, thereby increasing the processing speed of pre-shaping and further increasing the processing speed of triangle segmentation.

[0369] In addition, such a computing device 20 sets the first main line point in parallel for each basic triangle in the multi-level segmentation, thereby improving the processing speed of the multi-level segmentation and thus improving the processing speed of the triangle segmentation. In addition, such a computing device 20 calculates the coordinates of the vertices of the finely segmented triangle in parallel for each first main line point in the multi-level segmentation, thereby improving the processing speed of the multi-level segmentation and thus improving the processing speed of the triangle segmentation.

[0370] In the second embodiment, the GPU 22 corresponds to the triangle processing device. In addition, the above-mentioned parallel processing may be performed by the CPU 21 capable of performing parallel processing instead of the GPU 22. In this case, the CPU 21 capable of performing parallel processing corresponds to the triangle generating device.

[0371] [2. Third embodiment]

[0372] [3-1. Structure]

[0373] The following and attached Figure 1The third embodiment of the present disclosure will be described together. In the third embodiment, the parts different from the second embodiment will be described. The same reference numerals are given to the common structures.

[0374] In the second embodiment described above, for example, in the process of calculating the cumulative sum such as S135, S270, and S390, the method of not performing parallel processing by the GPU 22 is shown. However, the GPU 22 may also perform parallel processing in the process of calculating the cumulative sum by performing the cumulative sum parallel processing described later.

[0375] [3-2. Processing]

[0376] based on Fig.30 The flowchart shown illustrates the accumulation and parallel processing.

[0377] <Array description>

[0378] In this process, the array input[idx] is set as the input array. The array input[idx] is an array that stores the values ​​for which the cumulative sum is to be calculated.

[0379] If the cumulative sum parallel processing is completed, the cumulative sum of the array input[idx] is stored in the array input[idx]. For example, when S cumulative sums are calculated for the array input[0] to input[S-1], if the cumulative sum parallel processing is completed, the element input[0] of the array specified by idx=0 is stored in the array input[0]. The sum of the element input[0] of the array specified by idx=0 and the element input[1] of the array specified by idx=1 is stored in the array input[1]. Furthermore, the sum of the elements input[0] to input[S-1] of the array is stored in the array input[S-1].

[0380] <Processing>

[0381] First, in S600 , GPU 22 obtains an array input[idx] whose number of elements is set to S. The range of idx is 0≤idx≤S−1.

[0382] Next, in S610 , GPU 22 stores 1 in the variable stride.

[0383] In the next S620 , GPU 22 stores 0 in idx.

[0384] Next, in S630 , GPU 22 determines whether idx-stride ≥ 0. Here, if idx-stride < 0, GPU 22 transfers the process to S650 . On the other hand, if idx-stride ≥ 0, GPU 22 transfers the process to S640 .

[0385] In S640 , the sum of the array element input[idx] and the array element input[idx-stride] is stored as a new array element input[idx].

[0386] In S650 , GPU 22 increments idx by 1. That is, GPU 22 stores the value obtained by adding 1 to the value stored in idx in idx.

[0387] In S670 , GPU 22 determines whether the value stored in idx is greater than S. Here, if GPU 22 determines that it is greater than S, the process moves to S670 . On the other hand, if GPU 22 determines that it is less than S, the process moves to S630 , and the processes of S630 to S660 are repeated.

[0388] In S670 , stride*2 is stored as the new stride value.

[0389] In S680 , stride is incremented by 1. That is, GPU 22 adds 1 to the value stored in stride and stores the value in stride.

[0390] In S690, GPU 22 determines whether the value stored in stride is greater than S. Here, if GPU 22 determines that it is less than S, it transfers the process to S620 and repeats the processes of S620 to S690. On the other hand, if the computing device 20 determines that it is greater than S, it ends the accumulation and parallel processing.

[0391] <Action>

[0392] By performing accumulation and parallel processing, Fig.31 As shown, the sum of each of the elements input[0] to the elements input[S-1] of the array is stored in the array input[S-1].

[0393] For example, in S135, the array input[] may be replaced with the array flag[]. By performing the above-mentioned accumulation and parallel processing, the sum of the elements flag[idx] of the array (ie, the cumulative sum of) is stored in the element flag[L-1] of the array.

[0394] In addition, for example, in S270, the array input[] may be replaced with the array maj_vert_num[]. By executing the above-mentioned accumulation and parallel processing, the accumulation sum Q is stored in the element maj_vert_num[P-1] of the array.

[0395] In addition, for example, in S390, the above-mentioned array input[] may be replaced with the array prim_num_per_edge[]. By executing the above-mentioned accumulation and parallel processing, the accumulation sum R is stored in the element maj_vert_num[Q-1] of the array.

[0396] [3-3. Effect]

[0397] Thus, the computing device 20 also performs parallel processing for each idx in the cumulative sum, thereby further improving the processing speed. In addition, the computing device 20 can set a thread for each first main line point and perform triangle segmentation in parallel for each first main line point, thereby further improving the processing speed.

[0398] In the third embodiment, the GPU 22 corresponds to the triangle processing device. In addition, the above-mentioned parallel processing may be performed by the CPU 21 capable of performing parallel processing instead of the GPU 22. In this case, the CPU 21 capable of performing parallel processing corresponds to the triangle generating device.

[0399] [4. Other embodiments]

[0400] As mentioned above, although embodiment of this disclosure was described, this disclosure is not limited to the said embodiment, It can implement with various deformation|transformation.

[0401] (4a) In the above-mentioned embodiment, a method of determining a basic triangle as a target triangle is shown when the maximum internal angle of the basic triangle is less than a specified angle (for example, 120°). However, in the basic triangle, when the ratio of the length of the remaining sides to the length of one side is within a specified range, the triangle is determined to be a target triangle. For example, it may be that h1≤length ratio≤h2 (for example, h1<1, h2≥1). The range of the length ratio is not limited to this, and can be set arbitrarily.

[0402] (4b) In the above-mentioned embodiment, the computing device 20 generates combination information and generates finely divided triangles based on the generated combination information (i.e., acquires the generated combination information). However, the computing device 20 may store the combination information in a memory as a table in advance and generate finely divided triangles based on the combination information stored in the memory. In this way, the processing load of the computing device 20 can be reduced.

[0403] (4c) In the above-mentioned embodiment, the main division point identification number is shown as the base point A which connects the first main line and the second main line from the vertex of the basic triangle. B However, the main division point identification number may be set to 0 at either end of the first main line. For example, the main division point identification number may be set to 0 from the vertex of the basic triangle and the intersection of the first main line and the second main line, i.e., the right vertex A. R Towards base point A B Sequentially set to 0, 1, 2, ... In this case, in the branch line pair, the main division point identification number of the point on the reference branch line + 1 is the main division point identification number of the point on the adjacent branch line. In this case, for example, when tess_prim_idx[idx] is an even number, (0, +1, 0) can also be calculated as the displacement of the main division point identification number. In addition, for example, when tess_prim_idx[idx] is an odd number, (+1, 0, +1) can also be calculated as the displacement of the main division point identification number.

[0404] (4d) In the above embodiment, the secondary division point identification numbers are set in sequence from the first main line side in the basic triangle. However, the secondary division point identification numbers may be set to 0 at either end of the branch line. For example, the secondary division point identification numbers may be set to 0, 1, 2, etc. starting from the second main line side toward the first main line side. In this case, as the displacement amount of the secondary division point identification numbers, the same displacement amount as in the above embodiment may be used.

[0405] (4e) In the above embodiment, the computing device 20 performs both pre-shaping and multi-level division in the triangle division process. However, the computing device 20 may perform only multi-level division in the triangle division process.

[0406] (4f) In the above-mentioned embodiment, a method is shown in which, in a basic triangle, the first main line is the opposite side of the internal angle having the maximum angle, the second main line is the opposite side of the internal angle having the next larger angle after the maximum angle, and the third main line is the opposite side of the internal angle having the minimum angle. However, for example, the first main line may be the opposite side of the internal angle having the angle next larger than the maximum angle, the second main line may be the opposite side of the internal angle having the maximum angle, and the third main line may be the opposite side of the internal angle having the minimum angle.

[0407] (4g) The computing device 20 and the method thereof described in the present disclosure may also be implemented by a dedicated computer provided with a processor and a memory programmed to execute one or more functions embodied by a computer program. Alternatively, the computing device 20 and the method thereof described in the present disclosure may also be implemented by a dedicated computer provided with a processor composed of one or more dedicated hardware logic circuits. Alternatively, the computing device 20 and the method thereof described in the present disclosure may also be implemented by one or more dedicated computers composed of a combination of a processor and a memory programmed to execute one or more functions and a processor composed of one or more hardware logic circuits. In addition, a computer program may also be stored as an instruction executed by a computer in a computer-readable non-migratable tangible recording medium. In the method for realizing the functions of each part included in the computing device 20, it is not necessarily necessary to include software, and all its functions may also be implemented using one or more hardware.

[0408] (4h) It is also possible to implement multiple functions of one constituent element of the above-mentioned embodiment by multiple constituent elements, or to implement one function of one constituent element by multiple constituent elements. In addition, it is also possible to implement multiple functions of multiple constituent elements by one constituent element, or to implement one function implemented by multiple constituent elements by one constituent element. In addition, a part of the structure of the above-mentioned embodiment may be omitted. In addition, it is also possible to add or replace at least a part of the structure of the above-mentioned embodiment with the structure of other above-mentioned embodiments.

[0409] (4i) In addition to the above-mentioned computing device 20, the present disclosure can be implemented in various forms such as a device that uses the computing device 20 as a component, a system, a program for making the computing device 20 function, a non-migrating physical recording medium such as a semiconductor memory that records the program, a triangle generation method, etc. The device that uses the computing device 20 as a component can include, for example, a radar simulator.

[0410] [Technical ideas disclosed in this specification]

[0411] [Project 1]

[0412] A triangle generating device (20) comprising:

[0413] An acquisition unit (S1) configured to acquire a vertex coordinate group including coordinates of each vertex for one or more basic triangles; and

[0414] The triangle dividing unit (S2) is configured to divide each of the basic triangles defined by the coordinates of each vertex included in the vertex coordinate group into a plurality of subdivided triangles.

[0415] The above-mentioned triangle dividing part has:

[0416] A main division number setting unit (S21, S240) is configured to set the main division number (M) when the first side is equally divided based on a predetermined division length;

[0417] A sub-division number setting unit (S22, S350) configured to set a sub-division number (N) when the branch line set is equally divided based on the division length for each of the plurality of main division points set on the first side; and

[0418] The execution unit (S23) is configured to, for each of the above-mentioned main dividing points, divide the area of ​​the above-mentioned basic triangle sandwiched by the above-mentioned branch line pair into one or more triangles that are mutually divided without duplication using the secondary dividing points on the two branches belonging to the above-mentioned branch line pair as vertices as the above-mentioned fine dividing triangles according to each of the above-mentioned branch line pairs that are set, obtain the above-mentioned combination information by using information specifying a combination method of the above-mentioned secondary dividing points belonging to each of the fine dividing triangles as combination information, and calculate the coordinates of the vertices of the above-mentioned fine dividing triangles according to each of the above-mentioned branch line pairs that are respectively set for the above-mentioned main dividing points using the above-mentioned vertex coordinate group, the above-mentioned main dividing number and the above-mentioned combination information,

[0419] The main division points are a plurality of (M+1) points including both end points of the first side and located at positions that divide the first side into equal parts by the number of main divisions.

[0420] The branch line is a line segment passing through the main dividing point from the first side to the second side and along the third side.

[0421] The secondary division points are a plurality of (N+1) points including the two end points of the branch line and dividing the branch line equally by the secondary division number.

[0422] The branch line pair is a combination of any two adjacent branch lines among the branch lines.

[0423] [Project 2]

[0424] According to the triangle generating device described in item 1, wherein:

[0425] In the above-mentioned basic triangle, the above-mentioned first side is the side opposite to the internal angle with the largest angle, the above-mentioned second side is the side opposite to the internal angle with an angle second larger than the above-mentioned largest angle, and the above-mentioned third side is the side opposite to the internal angle with the smallest angle.

[0426] [Item 3]

[0427] The triangle generating device according to item 1 or item 2, wherein:

[0428] When specifying the sub-dividing points belonging to one of the fine dividing triangles, the combination information alternately specifies sub-dividing points on the branch lines set for the main dividing points and sub-dividing points on the adjacent branch lines for each pair of branch lines set for the main dividing points.

[0429] [Item 4]

[0430] The triangle generating device according to item 3, further comprising:

[0431] a main division point identification setting unit (S330) configured to set a main division point identification number for identifying each main division point for each of the main division points; and

[0432] The sub-division point identification setting unit (S545) is configured to set a sub-division point identification number for identifying each sub-division point for each of the sub-division points.

[0433] Each of the above-mentioned secondary division points is determined by the above-mentioned primary division point identification number and the above-mentioned secondary division point identification number,

[0434] The combination information specifies a combination method of the sub-division points belonging to the sub-division triangle based on the main division point identification number and the sub-division identification number.

[0435] [Item 5]

[0436] The triangle generating device according to any one of items 1 to 4, wherein:

[0437] The execution unit calculates coordinates of vertices of the finely divided triangle in parallel for each of the main division points.

[0438] [Item 6]

[0439] The triangle generating device according to any one of items 1 to 5, wherein:

[0440] The triangle dividing section further comprises a pre-shaping section (S11),

[0441] The pre-shaping section includes:

[0442] an object determination unit (S120) configured to determine, for each of the basic triangles defined by the vertex coordinate group, whether the basic triangle is an object triangle having a shape with a relatively large degree of consistency with the equilateral triangle;

[0443] a pre-shaping execution unit (S150) configured to divide the basic triangle determined not to be the target triangle into a plurality of triangles so as to form a shape having a relatively large degree of consistency with the equilateral triangle; and

[0444] The adding unit (S155) is configured to generate a new vertex coordinate group including vertex coordinates of the divided triangle.

[0445] The above-mentioned triangle division unit sets the main division number by the main division number setting unit, sets the sub-division number by the sub-division number setting unit, and calculates the coordinates of the vertices of the plurality of subdivided triangles that further divide the area of ​​the above-mentioned basic triangle for each of the basic triangles defined by the coordinates of each vertex included in the above-mentioned new vertex coordinate group generated by the above-mentioned pre-shaping unit.

[0446] [Item 7]

[0447] According to the triangle generating device described in item 6, wherein:

[0448] The object determination unit determines whether the maximum value of the internal angle of each of the basic triangles is less than the allowable angle, and determines that the basic triangle is the object triangle when the maximum value of the internal angle is less than the allowable angle, and determines that the basic triangle is not the object triangle when the maximum value of the internal angle is greater than the allowable angle.

[0449] [Item 8]

[0450] The triangle generating device according to item 6 or item 7, wherein:

[0451] When the object determination unit determines that the basic triangle is not the object triangle, the pre-shaping unit divides the basic triangle into two using a bisector that bisects an internal angle having a maximum value in the basic triangle.

[0452] [Item 9]

[0453] A triangle generation method is a method for obtaining a vertex coordinate group including coordinates of each vertex for one or more basic triangles, and dividing each of the basic triangles defined by the coordinates of each vertex included in the vertex coordinate group into a plurality of finely divided triangles.

[0454] Set the number of main divisions (M) when the first side is divided equally based on the predetermined division length.

[0455] For each of the plurality of main division points set on the first side, the number of sub-divisions (N) is set when the set branch line is equally divided based on the division length.

[0456] For each of the above-mentioned main dividing points, according to each branch line pair that is set, the area of ​​the above-mentioned basic triangle sandwiched by the above-mentioned branch line pair is divided into one or more triangles that are mutually non-repeated with the secondary dividing points on the two branches belonging to the above-mentioned branch line pair as vertices as the above-mentioned fine dividing triangles, and the above-mentioned combination information is obtained by using information specifying the combination method of the above-mentioned secondary dividing points belonging to each of the fine dividing triangles as combination information, and the coordinates of the vertices of the above-mentioned fine dividing triangles are calculated according to each of the above-mentioned branch line pairs that are respectively set for the above-mentioned main dividing points using the above-mentioned vertex coordinate group, the above-mentioned main dividing number and the above-mentioned combination information,

[0457] The main division points are a plurality of (M+1) points including both end points of the first side and located at positions that divide the first side into equal parts by the number of main divisions.

[0458] The branch line is a line segment passing through the main dividing point from the first side to the second side and along the third side,

[0459] The secondary division points are a plurality of (N+1) points including the two end points of the branch line and dividing the branch line equally by the secondary division number.

[0460] The branch line pair is a combination of any two adjacent branch lines among the branch lines.

[0461] [Item 10]

[0462] A triangle generation program enables a computer to function as a triangle generation device, comprising:

[0463] The acquisition step (S1) is configured to acquire a vertex coordinate group including coordinates of each vertex for one or more basic triangles; and

[0464] The triangle division step (S2, S12) is configured to divide each of the basic triangles defined by the coordinates of each vertex included in the vertex coordinate group into a plurality of fine division triangles.

[0465] The above triangle segmentation steps have:

[0466] A main division number setting step (S21, S240) is configured to set the main division number (M) when the first side is equally divided based on a predetermined division length;

[0467] a sub-division number setting step (S22, S350), configured to set, for each of the plurality of main division points set on the first side, a sub-division number (N) when the set branch line is equally divided based on the division length; and

[0468] Step (S23) is executed, which is configured to divide the area of ​​the basic triangle sandwiched by the branch line pair into one or more triangles that are mutually non-repeated with the secondary division points on the two branches belonging to the branch line pair as vertices for each of the above-mentioned main division points according to each branch line pair that is set, as the above-mentioned fine division triangles, and obtain the above-mentioned combination information by using information specifying the combination method of the above-mentioned secondary division points belonging to each fine division triangle as combination information, and calculate the coordinates of the vertices of the above-mentioned fine division triangle according to each of the above-mentioned branch line pairs that are set respectively for the above-mentioned main division points using the above-mentioned vertex coordinate group, the above-mentioned main division number and the above-mentioned combination information,

[0469] The main division points are a plurality of (M+1) points including both end points of the first side and located at positions that divide the first side into equal parts by the number of main divisions.

[0470] The branch line is a line segment passing through the main dividing point from the first side to the second side and along the third side,

[0471] The secondary division points are a plurality of (N+1) points including the two end points of the branch line and dividing the branch line equally by the secondary division number.

[0472] The branch line pair is a combination of any two adjacent branch lines among the branch lines.

Claims

1. A triangle generating device (20), comprising: An acquisition unit (S1) configured to acquire a vertex coordinate group including coordinates of each vertex for one or more basic triangles; and The triangle dividing unit (S2) is configured to divide each of the basic triangles defined by the coordinates of each vertex included in the vertex coordinate group into a plurality of subdivided triangles. The above-mentioned triangle dividing part has: A main division number setting unit (S21, S240) configured to set the main division number (M) when the first side is equally divided based on a predetermined division length; a sub-division number setting unit (S22, S350) configured to set, for each of a plurality of main division points set on the first side, a sub-division number (N) for equally dividing the set branch line based on the division length; and The execution unit (S23) is configured to, for each of the above-mentioned main dividing points, divide the area of ​​the above-mentioned basic triangle sandwiched by the above-mentioned branch line pair into one or more triangles that are mutually divided without duplication using the secondary dividing points on the two branches belonging to the above-mentioned branch line pair as vertices as the above-mentioned fine dividing triangles according to each of the above-mentioned branch line pairs that are set, obtain the above-mentioned combination information by using information specifying a combination method of the above-mentioned secondary dividing points belonging to each of the fine dividing triangles as combination information, and calculate the coordinates of the vertices of the above-mentioned fine dividing triangles according to each of the above-mentioned branch line pairs that are respectively set for the above-mentioned main dividing points using the above-mentioned vertex coordinate group, the above-mentioned main dividing number and the above-mentioned combination information, The main division points are a plurality of (M+1) points including both end points of the first side and located at positions that divide the first side into equal parts by the number of main divisions. The branch line is a line segment passing through the main dividing point from the first side to the second side and along the third side, The secondary division points are a plurality of (N+1) points including the two end points of the branch line and dividing the branch line equally by the secondary division number. The branch line pair is a combination of any two adjacent branch lines among the branch lines.

2. The triangle generating device according to claim 1, wherein: In the above-mentioned basic triangle, the above-mentioned first side is the side opposite to the internal angle with the largest angle, the above-mentioned second side is the side opposite to the internal angle with an angle second larger than the above-mentioned largest angle, and the above-mentioned third side is the side opposite to the internal angle with the smallest angle.

3. The triangle generating device according to claim 1 or 2, wherein: When specifying the sub-dividing points belonging to one of the fine dividing triangles, the combination information alternately specifies sub-dividing points on the branch lines set for the main dividing points and sub-dividing points on the adjacent branch lines for each pair of branch lines set for the main dividing points.

4. The triangle generating device according to claim 1 or 2, wherein: Also available: a main division point identification setting unit (S330) configured to set a main division point identification number for identifying each main division point for each of the main division points; and The sub-division point identification setting unit (S545) is configured to set a sub-division point identification number for identifying each sub-division point for each of the sub-division points. Each of the above-mentioned secondary division points is determined by the above-mentioned primary division point identification number and the above-mentioned secondary division point identification number, The combination information specifies a combination method of the sub-division points belonging to the sub-division triangle based on the main division point identification number and the sub-division identification number.

5. The triangle generating device according to claim 1, wherein: The execution unit calculates coordinates of vertices of the finely divided triangle in parallel for each of the main division points.

6. The triangle generating device according to claim 1, wherein: The triangle dividing section further comprises a pre-shaping section (S11), The pre-shaping section includes: an object determination unit (S120) configured to determine, for each of the basic triangles defined by the vertex coordinate group, whether the basic triangle is an object triangle having a shape with a relatively large degree of consistency with the equilateral triangle; a pre-shaping execution unit (S150) configured to divide the basic triangle determined not to be the target triangle into a plurality of triangles so as to form a shape having a relatively large degree of consistency with the equilateral triangle; and The adding unit (S155) is configured to generate a new vertex coordinate group including vertex coordinates of the divided triangle. The above-mentioned triangle division unit sets the main division number by the main division number setting unit, sets the sub-division number by the sub-division number setting unit, and calculates the coordinates of the vertices of the plurality of subdivided triangles that further divide the area of ​​the above-mentioned basic triangle for each of the basic triangles defined by the coordinates of each vertex included in the above-mentioned new vertex coordinate group generated by the above-mentioned pre-shaping unit.

7. The triangle generating device according to claim 6, wherein: The object determination unit determines whether the maximum value of the internal angle of each of the basic triangles is less than the allowable angle, and determines that the basic triangle is the object triangle when the maximum value of the internal angle is less than the allowable angle, and determines that the basic triangle is not the object triangle when the maximum value of the internal angle is greater than the allowable angle.

8. The triangle generating device according to claim 6 or 7, wherein: When the object determination unit determines that the basic triangle is not the object triangle, the pre-shaping unit divides the basic triangle into two using a bisector that bisects an internal angle having a maximum value in the basic triangle.

9. A triangle generation method, comprising: obtaining a vertex coordinate group including coordinates of each vertex for one or more basic triangles, and dividing each of the basic triangles defined by the coordinates of each vertex included in the vertex coordinate group into a plurality of finely divided triangles, Set the number of main divisions (M) when the first side is divided equally based on the predetermined division length. For each of the plurality of main division points set on the first side, the number of sub-divisions (N) is set when the set branch line is equally divided based on the division length. For each of the above-mentioned main dividing points, according to each branch line pair that is set, the area of ​​the above-mentioned basic triangle sandwiched by the above-mentioned branch line pair is divided into one or more triangles that are mutually non-repeated with the secondary dividing points on the two branches belonging to the above-mentioned branch line pair as vertices as the above-mentioned fine dividing triangles, and the above-mentioned combination information is obtained by using information specifying the combination method of the above-mentioned secondary dividing points belonging to each of the fine dividing triangles as combination information, and the coordinates of the vertices of the above-mentioned fine dividing triangles are calculated according to each of the above-mentioned branch line pairs that are respectively set for the above-mentioned main dividing points using the above-mentioned vertex coordinate group, the above-mentioned main dividing number and the above-mentioned combination information, The main division points are a plurality of (M+1) points including both end points of the first side and located at positions that divide the first side into equal parts by the number of main divisions. The branch line is a line segment passing through the main dividing point from the first side to the second side and along the third side, The secondary division points are a plurality of (N+1) points including the two end points of the branch line and dividing the branch line equally by the secondary division number. The branch line pair is a combination of any two adjacent branch lines among the branch lines.

10. A triangle generation program, causing a computer to function as a triangle generation device, comprising: The acquisition step (S1) is configured to acquire a vertex coordinate group including coordinates of each vertex for one or more basic triangles; and The triangle division step (S2, S12) is configured to divide each of the basic triangles defined by the coordinates of each vertex included in the vertex coordinate group into a plurality of fine division triangles. The above triangle segmentation steps have: a main division number setting step (S21, S240), configured to set the main division number (M) when the first side is equally divided based on a predetermined division length; a sub-division number setting step (S22, S350), configured to set, for each of the plurality of main division points set on the first side, a sub-division number (N) when the set branch line is equally divided based on the division length; and Step (S23) is executed, which is configured to divide the area of ​​the basic triangle sandwiched by the branch line pair into one or more triangles that are mutually non-repeated with the secondary division points on the two branches belonging to the branch line pair as vertices for each of the above-mentioned main division points according to each branch line pair that is set, as the above-mentioned fine division triangles, and obtain the above-mentioned combination information by using information specifying the combination method of the above-mentioned secondary division points belonging to each fine division triangle as combination information, and calculate the coordinates of the vertices of the above-mentioned fine division triangle according to each of the above-mentioned branch line pairs that are set respectively for the above-mentioned main division points using the above-mentioned vertex coordinate group, the above-mentioned main division number and the above-mentioned combination information, The main division points are a plurality of (M+1) points including both end points of the first side and located at positions that divide the first side into equal parts by the number of main divisions. The branch line is a line segment passing through the main dividing point from the first side to the second side and along the third side, The secondary division points are a plurality of (N+1) points including the two end points of the branch line and dividing the branch line equally by the secondary division number. The branch line pair is a combination of any two adjacent branch lines among the branch lines.

Citation Information

Patent Citations

  • Bushing

    JP2022102150A

  • Tessellation method using displacement factors

    US10832473B2