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

The triangle generation device and method address the issue of triangle deviation from equilateral shapes by pre-shaping basic triangles into subdivided triangles that closely resemble equilateral triangles, enhancing accuracy and efficiency in computer graphics calculations.

JP7694477B2Active Publication Date: 2025-06-18DENSO CORP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2022102151
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2022-06-24
Publication Date
2025-06-18
Estimated Expiration
2042-06-24

AI Technical Summary

Technical Problem

Existing methods for dividing triangles in computer graphics often result in new triangles that deviate from an equilateral shape, leading to decreased analysis accuracy and increased calculation time.

Method used

A triangle generation device and method that acquire vertex coordinates of basic triangles and divide them into subdivided triangles through pre-shaping to align with an equilateral triangle shape, ensuring the subdivided triangles maintain a high degree of coincidence with an equilateral triangle.

Benefits of technology

The approach effectively suppresses the deviation of new subdivided triangles from an equilateral shape, improving analysis accuracy and reducing calculation time by maintaining a consistent triangle shape.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007694477000016
    Figure 0007694477000016
  • Figure 0007694477000017
    Figure 0007694477000017
  • Figure 0007694477000018
    Figure 0007694477000018
Patent Text Reader

Abstract

To suppress new triangles created by dividing a triangle from moving away from a regular triangle.SOLUTION: A triangle creation device 20 comprises an acquisition unit and a triangle division unit. The triangle division unit is configured to divide each basic triangle defined by coordinates of vertices included in a vertex coordinate group into a plurality of subdivided triangles. The triangle division unit has an object determination unit, a pre-shaping execution unit, and an addition unit. The pre-shaping execution unit is configured to divide a basic triangle determined not to be an object triangle into a plurality of triangles so as to have a shape with a relatively large degree of coincidence with a regular triangle. The addition unit is configured to generate a new vertex coordinate group including vertex coordinates of the triangles after the division. The triangle division unit calculates the coordinates of the vertices of the plurality of subdivided triangles for each basic triangle defined by the coordinates of vertices included in the new vertex coordinate group generated by the addition unit.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a technique for dividing a triangle to generate a plurality of new triangles.

Background Art

[0002] For example, Patent Document 1 below discloses a technique related to tessellation for bisecting a triangle so that it becomes a predetermined size or less.

Prior Art Documents

Patent Documents

[0003]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0004] Tessellation is one of the image calculation methods in computer graphics. Tessellation is a technique for further dividing a large number of polygons (for example, triangular polygons) used to represent a three-dimensional solid on a two-dimensional image into finer parts, and is a technique for more detailed and smooth representation of a three-dimensional solid based on the divided triangles.

[0005] In the method described in Patent Document 1, a dividing line is drawn from a certain vertex of a triangle toward the opposite side, and this operation of bisecting the triangle with this dividing line is repeatedly executed. In this method, for example, when the triangle before division is a relatively long and narrow triangle, the triangle after division may also be a relatively long and narrow triangle. That is, the triangle after division may deviate from an equilateral triangle.

[0006] However, in image calculation in computer graphics, it is known that the more a triangle deviates from an equilateral triangle (that is, the lower the aspect ratio of the triangle), the more likely it is to lead to a decrease in analysis accuracy and an increase in calculation time.

[0007] One aspect of the present disclosure aims to suppress a new triangle generated by dividing a triangle from moving away from an equilateral triangle.

Means for Solving the Problem

[0008] One aspect of the present disclosure is a triangle generation device (20). The triangle generation device includes an acquisition unit (S1) and a triangle division unit (S2). The acquisition unit is configured to acquire a vertex coordinate group including the coordinates of each vertex for one or more basic triangles. The triangle division unit 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. Further, the triangle division unit has an object determination unit (S120), a pre-shaping execution unit (S150), and an addition unit (S155).

[0009] The object determination unit is configured to determine, for each of the basic triangles defined by the vertex coordinate group, whether it is an object triangle having a shape with a relatively high degree of coincidence with an equilateral triangle. The pre-shaping execution unit is configured to divide a basic triangle determined not to be an object triangle into a plurality of triangles so as to have a shape with a relatively high degree of coincidence with an equilateral triangle. The addition unit is configured to generate a new vertex coordinate group including the vertex coordinates of the divided triangles.

[0010] For each of the basic triangles defined by the coordinates of each vertex included in the new vertex coordinate group generated by the addition unit, the triangle division unit calculates the coordinates of the vertices of a plurality of subdivided triangles that divide the area of the basic triangle smaller than the basic triangle.

[0011] In the triangle generation device of the present disclosure configured as described above, the basic triangles defined by the coordinates of each vertex included in the new vertex coordinate group generated by the addition unit have a shape with a relatively high degree of coincidence with an equilateral triangle as a result of the execution of the pre-shaping execution unit. The triangle generation device calculates the coordinates of the vertices of a plurality of subdivided triangles for each of such basic triangles having a shape with a relatively high degree of coincidence with an equilateral triangle. Therefore, the triangle generation device can obtain subdivided triangles with a relatively high degree of coincidence with an equilateral triangle as compared with the case of dividing the basic triangles into subdivided triangles without executing the pre-shaping execution unit. As a result, it is possible to suppress the new subdivided triangles generated by dividing the basic triangles from moving away from the equilateral triangle.

[0012] Another aspect of the present disclosure is a triangle generation method configured to obtain a vertex coordinate group including the coordinates of each vertex for one or more basic triangles and 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.

[0013] The triangle generation method of the present disclosure configured as described above is a method executed by the triangle generation device of the present disclosure, and the same effects as those of the triangle generation method of the present disclosure can be obtained. Still another aspect of the present disclosure is a triangle generation program executed by a triangle generation device, including an acquisition step and a triangle division step. The triangle generation program of the present disclosure is a program executed by the triangle generation device of the present disclosure, and by executing the program, the same effects as those of the triangle generation device of the present disclosure can be obtained.

Brief Description of the Drawings

[0014]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12

Figure 13

Figure 14

Figure 15

Figure 16

Figure 17

Figure 18

Figure 19

Figure 20

Figure 21

Figure 22

Figure 23

Figure 24

Figure 25

Figure 26

Figure 27

Figure 28

Figure 29

Figure 30

Figure 31

Modes for Carrying Out the Invention

[0015] [First Embodiment] The first embodiment of the present disclosure will be described below with reference to the drawings. [1 - 1. Configuration] As shown in FIG. 1, 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.

[0016] The display unit 11 includes a display device (not shown) and displays various images on the display screen of the display device. The operation input unit 12 outputs input operation information for specifying the input operation performed by the user via a keyboard and a mouse (not shown).

[0017] The data storage unit 13 is a storage device for storing various data. The data input / output unit 14 performs data input / output with external devices connected by wire or wirelessly.

[0018] The control unit 15 is mainly composed of a microcomputer including an electronic computing device (hereinafter referred to as the computing device 20), a ROM 23, a RAM 24, etc. The computing device 20 includes at least one of a CPU 21 and a GPU 22. Various functions of the microcomputer are realized by the computing device 20 executing a program stored in a non-transitory tangible recording medium. In this example, the ROM 23 corresponds to the non-transitory tangible recording medium storing the program. Also, by executing this program, a method corresponding to the program is executed. Note that part or all of the functions executed by the computing device 20 may be configured hardware-wise by one or a plurality of ICs or the like. Also, the number of microcomputers constituting the control unit 15 may be one or plural.

[0019] 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 may be installed via a recording medium or a network. Examples of the recording medium include an optical disk, a magnetic disk, and a semiconductor memory.

[0020] The simulation program 25 is a program for reproducing the three-dimensional shape of a road and the three-dimensional shape around the road in a virtual space and executing a simulation in which a vehicle travels on the road reproduced in this virtual space. For example, the simulation may include a simulation of transmitting and receiving radar waves by a radar device mounted on a vehicle in a virtual space in which a vehicle travels and is displayed on a display device. By starting the simulation program 25, a radar simulation that simulates the travel of a vehicle and the transmission and reception of radar waves by a radar device may be executed. By starting the simulation program 25, data representing roads, three-dimensional shapes around the roads, etc. to be reproduced on the virtual space described above with a number of polygons (hereinafter referred to as polygon data) may be acquired. Further, calculations for simulating the transmission and reception of radar waves may be performed based on the polygon data indicating the three-dimensional shape. Note that the simulation may include various other simulations.

[0021] For example, the drawing program 26 is a program for generating an image showing roads, three-dimensional shapes around the roads, etc. reproduced on the virtual space used for the above-described radar simulation. The drawing program 26 may be started triggered by the start of the simulation program 25, or may be started alone. By starting the drawing program 26, polygon data of roads, three-dimensional shapes around the roads, etc. to be reproduced on the virtual space described above may be acquired, and an image showing the three-dimensional shape may be generated.

[0022] A number of polygon data representing three-dimensional shapes, etc. 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 indicating the coordinates of each vertex of a number of polygons (for example, triangular polygons) (hereinafter referred to as vertex coordinates).

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

[0024] New vertex coordinate data including the vertex coordinates of triangles smaller than the basic triangles is output by the triangle generation process, and an image showing a three-dimensional shape is generated based on this vertex coordinate data. As a result, a more detailed and smoother image is generated in the drawing or the like on the display device by the display unit 11.

[0025] [1-2. Process] The procedure of the triangle generation process executed by the arithmetic unit 20 will be described using the flowchart of FIG. 2. The triangle generation process is started, for example, triggered by the execution of the simulation program 25 or the execution of the drawing program 26. However, the trigger for executing the triangle generation process is not limited to the execution of the simulation program 25 and the drawing program 26, and it may be executed by any trigger.

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

[0027] Next, in S2, the arithmetic unit 20 executes triangle division. Triangle division divides the basic triangle to generate a plurality of triangles smaller than the basic triangle (hereinafter also referred to as subdivided triangles). Note that generating a triangle as described below includes executing a calculation to calculate the vertex coordinates of the triangle and outputting (i.e., storing) the calculated vertex coordinates in a memory such as the RAM 24.

[0028] In S3, the arithmetic unit 20 outputs new vertex coordinate data including the vertex coordinates of triangles smaller than the basic triangle (i.e., subdivided triangles). For example, the arithmetic unit 20 may output the above-described vertex coordinate data to any memory or the like that can be used in the simulation program 25, the drawing program 26, or other applications. The arithmetic unit 20 thus ends the triangle generation process.

[0029] Next, the details of the triangle division (i.e., triangle generation process) executed by the arithmetic unit 20 in S2 will be described based on the flowchart shown in FIG. 3. In S11, the arithmetic unit 20 executes pre-shaping (i.e., Pre-tessellation Reshaping). Pre-shaping is a process for reshaping a triangle having a shape with a relatively small degree of coincidence with an equilateral triangle among basic triangles into a plurality of triangles having a shape with a relatively large degree of coincidence with an equilateral triangle based on polygon vertex coordinate data.

[0030] In the subsequent S12, the arithmetic unit 20 executes multi-stage division (i.e., Cascade Tessellation). Multi-stage division is a process for generating subdivided triangles for each basic triangle. In the present embodiment, before the multi-stage division (i.e., before generating the subdivided triangles), the above-described pre-shaping process is executed as a pre-process. That is, in the present embodiment, the multi-stage division is executed for basic triangles having a shape relatively close to an equilateral triangle. Also, in the present embodiment, the subdivided triangles are a plurality of triangles smaller than the basic triangles obtained by dividing a basic triangle having a shape relatively close to an equilateral triangle. The arithmetic unit 20 thus completes the triangle division.

[0031] [1-2-1. Pre-shaping] The details of the pre-shaping executed by the arithmetic unit 20 in S11 will be described based on the flowchart shown in FIG. 4.

[0032] <Process> First, in S105, the arithmetic unit 20 acquires polygon vertex coordinate data. The vertex coordinates are three for each basic triangle. Here, it is assumed that the polygon vertex coordinate data includes the vertex coordinates of L basic triangles. For example, each element included in the polygon vertex coordinate data is (v0, v1, v2, v3, v4, v5, ···, v 3k , v 3k+1 , v 3k+2It is shown as (...). k is an integer from 0 to L - 1. v is the vertex coordinate. The vertex coordinate v may be represented by coordinates, for example, as (x, y), or may be represented by a position vector.

[0033] Hereinafter, the polygon vertex coordinate data is described as in the array vertices[]. The elements of the array vertices[] are represented by floating-point numbers. Note that for the elements of the array, [] may be omitted and described simply as vertices, for example, for the elements of the array vertices[]. The index (hereinafter, idx) is a variable for specifying the elements of the array, and here, the range is 0 ≤ idx ≤ L - 1. That is, the elements of the array vertices[3idx], vertices[3idx + 1], and vertices[3idx + 2] indicate the vertex coordinates of one basic triangle specified by idx. 3idx, or 3 * idx, represents the multiplication of 3 and idx. For example, the basic triangle specified by idx = 0 is a basic triangle with the vertex coordinates stored in the elements of the array vertices[0], vertices[1], vertices[2] (that is, specifically (v0, v1, v2) described above) as the vertices of the triangle.

[0034] In S110 - S130, the arithmetic unit 20 identifies a triangle that is not a target triangle among the basic triangles specified by the value stored in idx. The target triangle refers to a triangle having a shape relatively close to an equilateral triangle. A shape relatively close to an equilateral triangle is a shape having a relatively large degree of coincidence with an equilateral triangle. The degree of coincidence with an equilateral triangle is represented by, for example, the aspect ratio. The aspect ratio ranges from 0 ≤ aspect ratio ≤ 1, and the aspect ratio of an equilateral triangle is 1. The degree of coincidence with an equilateral triangle is larger as the aspect ratio is relatively large (that is, relatively close to 1). It can also be said that the target triangle is a triangle with a relatively large aspect ratio (that is, relatively close to 1). Hereinafter, a triangle that is not a target triangle is also referred to as a non-target triangle.

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

[0036] For example, FIG. 5 shows a certain basic triangle specified by idx = k. Each element of the array before rearrangement is shown in FIG. 6. That is, the vertex coordinates stored in the array element vertices[3k] are V 3k , the vertex coordinates stored in the array element vertices[3k + 1] are V 3k+1 , and the vertex coordinates stored in the array element vertices[3k + 2] are V 3k+2 .

[0037] First, the arithmetic unit 20 calculates the length of the opposite side a of the vertex indicated by the vertex coordinate v 3k , the length of the opposite side b of the vertex indicated by the vertex coordinate v 3k+1 , and the length of the opposite side c of the vertex indicated by the vertex coordinate v 3k+2 based on each vertex coordinate. Then, the arithmetic unit 20 determines the order of the opposite sides a, b, and c in descending order of length. In the example of FIG. 5, the lengths of the opposite sides are c > b > a. The arithmetic unit 20 rearranges the order of each vertex so that the vertices corresponding to the determined order of the lengths of the opposite sides (i.e., c > b > a) are arranged in order.

[0038] As a result, after rearrangement, as shown in FIG. 7, v 3k+1 is stored as the array element vertices[3k], v 3k+2 is stored as the array element vertices[3k + 1], and v 3k is stored as the array element vertices[3k + 2]. That is, the vertex coordinates are rearranged so that the length of the opposite side is in descending order.

[0039] Next, in S120, the arithmetic unit 20 determines whether the basic triangle specified by the value stored in idx is the target triangle described above. Here, in the present embodiment, the arithmetic unit 20 determines that it is the target triangle when the maximum value of the interior angles is less than a predetermined allowable angle. On the other hand, the arithmetic unit 20 determines that it is a non-target triangle when the maximum value of the interior angles is greater than or equal to the allowable angle. In the present embodiment, the allowable angle is 120°. Note that the allowable angle is not limited to 120°, and may be any angle within a predetermined range including 120°.

[0040] As described above, the vertex coordinates of the basic triangle specified by the value stored in idx are rearranged in the array vertices[] so that the lengths of the opposite sides are in descending order. That is, among the array elements vertices[3idx], vertices[3idx + 1], and vertices[3idx + 2], the vertex coordinates stored as the first array element vertices[3idx] indicate the vertex with the largest interior angle.

[0041] The arithmetic unit 20 uses the cosine law c 2 =a 2 +b 2 - 2abcosθ to calculate θ as the angle indicating the maximum value of the interior angles. Here, c is the length of the opposite side of the vertex with the largest interior angle, and a and b are the lengths of the remaining sides. The opposite side of the vertex with the largest interior angle is the opposite side of the vertex indicated by the vertex coordinates stored in the first array element vertices[3idx] among the three vertex coordinates. The remaining sides are the opposite sides of the vertices indicated by the vertex coordinates stored in the array elements vertices[3idx + 1] and vertices[3idx + 2].

[0042] The array flag[idx] represents the flag value regarding the basic triangle specified by the value stored in idx. Here, when the arithmetic unit 20 determines that the basic triangle is an asymmetric triangle, that is, when it determines that the maximum value θ of the interior angles is greater than or equal to the allowable angle, it stores 1 in the array flag[idx]. On the other hand, when the arithmetic unit 20 determines that the basic triangle is a symmetric triangle, that is, when it determines that the maximum value of the interior angles is less than the allowable angle, it stores 0 in the array flag[idx].

[0043] In S125, the arithmetic unit 20 increments idx. That is, the arithmetic unit 20 stores the value obtained by adding 1 to the value stored in idx in idx. In S130, the arithmetic unit 20 determines whether the value stored in idx is greater than or equal to L. Here, when it determines that the value is greater than or equal to L, the process proceeds to S135. On the other hand, when it determines that the value is less than L, it proceeds to S115 and repeats the processes of S115 - S130 until idx becomes greater than or equal to L.

[0044] In S135, the arithmetic unit 20 stores the cumulative sum of the elements flag[] of the array in the array scan[idx] specified by the value stored in idx. The cumulative sum of the elements flag[] of the array here refers to the sum of the values of each of the elements flag[0] to flag[idx] of the array.

[0045] 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., the 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. Thereby, when the value stored in idx is L - 1, the total number of asymmetric triangles among the L basic triangles is stored as the element scan[L - 1] of the array.

[0046] In S140 - S165, the arithmetic unit 20 divides a basic triangle determined to be a non - target triangle in S120 into a plurality (for example, two in this embodiment) of triangles so that the degree of coincidence with an equilateral triangle becomes a shape with a relatively large degree of coincidence.

[0047] First, in S140, the arithmetic unit 20 stores 0 in idx. In S145, the arithmetic unit 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 stored as the element flag[idx] of the array is 1, the arithmetic unit 20 determines that it is a non - target triangle and transfers the process to S150. On the other hand, when the value stored as the element flag[idx] of the array is 0, the arithmetic unit 20 determines that it is a target triangle and transfers the process to S160.

[0048] In S150, the arithmetic unit 20 divides the basic triangle specified by the value stored in idx into two by the angle bisector of the interior angle showing the maximum value so that the degree of coincidence of the divided triangles with an equilateral triangle becomes a shape with a relatively large degree of coincidence.

[0049] As described above, in the basic triangle specified by the value stored in idx, the vertex indicated by the vertex coordinates stored in the element vertices[3idx] of the array indicates the vertex with the largest interior angle. For example, as shown in FIG. 8, when the dividing line DL drawn from the vertex with the largest interior angle (for example, vertex coordinates v 3k+1 ) towards the opposite side (for example, side c) is the angle bisector of this interior angle, the intersection point of the dividing line DL and the opposite side c is set as point M. The opposite side c is divided by point M into m:n = a:b. The arithmetic unit 20 calculates the coordinates of point M based on equation (1).

[0050]

Equation

[0051] Here, the arithmetic unit 20 stores the vertex coordinates stored in the element vertices[3idx] of the array (i.e., v in FIG. 8) 3k+1 ), the vertex coordinates stored in the element vertices[3idx + 1] of the array (i.e., v 3k+2 ), and the coordinates of point M as the elements vertices[3idx], vertices[3idx + 1], and vertices[3idx + 2] of the array, respectively.

[0052] On the other hand, the arithmetic unit 20 stores the vertex coordinates stored in the element vertices[idx] of the array (i.e., v in FIG. 8) 3k+1 ), the vertex coordinates stored in the element vertices[idx + 2] of the array (i.e., v 3k ), and the coordinates of point M as the vertex coordinates of a new basic triangle and adds them to the end of the array vertices[].

[0053] Specifically, the arithmetic unit 20 stores, for example, the value obtained by adding the value stored in the element scan[idx] of the array to L - 1, which is the value stored in idx specifying the end of the array vertices[], in the variable aidx. aidx = (L - 1)+scan[idx]. Then, taking aidx as the vertex of the basic triangle specified by idx, the vertex coordinates stored in the element vertices[3idx] of the array (i.e., v 3k+1 ), the vertex coordinates stored in the element vertices[3idx + 2] of the array (i.e., v 3k ), and the coordinates of point M are stored as the elements vertices[3aidx], vertices[3aidx + 1], and vertices[3aidx + 2] of the array, respectively. Thereby, the vertex coordinates of the new basic triangle are added to the end of the array vertices[].

[0054] Note that the arithmetic unit 20 may reverse the array for storing the vertex coordinates of the divided triangle. That is, in the above example, the vertex coordinates v 3k+1 , the vertex coordinates v 3kThe coordinates of point M may be stored as elements vertices[3idx], vertices[3idx + 1], and vertices[3idx + 2] of the array, respectively. And the vertex coordinates v 3k+1 the vertex coordinates v 3k+2 The coordinates of point M may be stored as elements vertices[3aidx], vertices[3aidx + 1], and vertices[3aidx + 2] of the array, respectively.

[0055] In S160, the arithmetic unit 20 increments idx. That is, the arithmetic unit 20 stores in idx the value obtained by adding 1 to the value stored in idx. In S165, the arithmetic unit 20 determines whether the value stored in idx is greater than or equal to L. Here, when it is determined that the value is greater than or equal to L, the arithmetic unit 20 transfers the process to S170. On the other hand, when it is determined that the value is less than L, the arithmetic unit 20 transfers the process to S145 and repeats the processes of S145 - S165 until idx becomes greater than or equal to L.

[0056] In S170 - S185, the arithmetic unit 20 rearranges the vertex coordinates stored in elements vertices[3idx], vertices[3idx + 1], and vertices[3idx + 2] of the array for the basic triangle specified by the value stored in idx again so that the lengths of the opposite sides are in descending order. Note that in S170 - S185, idx ranges from 0 ≤ idx ≤ P. P is the value stored as (L - 1)+element scan[L - 1] of the array. The processes of S170, S175, and S180 are the same as those of S110, S115, and S125, respectively.

[0057] In S185, when the arithmetic unit 20 determines that idx is greater than or equal to P, the pre - shaping process ends here. As a result, the vertex coordinates of the basic triangles with the maximum value of the interior angles being 120° or less are sequentially stored in the array vertices[].

[0058] <Operation> The operation of the pre-shaping process will be described with reference to FIGS. 9 and 10. FIG. 9 shows an example (i.e., L = 10) in which the vertex coordinates of 10 basic triangles are included in vertices[]. FIG. 10 shows the array vertices[], the array flag[], and the array scan[]. In FIG. 10, for the array vertices[], the value stored in the array vertices[3idx] is described as vert[0], the value stored in the array vertices[3idx + 1] is described as vert[1], and the value stored in the array vertices[3idx + 2] is described as vert[2].

[0059] In S115, the arithmetic unit 20 rearranges the vertices within the basic triangle so that the lengths of the opposite sides are in descending order. As a result, for example, as shown in FIG. 10, each vertex coordinate is stored in the array vertices[] (i.e., vert[0] to vert[2]) as v0, v1, v2, ···.

[0060] In S120, the arithmetic unit 20 identifies the non-target triangles. As a result, for example, as shown in FIG. 10, the basic triangles specified by idx = 3, 5, 8, 9 are identified as non-target triangles, and 1 is stored as the elements of the array flag[3], [5], [8], [9].

[0061] In S135, the arithmetic unit 20 identifies the cumulative sum of flag[]. As a result, for example, as shown in FIG. 10, 1 is stored as the element of the array scan[3] specified by idx = 3, and the cumulative value 4 is stored as the element of the array scan[9] specified by idx = 9.

[0062] In S150, the arithmetic unit 20 divides the basic triangles specified by idx = 3, 5, 8, 9 identified as non-target triangles, and updates the array vertices[] with the divided triangles as new basic triangles. For example, the basic triangle specified by idx = 5 is divided by the dividing line DL into a triangle with vertex coordinates v15, v16, and point M5, and a triangle with vertex coordinates v15, v17, and point M5. The variable aidx stores a value of 11, which is the value of 9 (i.e., the value indicating L - 1) plus 2, the value stored in the array element scan[5].

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

[11] , the array element vert1

[11] , and the array element vert2

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

[0064] In S175, the arithmetic unit 20 rearranges the vertices within the basic triangle again so that the lengths of the opposite sides are in descending order. As a result, although not shown in the figure, in the new array vertices[], the vertex coordinates are stored so that the lengths of the opposite sides are in descending order in the basic triangle specified by the value stored in idx.

[0065] [Overview of multi-stage division] The outline of the multi-stage division executed by the arithmetic unit 20 in S12 will be described based on the flowchart shown in FIG. 11 and FIGS. 12 to 14. The triangles shown in FIGS. 12 to 14 represent one basic triangle defined by the vertex coordinates included in the above-described array vertices[]. In the present embodiment, since pre-shaping is performed as described above, each of the basic triangles defined by the vertex coordinates included in the array vertices[] has a shape with a relatively high degree of coincidence with an equilateral triangle.

[0066] <Name> First, the names of the line segments and vertices in the basic triangle will be described. The first major line is the longest side in the basic triangle and is the opposite side of the interior angle IA having the largest angle in the basic triangle, such as the first major line l0 shown in FIG. 12. In the basic triangle specified by the value stored in idx, the side connecting the vertex indicated by the vertex coordinate stored in the array element vertices[3idx + 1] and the vertex indicated by the vertex coordinate stored in vertices[3idx + 2] corresponds to the first major line l0.

[0067] The second major line is the second longest side in the basic triangle and is the opposite side of the interior angle having the second largest angle after the largest angle in the basic triangle, such as the second major line l1 shown in FIG. 12. In the basic triangle specified by the value stored in idx, the side connecting the vertex indicated by the vertex coordinate stored in the array element vertices[3idx] and the vertex indicated by the vertex coordinate stored in vertices[3idx + 2] corresponds to the second major line l1.

[0068] The third major line is, for example, the one shown in FIG. 12 3Like the major line l2, it is the shortest side in the basic triangle and is the side opposite the interior angle with the smallest angle in the basic triangle. In the basic triangle specified by the value stored in idx, the side connecting the vertex indicated by the vertex coordinates stored in the array element vertices[3idx] and the vertex indicated by the vertex coordinates stored in vertices[3idx + 1] corresponds to the third major line l2.

[0069] Also, in the basic triangle, vertex A B is also referred to as base point A B . Base point A B refers to the vertex that is the intersection of the first major line l0 and the second major line l1. Vertex A R is also referred to as right vertex A R . Right vertex A R refers to the vertex that is the intersection of the first major line l0 and the third major line l2. Vertex A L is Left also referred to as vertex A L . Left vertex A L refers to the vertex that is the intersection of the second major line l1 and the third major line l2.

[0070] <Operator> The operators used in the following description will be explained. The operator floor(a) is a function that returns the largest integer less than or equal to a. ceil(a) is a function that returns the smallest integer greater than or equal to a. mod(a,b) is a function that returns the remainder in the division of a by b. a / b represents the division of a by b. Note that float(a) means representing a in floating point. Here, a / b returns the value obtained by truncating the remainder from the division result when both a and b are integers. For example, 5 / 2 = 2. On the other hand, a / b gives the division result, for example, 5.0 / 2.0 = 2.5 when both a and b are floating points.

[0071] <Overview of the process> First, in S21, the arithmetic unit 20 executes processing on the major line. In the processing on the major line, the arithmetic unit 20 calculates the main division number (for example, M) in each basic triangle. M is an integer where M≥1. The main division number is the number of divisions when equally dividing the first major line (for example, based on a predetermined division length d0) in each basic triangle. The equal division here includes a plurality of divisions of 2 or more, a single division, and a non-division. The points on the first major line are a plurality (for example, M + 1) of points located at positions that equally divide the first major line l0 by the main division number. The points on the first major line are the two end points of the first major line l0 (that is, the base point A B and the right vertex A R ). That is, the points on the first major line l0 include at least two points on the first major line. The number of points on the first major line as described below refers to the number of points on the first major line on the first major line (for example, the above-mentioned M + 1). In FIG. 12, an example is shown where four points on the first major line are included on the first major line in the basic triangle. Note that maj_vert_num described later corresponds to the number of points on the first major line.

[0072] Next, in S22, the arithmetic unit 20 executes processing on the minor line. In the processing on the minor line, the arithmetic unit 20 sets a sub-division number (for example, N) for each of the plurality of points on the first major line l0. N is an integer where N≥0. The sub-division number is the number of divisions when equally dividing the set minor line (for example, based on the above-mentioned division length d0) for each of the plurality of points on the first major line. The equal division here includes a plurality of divisions of 2 or more, a single division, and a non-division of 0.

[0073] The minor line is a line segment that passes through the first major line upper point, extends from the first major line l0 to the second major line l1, and follows the third major line l2. The line segment along the third major line l2 is a line segment parallel to the third major line l2, and the line segment along the third major line l2 includes the third major line l2 itself. The minor line includes a line segment along the third major line l2 and having the base point A as the first major line upper point B and also includes the third major line l2 itself for the line segment set for the base point A

[0074] In the example of FIG. 13, the basic triangle has four minor lines (i.e., ml0 to ml3) set for each of the four first major line upper 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 arithmetic unit 20 calculates the coordinates of the first major line upper point and the second major line upper point. As described above, in the example of FIG. 13, ml3 is the third major line l2 and is also a minor line

[0075] Subsequently, in S23, the arithmetic unit 20 executes a subdivision process. In the subdivision process, the arithmetic unit 20 uses the array vertices[] after the above-described pre-shaping as the vertex coordinate group, the above-described main division number, and the combination information to calculate the coordinates of the vertices of the subdivided triangle for each minor line pair set for each of the above-described first major line upper points. The combination information refers to information specifying the combination method of the minor line upper points belonging to each subdivided triangle

[0076] The minor line upper point includes both end points of the minor line and is a point that equally divides the minor line by the above-described number of sub-divisions (e.g., N + 1). The both end points of the minor line are points on the first major line and the second major line located at both ends of the minor line. The number of minor line upper points described below refers to the number of minor line upper points on the minor line (e.g., the above-described N + 1). The m described later in_vert_num corresponds to the number of points on the minor line. Hereinafter, an overview of the minor line pair, the number of subdivided triangles in the minor line pair, and the combination information will be described.

[0077] <Regarding the minor line pair> A minor line pair is a combination of any two adjacent minor lines in the minor line. A subdivided triangle is one or more triangles that divide the region of the basic triangle sandwiched between the minor line pair, with the minor line points on the two minor lines belonging to the minor line pair as vertices, without overlapping each other. Hereinafter, the region of the basic triangle sandwiched between the minor line pair will also be simply referred to as the region sandwiched between the minor line pair.

[0078] Also, hereinafter, the minor line set for each of the first major line points will also be referred to as the reference minor line. In this embodiment, among the minor lines adjacent to the reference minor line, the minor line adjacent to the base point A B side is referred to as the adjacent minor line. That is, a minor line pair is a combination of a reference minor line and an adjacent minor line. Also, a subdivided triangle is one or more triangles that divide the region sandwiched between the minor line pair, with the minor line points on the reference minor line and the adjacent minor line belonging to the minor line pair as vertices, without overlapping each other.

[0079] In the example of FIG. 13, the two end points of the above-mentioned minor line are the points on the first major line l0 and the points on the second major line l1. For example, the above-mentioned four minor lines (i.e., ml0~ml3), ml0 has one minor line point (i.e., min_vert_num = 1 to be described later), and ml1 has two minor line points (i.e., min_vert_num = 2). ml2 has three minor line points (i.e., min_vert_num = 3), and ml3 has four minor line points (i.e., min_vert_num = 4). Base point AB The minor line upper point of the minor line ml0 set to is one (i.e., the base point A B ).

[0080] In the example of FIG. 13, for the right vertex A as the first major line upper point R , for the right vertex A R , the minor line ml3 set for the right vertex A and the minor line ml2 set for the first major line upper point (hereinafter also referred to as point A2) adjacent to the base point A side of the right vertex A R are a pair of minor lines. In this pair of minor lines, ml3 corresponds to the reference minor line and ml2 corresponds to the adjacent minor line. For the point A2 as the first major line upper point, the minor line ml2 (i.e., the reference minor line) set for the point A2 and the minor line ml1 (i.e., the adjacent minor line) set for the point (hereinafter also referred to as point A1) adjacent to the base point A side of the point A2 B are a pair of minor lines. Similarly, for the point A1 as the first major line upper point, the minor line ml1 (i.e., the reference minor line) set for the point A1 and the minor line ml0 (i.e., the adjacent minor line) set for the point (i.e., the base point A B ) adjacent to the base point A side of the point A1 B are a pair of minor lines. B )

[0081] In addition, in the basic triangle, in this embodiment where a pair of minor lines is set in order from the first major line upper point far from the base point A B towards the base point A B , the minor line set for the base point A as the first major line upper point B is not set as the reference minor line. That is, as shown in FIG. 13, there are three pairs of minor lines set in the basic triangle as an example.

[0082] <Regarding the number of subdivided triangles in the pair of minor lines> For example, the right vertex A as the above-mentioned first major line upper point R Regarding the right vertex A R The region sandwiched between the minor line ml3 set for the right vertex A and the adjacent minor line ml2 is divided into non-overlapping triangles by a pair of minor lines, and the triangles are sub-divided triangles. In the division, the minor line upper points on the two minor lines ml3 (i.e., the reference minor line) and ml2 (i.e., the adjacent minor line) belonging to the pair of minor lines are used as the vertices of the sub-divided triangles. In the above example, as shown in FIG. 13, for example, the right vertex A R The number of sub-divided triangles that divide the region of the basic triangle sandwiched between the reference minor line ml3 set for the right vertex A and the adjacent minor line ml2 is calculated to be 5.

[0083] Each of the sub-divided triangles that divide the region of the basic triangle sandwiched between the pair of minor lines may be individually identified by an in-region identification number (i.e., tess_prim_idx described later). The in-region number is a number assigned to each of the sub-divided triangles that divide the region sandwiched between the pair of minor lines, and may be a number that increases as it moves away from the first major line with the first major line side as the starting point (i.e., 0). For example, the numbers underlined in FIG. 14 correspond to the in-region identification numbers. For example, as shown in FIG. 13, for the right vertex A R The sub-divided triangles that divide the region sandwiched between the reference minor line ml3 set for the right vertex A and the adjacent minor line ml2 may be set with in-region identification numbers such as 0, 1, 2, 3, 4 in order from the first major line side.

[0084] <Regarding combination information> The above-mentioned combination information specifies the combination method of the minor line upper points belonging to each sub-divided triangle. Although the details will be described later, the combination information specifies the combination method of the major line upper points belonging to each sub-divided triangle in order from the sub-divided triangle on the first major line side.

[0085] For example, in the minor line pair of the reference minor line ml3 and the adjacent minor line ml2, first, for the first subdivided triangle as seen from the first major line, the combination method of the points on the minor line is specified as follows. The first subdivided triangle as seen from the first major line is the subdivided triangle with the in-region identification number = 0. That is, the first one is the point on the minor line ml3 that is the first point on the minor line as seen from the first major line. The second one is the point on the minor line ml2 that is the first point on the minor line as seen from the first major line. The third one is the point on the minor line ml3 that is the second point on the minor line as seen from the first major line.

[0086] Also, for the second subdivided triangle as seen from the first major line, the combination method of the points on the minor line is specified as follows. The second subdivided triangle as seen from the first major line is the subdivided triangle with the in-region identification number = 1. That is, the first one is the point on the minor line ml2 that is the first point on the minor line as seen from the first major line. The second one is the point on the minor line ml3 that is the second point on the minor line as seen from the first major line. The third one is the point on the minor line ml2 that is the second point on the minor line as seen from the first major line.

[0087] For the third subdivided triangle as seen from the first major line, the combination information is the same as that of the first subdivided triangle, that is, the base point A BSpecify how to combine the points on the minor line so that it becomes a triangle that bulges to the side. The third sub-divided triangle as seen from the first major line is the sub-divided triangle with the in-region identification number = 2. That is, for the first one, use the point on the minor line on ml3 that is the second point on the minor line as seen from the first major line. For the second one, use the point on the minor line on ml2 that is the second point on the minor line as seen from the first major line. For the third one, use the point on the minor line on ml3 that is the third point on the minor line as seen from the first major line. At this time, the point on the minor line specified first shall be the point on the minor line adjacent in the direction along the minor line (that is, the direction away from the first major line) to the point on the minor line specified first in the first sub-divided triangle.

[0088] For the combination information regarding the fourth sub-divided triangle as seen from the first major line, similar to the second sub-divided triangle, that is, the base point A B Specify how to combine the points on the minor line so that it becomes a triangle that bulges to the side opposite to the base point A. The fourth sub-divided triangle as seen from the first major line is the sub-divided triangle with the in-region identification number = 3. That is, for the first one, use the point on the minor line on ml2 that is the second point on the minor line as seen from the first major line. For the second one, use the point on the minor line on ml3 that is the third point on the minor line as seen from the first major line. For the third one, use the point on the minor line on ml2 that is the third point on the minor line as seen from the first major line. At this time, the point on the minor line specified first shall be the point on the minor line adjacent in the direction along the minor line (that is, the direction away from the first major line) to the point on the minor line specified first in the second sub-divided triangle. The same shall apply hereinafter.

[0089] That is, the combination information specifies how to combine the points on the minor line for each pair of minor lines, for example, like the dotted line with arrows shown in Fig. 14. In other words, the combination information, for example, when the in-region identification number is even, is the base point A BThe combination method of points on the minor line may be specified so as to form a triangle that bulges to the side (hereinafter, also referred to as the first specified pattern). Also, when the region identification number is odd, the base point A B The combination method of points on the minor line may be specified so as to form a triangle that bulges to the opposite side of (hereinafter, also referred to as the second specified pattern).

[0090] Each of the points on the minor line can be specified by the main division point identification number (that is, maj_div_idx described later) and the sub-division point identification number (that is, m in _div_idx) described later. As will be described later, the combination information identifies the fine division triangles that divide the region sandwiched between the minor line pairs by the region identification number, and specifies the combination method of the points on the minor line belonging to the identified fine division triangles based on the main division point identification number and the sub-division Point identification number. Note that, as will be described later, the combination information may specify the combination method of the points on the minor line belonging to the fine division triangle based on the displacement amount of the main division point identification number and the displacement amount of the sub-division point identification number.

[0091] In this embodiment, the arithmetic unit 20 generates the combination information that specifies the combination method of the points on the minor line belonging to the fine division triangle as described above. The arithmetic unit 20 calculates the coordinates of the vertices of the fine division triangle for each minor line pair set for each of the points on the first major line using the vertex coordinate group, the main division number, and the combination information. The arithmetic unit 20 generates fine division triangles at all the basic triangles, in other words, at all the points on the first major line, and ends the multi-stage division.

[0092] [1-2-3. Details of multi-stage division] Specifically, the details of the multi-stage division will be described. (1) Processing on the major line The major line processing executed in the multi-segment division S21 will be described based on the flowchart shown in FIG. 15. In this process, the array vertices[] after the above-mentioned pre-shaping is executed is used as the input array, and the following arrays are output. Outputting an array means generating an array (i.e., storing values in the elements of the array). The output array is also referred to as the output array. The output arrays are the array prim_id[idx], the array maj_vert_num[idx], and the array csum_maj_vert_num[idx].

[0093] Here, the variable idx (hereinafter referred to as idx) ranges from 0 ≤ idx ≤ P - 1. The total number of idx used in this process is equal to the total number of basic triangles (hereinafter also referred to as the number of basic triangles P) defined by the vertex coordinates stored in the array vertices[]. Note that idx used in the major line processing is hereinafter also referred to as idx_p for distinction.

[0094] <Explanation of each array> The array prim_id[idx] is an array that stores a value (hereinafter also referred to as the basic ID) corresponding to an identification number for identifying each of the basic triangles specified by idx among 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 above-mentioned first major line point count for the basic triangle specified by idx. In the following, similar to the description of the multi-segment division, the elements of the array may be described simply as, for example, prim_id. Note that the elements of the array vertices[] are represented by floating-point numbers, the elements of the array prim_id[] are represented by integers of 0 or more, and the elements of the array maj_vert_num[] are represented by positive integers.

[0095] <Processing> First, in S200, the arithmetic unit 20 stores 0 in idx. Next, in S210, the arithmetic unit 20 sets the basic triangle number P. The arithmetic unit 20 stores the number of basic triangles defined by the vertex coordinates stored in the array vertices[] after the pre-shaping process in the basic triangle number P. The basic triangle number P corresponds to the number of loop iterations (i.e., the number of repetitions) of the processes in S220 to S260 described later.

[0096] Next, in S220, the arithmetic unit 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[].

[0097] Next, in S230, the arithmetic unit 20 acquires the vertex coordinates for the basic triangle specified by the value stored in idx. That is, the arithmetic unit 20 acquires the elements vertices[3idx], vertices[3idx + 1], and vertices[3idx + 2] of the array.

[0098] In the subsequent S240, the arithmetic unit 20 calculates the number of points on the first major line for the basic triangle specified by the value stored in idx. As described above, the points on the first major line include the vertices A B , A R at both ends of the first major line l0 as shown in FIG. 12 above. The arithmetic unit 20 calculates the number of points on the first major line based on equation (2) and stores the calculated value in the array maj_vert_num[idx].

[0099]

Equation

[0100] (2) The first term in the formula corresponds to the above-mentioned main division number. That is, the arithmetic unit 20 calculates the value obtained by dividing the length of the first major line by the division length d0, rounds the calculated value to the nearest integer greater than or equal to the calculated value, and calculates the value obtained by adding 1 to the rounded value as the number of points on the first major line. Since the rounded value is used, the interval between the points on the first major line is a length corresponding to the division length d0. The length corresponding to the division length d0 does not necessarily have to be exactly the same as the division length d0, but means a length within a predetermined range including the division length d0. The division length d0 may be stored in advance in a memory such as the ROM 23. 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.). According to the formula (2), the number of points on the first major line is calculated as an integer of 2 or more.

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

[0102] Next, in S250, the arithmetic unit 20 increments idx. That is, the arithmetic unit 20 stores the value obtained by adding 1 to the value stored in idx into idx. In the subsequent S260, the arithmetic unit 20 determines whether the value stored in idx is greater than or equal to the number of basic triangles P. Here, if the value stored in idx is greater than or equal to the number of basic triangles P, the process proceeds to S270.

[0103] On the other hand, if the value stored in idx is less than the number of basic triangles P, the arithmetic unit 20 proceeds to S220 and repeats the processes of S220 to S260 based on the newly stored value in idx.

[0104] In S270, for example, the arithmetic unit 20 may change idx by 1 within the range of 0 ≦ idx ≦ P - 1, calculate the total number of elements maj_vert_num[idx] in the array, and store the calculated total number in csum_maj_vert_num[idx]. The total number of elements maj_vert_num[idx] in the array refers to the sum of elements maj_vert_num[0] to maj_vert_num[idx] in the array.

[0105] When P - 1 is stored in idx, the element csum_maj_vert_num[P - 1] in the array corresponds to the total number Q of first major line points (hereinafter also referred to as cumulative sum Q) included in all P basic triangles. Then, the arithmetic unit 20 ends the processing on the major line.

[0106] <Operation> An example of the operation of the processing on the major line will be described with reference to FIGS. 20 and 29. In FIG. 20, an example where the number of basic triangles P = 3 will be described. Assuming that the number of loop iterations of the processing on the major line is equal to the value stored in the number of basic triangles P as described above, values are stored in the arrays prim_id[0] to prim_id[P - 1] (for example, P = 2) by repeating S220. In the example of FIG. 20, as shown in FIG. 29, 0, 1, and 2 are stored as the elements prim_id[0] to prim_id[2] of the array, and basic IDs such as 0, 1, and 2 are set in order from the first triangle.

[0107] Also, assuming that the number of first major line points is calculated for each basic triangle by repeating S240, as shown in FIG. 20, 4, 3, and 3 are stored as the elements maj_vert_num[0] to maj_vert_num[2] of the array, as shown in FIG. 29.

[0108] Also, when S270 is executed, as shown in FIG. 29, 4, 7, and 10 are stored as the elements csum_maj_vert_num[0] to csum_maj_vert_num[2] of the array, respectively. That is, the value 10 stored as the element csum_maj_vert_num[P - 1] (for example, P = 3) of the array is calculated as the total number Q (i.e., the cumulative sum Q) of the points on the first major line in all the basic triangles.

[0109] Note that hereinafter, the arrays prim_id[], maj_vert_num[], and csum_maj_vert_num[] are also collectively referred to as the triangle parameter arrays. (2) Processing on Minor Lines The processing on minor lines executed in S22 of the multi-stage division will be described based on the flowchart shown in FIG. 16. In this processing, the array vertices[] and the above-described triangle parameter arrays are used as input arrays, and the following arrays are used as output arrays.

[0110] The output arrays are the arrays prim_lookup_idx[idx], maj_div_idx[idx], point_on_maj_line0[idx], point_on_maj_line1[idx], min_vert_num[idx], prim_num_per_edge[idx], and csum_prim_num_per_edge[idx].

[0111] Here, idx indicating the elements of the array ranges from 0 ≤ idx ≤ Q - 1. The total number of idx used in this processing is equal to the total number Q (i.e., the cumulative sum Q) of the points on the first major line included in all the basic triangles. Note that idx used in the processing on minor lines is hereinafter also referred to as idx_m for distinction.

[0112] <Explanation of Each Array> The array prim_lookup_idx[idx] is a so-called lookup table used to reference the above-described triangular parameter array during the execution of the minor line processing. In other words, the array prim_lookup_idx[idx] is correspondence information for associating one major line point specified by idx (i.e., idx_m) with the basic ID (i.e., idx_p) of the basic triangle containing this major line point.

[0113] The array maj_div_idx[idx] stores the main division point identification number for the major line point specified by the value stored in idx (i.e., idx_m). The array point_on_maj_line0[idx] stores the position vector for the major line point specified by the value stored in idx (i.e., idx_m). The array point_on_maj_line1[idx] stores the position vector of the major line point on the second major line corresponding to the major line point on the first major line specified by the value stored in idx (i.e., idx_m). The major line point on the second major line is a point located at a position that equally divides the second major line with the same division ratio as the division ratio that divides the first major line.

[0114] The array min_vert_num[idx] stores the number of minor line points on the minor line set for the major line point specified by the value stored in idx (i.e., idx_m).

[0115] The array prim_num_per_edge[idx] stores the number of the above-described subdivided triangles that divide the region sandwiched between the pair of minor lines set for the major line point specified by the value stored in idx (i.e., idx_m) using the minor line points. Note that the elements of the array prim_lookup_idx[], the elements of the array maj_div_idx[], the elements of the array prim_num_per_edge[], and the elements of the array csum_prim_num_per_edge[] are represented as integers of 0 or more. The elements of the array min_vert_num[] are represented as positive integers. The elements of the array point_on_maj_line0[] and the elements of the array point_on_maj_line1[] are represented as floating-point numbers.

[0116] <Processing> First, in S300, the arithmetic unit 20 executes a prim_lookup_idx array generation process to generate the array prim_lookup_idx[idx].

[0117] In the prim_lookup_idx array generation process, as shown in FIG. 17, first in S400, the arithmetic unit 20 acquires the cumulative sum Q. Next, in S401, the arithmetic unit 20 stores 0 in idx.

[0118] In the subsequent S402, the arithmetic unit 20 stores the element maj_vert_num[idx] of the array in the variable rep_num. Also, the arithmetic unit 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.

[0119] Next, in S403, the arithmetic unit 20 determines whether the value stored in rep_num is greater than 0. When the value stored in rep_num is greater than 0, the arithmetic unit 20 transfers the process to S404, and when the value stored in rep_num is 0 or less, the arithmetic unit 20 transfers the process to S408. In S404, the arithmetic unit 20 stores 0 in the variable m.

[0120] Next, in S405, the arithmetic unit 20 stores the value stored in idx as the element prim_lookup_idx[ofs_idx + m] of the array specified by "ofs_idx + m".

[0121] In the subsequent S406, the arithmetic unit 20 increments the variable m. That is, the arithmetic unit 20 stores in the variable m a value obtained by adding 1 to the value stored in the variable m. Next, in S407, the arithmetic unit 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.

[0122] On the other hand, if the value stored in the variable m is less than the value stored in rep_num, the arithmetic unit 20 proceeds to S405 and repeats the processes of S405 to S407 based on the newly stored value in the variable m.

[0123] In S408, the arithmetic unit 20 increments idx. That is, the arithmetic unit 20 stores in idx a value obtained by adding 1 to the value stored in idx. Next, in S409, the arithmetic unit 20 determines whether the value stored in idx is greater than or equal to the cumulative sum Q. Here, if the value stored in idx is greater than or equal to the cumulative sum Q, the main prim_lookup_idx array generation process ends here.

[0124] On the other hand, if the value stored in idx is less than the cumulative sum Q, the arithmetic unit 20 proceeds to S402 and repeats the processes of S402 to S409 based on the newly stored value in idx. Then, when the value stored in idx becomes greater than or equal to the cumulative sum Q, the main prim_lookup_idx array generation process ends here.

[0125] Returning to FIG. 16, the description continues. In S310, the arithmetic unit 20 stores 0 in idx. Next, in S320, the arithmetic unit 20 acquires the total number Q of points on the first major line (i.e., the cumulative sum Q). The cumulative sum Q corresponds to the number of loop iterations (i.e., the number of repetitions) of S350 to S380 described later.

[0126] First, in S330, the arithmetic unit 20 calculates a main division point identification number for the first major line point specified by the value stored in idx. The main division point identification number is a number assigned to each first major line point within the basic triangle that contains the first major line point specified by idx. In the present embodiment, the main division point identification number starts from 0 at the base point A that is the vertex of the basic triangle and connects the first major line and the second major line B in order, and is a number that starts from 0 at the base point A B and increases from the base point A B towards the right vertex A B . The arithmetic unit 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).

[0127]

Equation

[0128] lookup_idx shown in equation (3) corresponds to an index (i.e., idx_p) for specifying the triangle parameter array to be referenced. Next, in S340, the arithmetic unit 20 calculates the position vector for the first major line point specified by the value stored in idx and stores it in the array point_on_maj_line0[idx]. Also, the arithmetic unit 20 calculates the position vector for the second major line point corresponding to the first major line point specified by the value stored in idx and stores it in the array point_on_maj_line1[idx]. Here, "corresponding" means that the order counted from the base point A B is the same.

[0129] The coordinates of the point on the first major line are calculated by dividing the first major line at a ratio of maj_div_idx[idx] / maj_vert_num[idx]. Similarly, the coordinates of the point on the second major line are calculated by dividing the second major line at a ratio of maj_div_idx[idx] / maj_vert_num[idx]. Note that when the point on the first major line specified by the value stored in idx is the base point A B if it is, the coordinates of the point on the first major line and the coordinates of the corresponding point on the second major line match.

[0130] The arithmetic unit 20 first calculates lookup_idx in the same way as the above equation (3). Next, the arithmetic unit 20 stores the coordinates of the base point A B in the variable org.

[0131]

Number

[0132] Subsequently, the arithmetic unit 20 calculates the side vector edge0 of the first major line, which is the longest side, and the side vector edge1 of the second major line, which is the second longest side, based on equations (6) and (7).

[0133]

Number

[0134] Then, the arithmetic unit 20 calculates the coordinates of the point on the first major line with respect to the base point A B (that is, the vertex with the third major line, which is the shortest side, as the opposite side) as a reference and stores them in the array point_on_maj_line0[idx]. Similarly, the arithmetic unit 20 calculates the coordinates of the point on the second major line with respect to the base point A B as a reference and stores them in the array point_on_maj_line1[idx].

[0135] [Number]

[0136] In the subsequent S350, for the first major line upper point specified by the value stored in idx, the arithmetic unit 20 calculates the number of minor line upper points on the minor line set for this point. The arithmetic unit 20 stores the calculated number of minor line upper points in the array min_vert_num[idx]. The length of the minor line is calculated based on the element point_on_maj_line0[idx] of the array and the element point_on_maj_line1[idx] of the array. That is, the element min_vert_num[idx] of the array is calculated by the following formula (10) in the same manner as the above-described array maj_vert_num[idx].

[0137] [Number]

[0138] The first term in formula (10) corresponds to the above-described sub-division number. Among the first major line upper points specified by the value stored in idx, the first major line upper point where the element maj_dev_idx[idx] of the array is 0 corresponds to the base point A B corresponds to. For the base point A B 1 is stored as the element min_vert_num[idx].

[0139] In the subsequent S360, for the first major line upper point specified by the value stored in idx, for each minor line pair set for this point, the arithmetic unit 20 calculates the number of sub-division triangles that divide the region sandwiched by the minor line pair. The arithmetic unit 20 stores the calculated number in the array prim_num_per_edge[idx].

[0140] Note that the reference minor line upper point mentioned below refers to the minor line upper point on the reference minor line. The adjacent minor line upper point refers to the minor line upper point on the adjacent minor line. That is, the adjacent minor line upper point refers to the minor line (i.e., the reference minor line) set for the first major line specified by the value stored in idx, at the base point A B on the adjacent minor line adjacent to the side. In this embodiment, among the two minor lines that form a pair, the minor line set for the first major line upper point with the larger maj_div_idx is used as the reference minor line. In the region of the basic triangle sandwiched between the reference minor line and the adjacent minor line that forms a pair with it, the number of vertices that make up the subdivided triangle is the sum of the reference minor line upper point and the adjacent minor line upper point. Paying attention to the case where 0 is stored in idx, the number of subdivided triangles that divide the region sandwiched between the minor line pair is calculated based on equation (11). The calculated value is stored in the array prim_per_edge[idx].

[0141]

Equation

[0142] Next, in S370, the arithmetic unit 20 increments idx. That is, the arithmetic unit 20 stores in idx the value obtained by adding 1 to the value stored in idx. In the subsequent S380, the arithmetic unit 20 determines whether the value stored in idx is greater than or equal to the cumulative sum Q. Here, if it is determined that the value stored in idx is greater than or equal to the cumulative sum Q, the process proceeds to S390.

[0143] On the other hand, if it is determined that the value stored in idx is less than the cumulative sum Q, the arithmetic unit 20 proceeds to S330 and repeats the processes of S330 to S380 based on the newly stored value in idx.

[0144] In the S390, for example, the arithmetic unit 20 may calculate the total number of elements prim_num_per_edge[idx] of the array by incrementing idx by 1 within the range of 0 ≦ idx ≦ Q - 1, and store the calculated total number in the array csum_prim_num_per_edge[idx]. The total number of elements prim_num_per_edge[idx] of the array is the sum of the elements prim_num_per_edge[0] to prim_num_per_edge[idx] of the array.

[0145] When Q - 1 is stored in idx, the element csum_prim_num_per_edge[Q - 1] of the array corresponds to the total number R of sub - divided triangles (hereinafter also referred to as cumulative sum R) that divides the region sandwiched by the minor line pairs set for all Q first - major - line - upper points. In other words, the cumulative sum R is the total number of sub - divided triangles included in all basic triangles (i.e., P). The arithmetic unit 20 finishes the processing on the minor line as described above.

[0146] <Operation> The operation of the processing on the minor line will be described with reference to FIGS. 20 to 22, FIG. 24, and FIG. 29. Assuming that the number of loop iterations is the cumulative sum Q as described above, by S300, values are stored in the elements prim_lookup_idx[0] to prim_lookup_idx[Q - 1] of the array. For example, as shown in FIG. 21, assuming that the first - major - line - upper points are arranged with Q = 10, as shown in FIGS. 24 and 29, as the elements prim_lookup_idx[0] to prim_lookup_idx[9] of the array, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2 are stored respectively. That is, for each first - major - line - upper point, the index (i.e., the basic ID) when referring to the triangle parameter array is stored.

[0147] Also, by repeating S330, as shown in FIGS. 21 and 29, as the elements maj_div_idx[0] to maj_div_idx[9] of the array, 0, 1, 2, 3, 0, 1, 2, 0, 1, 2 are stored respectively. That is, for each basic triangle, for each point on the first major line, the base point A B is set as 0 and the main division point identification numbers are set in order.

[0148] Also, by repeating S340, as shown in FIG. 29, as the elements point_on_maj_line0[0] to point_on_maj_line0[9] of the array, mv00, mv01,... mv09 are stored respectively. Similarly, as the elements point_on_maj_line1[0] to point_on_maj_line1[9] of the array, mv10, mv11,... mv19 are stored respectively. mv is a position vector.

[0149] Also, by repeating S350, as shown in FIGS. 21 and 29, as the elements min_vert_num[0] to min_vert_num[9] (i.e., the number of points on the minor line) of the array, 1, 2, 3, 4, 1, 2, 3, 1, 2, 3 are stored respectively. Also, by repeating S360, as shown in FIGS. 22 and 29, as the elements prim_num_per_edge[0] to prim_num_per_edge[9] of the array, 0, 1, 3, 5, 0, 1, 3, 0, 1, 3 are stored respectively.

[0150] For example, in the basic triangle specified by prim_id = 0 shown in FIG. 21, the point on the first major line specified by idx = 3 is the right vertex A RIt is. In this case, the number of sub - divided triangles that divide the area sandwiched between the minor line pairs is 5 as shown in FIG. 22, and as shown in FIG. 29, 5 is stored in prim_num_per_edge[3]. In this minor line pair, the reference minor line is the minor line set for the point on the first major line specified by idx = 3, and the adjacent minor line is the minor line set for the point on the first major line specified by idx = 2.

[0151] Also, when S390 is executed, as shown in FIGS. 22 and 29, 0, 1, 4, 9, 9, 10, 13, 13, 14, 17 are stored as the elements csum_prim_num_per_edge[0] to csum_prim_num_per_edge[9] of the array respectively.

[0152] In the examples of FIGS. 20 to 22, the value 17 stored as the element csum_maj_vert_num[9] of the array corresponds to the total number of sub - divided triangles (i.e., the cumulative sum R) that divide the area sandwiched between the minor line pairs set for 9 (i.e., Q = 9) points on the first major line. In other words, 17 corresponds to the total number R of sub - divided triangles included in all 3 (i.e., P = 3) basic triangles shown in FIGS. 20 to 22.

[0153] Note that hereinafter, the arrays prim_lookup_idx[idx], maj_div_idx[idx], point_on_maj_line0[idx], point_on_maj_line1[idx], min_vert_num[idx], prim_num_per_edge[idx], csum_prim_num_per_edge[idx] are collectively referred to as the major line parameter arrays.

[0154] (3) Sub - division processing The sub-division process executed in the multi-segment division S23 will be described based on the flowchart shown in FIG. 18. In this process, the above-described major line parameter array is used as the input array, and the following arrays are used as the output arrays. The output arrays are the array maj_line_lookup_idx[idx] and the array tess_vert[idx].

[0155] Here, idx indicating the element of the array ranges from 0 ≦ idx ≦ R - 1. The total number of idx used in this process is equal to the total number of sub-divided triangles R (i.e., the cumulative sum R) included in all the basic triangles. Note that idx used in the sub-division process is also described as idx_sub hereinafter for distinction.

[0156] <Description of each array> The array maj_line_lookup_idx[idx] is a lookup table used to refer to the above-described major line parameter array during the execution of the sub-division process. In other words, the array maj_line_lookup_idx[idx] is correspondence information for associating one sub-divided triangle specified by idx (i.e., idx_sub) with the number (i.e., idx_m) identifying the first major line upper point that sets the minor line pair including this sub-divided triangle.

[0157] The array tess_vert[idx] stores the 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] represent the three vertex coordinates in one subdivided triangle, respectively. Similar to the above-mentioned array vertices[], the array tess_vert[idx] may be described as tess_vert[idy][idx]. Here, idy ranges from 0 to 2. 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. Note that the element maj_line_lookup_idx[idx] of the array is represented as an integer greater than or equal to 0, and the element tess_vert[idx] of the array is represented as a floating point number.

[0158] <Process> As shown in FIG. 18, first in S500, the arithmetic unit 20 executes a maj_line_lookup_idx array generation process to generate the array maj_line_lookup_idx[idx]. As shown in FIG. 19, the maj_line_lookup_idx array generation process is different from the prim_lookup_idx array generation process shown in FIG. 17 in that S410, S412, S415, and S419 are different, and the others are the same, so the description is omitted here. That is, the cumulative sum R is used instead of the cumulative sum Q in the prim_lookup_idx array generation process, and prim_num_per_edge[] is used instead of the array maj_vert_num[]. Also, the array csum_prim_num_per_edge[] is used instead of the array csum_maj_vert_num[]. Thereby, the array maj_line_lookup_idx[idx] is output. Returning to FIG. 18, the description continues.

[0159] In S505, the arithmetic unit 20 stores 0 in idx. Next, in S510, the arithmetic unit 20 acquires the total number of subdivided triangles R (that is, the cumulative sum R). The cumulative sum R corresponds to the number of loop iterations (that is, the number of repetitions) of S515 to S570.

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

[0161] First, in S515, as shown by equation (12), the arithmetic unit 20 stores the value of the index (that is, idx_m) used to refer to the major line parameter array for the subdivided triangle specified by the value stored in idx (that is, idx_sub) in the variable lookup_idx.

[0162]

Equation

[0163] Accordingly, it is possible to specify the major line parameters for the subdivided triangle specified by the value stored in idx (i.e., idx_sub). That is, it is not necessary to newly load the major line parameter array, and the major line parameters already stored in the memory can be referred to.

[0164] In subsequent S520, the arithmetic unit 20 calculates, based on equation (13), a number indicating which position the subdivided triangle specified by the value stored in idx (i.e., idx_sub) is among the subdivided triangles that divide the region sandwiched between the minor line pairs including this subdivided triangle, as viewed from the first major line. That is, the above-described in-region identification number is calculated. The arithmetic unit 20 stores the calculated in-region identification number in the array tess_prim_id[idx].

[0165]

Equation

[0166] In S525 and S530, the arithmetic unit 20 generates combination information. As described above, the combination information identifies the subdivided triangles that divide the region sandwiched between the minor line pairs by the in-region identification number, and specifies the combination method of the points on the minor line belonging to the identified subdivided triangles based on the main division point identification number and the sub-division Point identification number. In the present embodiment, as described above, when the in-region identification number is even, the combination information specifies the combination method so as to be the first specified pattern, and when the in-region identification number is odd, the combination information specifies the combination method so as to be the second specified pattern. The first specified pattern is a pattern that specifies the combination method of the points on the minor line so that the triangle is convex on the AB side of the base point, and the second specified pattern is a pattern that specifies the combination method of the points on the minor line so that the triangle is convex on the side opposite to the base point AB. Here, the even number includes 0.

[0167] In this embodiment, the combination information specifies the combination method of the points on the minor line belonging to the subdivided triangle based on the displacement amount of the main division point identification number and the displacement amount of the sub-division point identification number.

[0168] First, in S525, the displacement amount of the main division point identification number is calculated. Here, focusing only on the main division point identification number (i.e., maj_div_idx), in the first specified pattern, as shown in FIG. 26, the combination method of the points on the minor line is such that, taking the main division point number of the point on the first major line where the minor line pair is set as maj_div_idx[idx], it is represented as maj_div_idx[idx] → maj_div_idx[idx - 1] → maj_div_idx[idx]. Here, taking maj_div_idx[idx], which is the main division point number of the point on the first major line where the minor line pair is set, as a reference, the combination method of the points on the minor line is indicated by the displacement amount of the main division point identification number, such as 0 → -1 → 0. On the other hand, in the second specified pattern, the combination method of the points on the minor line is indicated by the displacement amount of the main division point identification number, such as -1 → 0 → -1, taking maj_div_idx[idx], which is the main division point number of the point on the first major line where the minor line pair is set, as a reference.

[0169] Therefore, in this step, the arithmetic unit 20 calculates the value to be stored in the variable maj_div_of f set for the subdivided triangle specified by the value stored in idx based on Equation (14). The value stored in the variable maj_div_of f set indicates the displacement amount of the main division point identification number.

[0170]

Equation

[0171] As a result, as shown in FIG. 27, when tess_prim_idx[idx] is even, (0, -1, 0) is calculated as the displacement amount of the main division point identification number. When tess_prim_idx[idx] is odd, (-1, 0, -1) is calculated as the displacement amount of the main division point identification number.

[0172] Next, in S530, the displacement amount of the secondary division point identification number is calculated. Here, only the secondary division point identification number (i.e., m in _div_idx) is considered. In the first specified pattern, as shown in FIG. 26, the combination method of the points on the minor line is represented as 0→0→1 (for example, the finely divided triangle with the in-region identification number = 0), 1→1→2 (for example, the finely divided triangle with the in-region identification number = 2), 2→2→3 (for example, the finely divided triangle with the in-region identification number = 4), and so on. On the other hand, in the second specified pattern, the combination method of the points on the minor line is represented as 0→1→1 (for example, the finely divided triangle with the in-region identification number = 1), 1→2→2 (for example, the finely divided triangle with the in-region identification number = 3), and so on.

[0173] Here, the secondary division Point identification number of the point on the minor line specified second in each combination method (hereinafter also referred to as the reference secondary division Point identification number) is used as a reference. In the first specified pattern, the combination method of the points on the minor line is, for example, for the finely divided triangle with the in-region identification number = 0, it is represented by the displacement amount of the secondary division point identification number as 0→0→+1 (for example, the reference secondary division Point identification number = 0) with respect to the reference secondary division Point identification number. Similarly, for the finely divided triangle with the in-region identification number = 2, it is represented by the displacement amount of the secondary division point identification number as 0→0→+1 (for example, the reference secondary division Point identification number = 1) with respect to the reference secondary division Point identification number. On the other hand, in the second specified pattern, the combination method of the points on the minor line is, for the finely divided triangle with the in-region identification number = 1, -1→0→0 with respect to the reference secondary division Point identification number (for example, the reference secondary division PointIt is indicated by the displacement amount of the sub - division point identification number, such as Identification number = 1). Similarly, for the finely divided triangle with Region - in identification number = 3, with respect to the reference sub - division Point identification number, -1 → 0 → 0 (for example, reference sub - division Point identification number = 2), is indicated by the displacement amount of the sub - division point identification number.

[0174] Therefore, in this step, the arithmetic unit 20 calculates the value to be stored in the variable m in _div_of f set for the finely divided triangle specified by the value stored in idx based on equation (15). The value to be stored in the variable m in _div_of f set indicates the displacement amount of the sub - division point identification number.

[0175]

Equation

[0176] As a result, as shown in FIG. 28, when tess_prim_idx[idx] as the Region - in identification number is even, (0, 0, 1) is calculated as the displacement amount of the sub - division point identification number. When tess_prim_idx[idx] is odd, (-1, 0, 0) is calculated as the displacement amount of the sub - division point identification number.

[0177] Next, in S535 - S560, for the finely divided triangle specified by the value stored in idx, the combinations of points on the minor line are sequentially stored in the array tess_vert[idy][idx]. When specifying the combinations of points on the minor line, the major - division point identification number and the sub - division point identification number are used. In this embodiment, based on the above - mentioned displacement amounts of the major - division point identification number and the sub - division point identification number, the major - division point identification number and the sub - division point identification number for specifying the combinations of points on the minor line are determined.

[0178] First, in S535, the arithmetic unit 20 stores 0 in the variable idy. Next, in S540, the arithmetic unit 20 calculates the coordinates of both endpoints of the minor line including the point among the minor line points belonging to the sub-divided triangle specified by the value stored in idx, for the minor line point specified by the value stored in idy. The minor line point specified by the value stored in idy refers to the minor line point specified as the (idy + 1)-th in the combination method based on the combination information. The both endpoints are the first major line point and the second major line point.

[0179] Based on equation (16), the arithmetic unit 20 stores the position vector (i.e., coordinates) of the first major line point, which is one of the both endpoints, in the variable point_0. Also, based on equation (17), the arithmetic unit 20 stores the position vector (i.e., coordinates) of the second major line point, which is the other of the both endpoints, in the variable point_1.

[0180] [Number]

[0181] In the subsequent S545, first, based on equation (18), the arithmetic unit 20 calculates the sub-division Point identification number for the minor line point specified by the value stored in idy in the sub-divided triangle specified by the value stored in idx. The sub-division Point identification number is calculated based on the reference sub-division Point identification number and the displacement amount of the sub-division Point identification number calculated in S530. The arithmetic unit 20 stores the calculated sub-division Point identification number in the variable min_div_idx. floor((tess_prim_id[idx]+1) / 2) in equation (18) indicates the sub-division Point identification number. Then, the arithmetic unit 20 calculates the internal division ratio based on equation (19) using the calculated sub-division Point identification number and stores it in the variable div_ratio.

[0182]

Mathematics

[0183] The internal ratio represents the division ratio at which the minor line point specified by the value stored in idy among the minor line points belonging to the subdivided triangle specified by the value stored in idx divides the minor line containing this point.

[0184] Next, in S550, the arithmetic unit 20 stores the calculated coordinates in the array tess_vert[idy][idx] based on equation (20).

[0185]

Mathematics

[0186] In the subsequent S555, the arithmetic unit 20 increments idy. That is, the arithmetic unit 20 stores the value obtained by adding 1 to the value stored in idy in idy. Next, in S560, the arithmetic unit 20 determines whether the value stored in idy is 3 or more. Here, when the arithmetic unit 20 determines that it is 3 or more, the process proceeds to S565. On the other hand, when the arithmetic unit 20 determines that it is less than 3, the process proceeds to S540, and the processes of S540 - S560 are repeated until idy becomes 3 or more.

[0187] In S565, the arithmetic unit 20 increments idx. That is, the arithmetic unit 20 stores the value obtained by adding 1 to the value stored in idx in idx. In S570, the arithmetic unit 20 determines whether the value stored in idx is R or more. Here, when the arithmetic unit 20 determines that it is less than R, the process proceeds to S515, and the processes of S515 - S570 are repeated. On the other hand, when the arithmetic unit 20 determines that it is R or more, the present subdivision process ends.

[0188] <Operation> The operation of the sub-division process will be described with reference to FIGS. 20 to 23, FIG. 25, and FIG. 29. Assuming that the number of loop iterations is the cumulative sum R as described above, the elements maj_line_lookup_idx[0] to maj_line_lookup_idx[R - 1] of the array are stored by repeating S515. For example, as shown in FIG. 22, assuming Q = 10 and the minor line dots are arranged. As shown in FIG. 29, as the elements maj_line_lookup_idx[0] to maj_line_lookup_idx[Q - 1] of the array, 1, 2, 2, 2, 3, 3, 3, 3, 3, 5,... are stored respectively. That is, for each sub-divided triangle specified by the value stored in idx, an index (i.e., idx_m) for referring to the major line parameter array is set.

[0189] Hereinafter, the operation in the case of idx = 9 (i.e., idx_sub = 9) among the examples shown in FIGS. 20 to 23 will be described. The sub-divided triangle specified by idx = 9 is included in the basic triangle specified by prim_id = 1 as shown in FIG. 22.

[0190] In S515, for the sub-divided triangle specified by idx = 9, maj_line_lookup_idx[9] = 5 is set as lookup_idx. Thereby, for example, as indicated by the arrow in FIG. 29, it becomes possible to refer to the major line parameter array. For example, the main division point identification number (maj_div_idx) for the major line dot where the minor line pair including the sub-divided triangle specified by idx = 9 is set is specified as 1. That is, maj_div_idx[lookup_idx] = 1 (for example, lookup_idx = 5).

[0191] In S520, for the sub-divided triangle specified by idx = 9, the in-region identification number (i.e., tess_prim_id[9]) is calculated as 9 - 10 + 1 = 0 based on the formula (13).

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

[0193] In S535 - S560, when idy = 0, in S540, both endpoints of the reference minor line among the minor line pairs (i.e., the minor line set for the point on the first major line where maj_div_idx = 1) are specified. In S545, the sub - division Point 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 the point on the first major line, which is one of the two endpoints of the reference minor line, are specified as the first minor line point belonging to the subdivided triangle.

[0194] Similarly, when idy = 1, in S540, both endpoints of the adjacent minor line among the minor line pairs (i.e., the minor line set for the point on the first major line where maj_div_idx = 0) (i.e., in this example, base point A B ) are specified. In S545, the sub - division Point 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 the point on the first major line, which is one of the two endpoints of the adjacent minor line (i.e., in this example, base point A B ) are specified as the second minor line point belonging to the subdivided triangle.

[0195] Similarly, when idy = 2, in S540, both endpoints of the reference minor line among the minor line pairs (i.e., the minor line set for the point on the first major line where maj_div_idx = 1) are specified. In S545, the sub - division PointThe identification number is calculated as 1 based on the formula (18), and the internal ratio is calculated as 1 / 1 = 1. In S550, based on the internal ratio, the coordinates of the point on the second major line, which is the other of the two endpoints of the reference minor line, are specified as the third point on the minor line belonging to the subdivided triangle.

[0196] In this way, for the subdivided triangle specified by idx = 9, the combination method of the points on the minor line belonging to the subdivided triangle is specified (that is, the first specified pattern). Then, the position vectors (that is, coordinates) specified in the order according to the combination method are stored in the array tess_vert[idy][idx].

[0197] The arithmetic unit 20 executes the same processing for 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.

[0198] In this way, according to a simple rule using the displacement amount as combination information, the regions sandwiched by the minor line pairs are divided without overlapping each other, and subdivided triangles connecting the points on the minor lines close to each other are generated.

[0199] [1 - 3. Effect] According to the first embodiment described in detail above, the following effects are achieved. (1a) The arithmetic unit 20 executes pre - shaping (that is, S11) in S2. In the pre - shaping, in S120, for each of the basic triangles defined by the polygon vertex coordinate data (that is, the array vertices[]), the arithmetic unit 20 determines whether it is the target triangle. In S150, the basic triangle determined not to be the target triangle (that is, the basic triangle determined to be the non - target triangle) is shaped so as to have a shape with a relatively large degree of coincidence with an equilateral triangle. That is, the basic triangle determined not to be the target triangle is divided into a plurality of triangles so as to have a shape with a relatively large degree of coincidence with an equilateral triangle. In step S155, the arithmetic unit 20 generates a new array vertices[] that includes the vertex coordinates of the divided triangles. In step S2, in the multi-stage division (i.e., S12) following the pre-shaping, for each of the basic triangles defined by the coordinates of each vertex included in the new vertex coordinate group generated by S155, the arithmetic unit 20 calculates the coordinates of the vertices of a plurality of sub-divided triangles that divide the area of the basic triangle into smaller areas than the basic triangle.

[0200] In such an arithmetic unit 20, the basic triangles defined by the coordinates of each vertex included in the new array vertices[] generated in S155 have a shape with a relatively large degree of coincidence with an equilateral triangle due to the execution of S150. Since the arithmetic unit 20 calculates the coordinates of the vertices of a plurality of sub-divided triangles for each of such basic triangles, compared with the case of dividing the basic triangle into sub-divided triangles without executing S150, sub-divided triangles with a relatively large degree of coincidence with an equilateral triangle can be obtained. As a result, it is possible to suppress the new sub-divided triangles generated by dividing the basic triangle from moving away from the equilateral triangle.

[0201] (1b) Specifically, for each of the basic triangles, the arithmetic unit 20 determines whether the maximum value of the interior angles is less than the allowable angle. When the maximum value of the interior angles is less than the allowable angle, the arithmetic unit 20 determines that the basic triangle is the target triangle. Also, when the maximum value of the interior angles is greater than or equal to the allowable angle, the arithmetic unit 20 determines that the basic triangle is not the target triangle (i.e., it is a non-target triangle). The arithmetic unit 20 can easily determine whether the basic triangle is the target triangle or not by a mathematical formula using the maximum value of the interior angles.

[0202] (1c) When it is determined that the basic triangle is not the target triangle, the arithmetic unit 20 divides the basic triangle into two by a bisector that bisects the interior angle having the maximum value in the basic triangle. As a result, for example, when the triangle before division has a shape that is not relatively close to an equilateral triangle, such as when the maximum interior angle is 120° or more, the triangle is divided into two so as to bisect the maximum interior angle. The arithmetic unit 20 can make the triangle after division have a shape with a relatively high degree of coincidence with an equilateral triangle as compared with the case of repeatedly bisecting an arbitrary interior angle (for example, the minimum interior angle) to divide the triangle.

[0203] (1d) For example, the allowable angle is 120°. Thereby, the arithmetic unit 20 can make the maximum interior angle of the triangle after division satisfy 60° ≤ maximum interior angle < 90°, and can make the triangle after division approach a shape with a relatively high degree of coincidence with an equilateral triangle.

[0204] (1e) The arithmetic unit 20 executes multi-stage division (that is, S12) in S2. In multi-stage division, for each basic triangle, in S21, the arithmetic unit 20 sets the main division number as the number of divisions when equally dividing the first major line into a plurality of parts. The first major line is equally divided based on the division length d0. In S22, for each of the plurality of first major line points set on the first major line, the arithmetic unit 20 sets the sub-division number as the number of divisions when equally dividing the set minor line. The minor line is equally divided based on the same division length d0 as when dividing the first major line points.

[0205] In S23, the arithmetic unit 20 calculates the coordinates of the vertices of the subdivided triangles for each pair of minor lines set for each point on the first major line, using the array vertices[], maj_vert_num, and combination information. The combination information is information that specifies how the points on the minor lines belonging to each subdivided triangle are combined for each pair of minor lines set for each point on the major line. The subdivided triangles are one or more triangles that divide, without overlapping each other, the area of the basic triangle sandwiched by a pair of minor lines, with the points on the minor lines belonging to the pair of minor lines as vertices.

[0206] Such an arithmetic unit 20 can make the intervals between the points on the first major line and the intervals between the points on the minor lines substantially the same by dividing based on the division length d0. That is, among the three sides of the subdivided triangle, the sides along two of the sides can be made to have substantially the same length. The two sides are the side along the first major line where the points on the first major line are set, and the minor line where the points on the minor line are set. For this reason, the basic triangle can be divided into subdivided triangles having a shape with a relatively large degree of coincidence with an equilateral triangle. As a result, it is possible to suppress the new subdivided triangles generated by dividing the basic triangle from moving away from the equilateral triangle. In the present embodiment, a greater effect can be obtained when the basic triangle has a shape with a relatively large degree of coincidence with an equilateral triangle.

[0207] (1f) In the basic triangle, the arithmetic unit 20 sets the side opposite the interior angle having the largest angle as the first major line, the side opposite the interior angle having the second largest angle as the second major line, and the side opposite the interior angle having the smallest angle as the third major line. That is, the second major line has a length relatively closer to the first major line than the third major line. By dividing the second major line at the same division ratio as the first major line, the interval between the points on the second major line can be made relatively closer to the interval between the points on the first major line (that is, the division length d0).

[0208] Such an arithmetic unit 20 can relatively approximate the side along the second major line on which the second major line upper point is set among the three sides of the subdivided triangle to the division length d0. As a result, the subdivided triangle can be made closer to a shape with a relatively large degree of coincidence with an equilateral triangle.

[0209] (1g) When specifying the minor line upper points belonging to one subdivided triangle, the combination information specifies the minor line upper points as follows for each minor line pair set for the first major line upper point. The combination information alternately specifies, in order along the minor line, the minor line upper point on the minor line set for each of the first major line upper points (that is, the reference minor line upper point) and the minor line upper point on the adjacent minor line (that is, the adjacent minor line upper point).

[0210] Specifying in order along the minor line means in the order of the minor line upper points on the minor line. Alternately means that after specifying the reference minor line upper point, the adjacent minor line upper point is specified next, and after specifying the adjacent minor line upper point, the reference minor line upper point is specified next.

[0211] The arithmetic unit 20 can specify the minor line upper points belonging to the subdivided triangle including two sides corresponding to the division length d0 by alternately moving the two minor lines in the minor line pair to specify the minor line upper points belonging to the triangle. The two sides corresponding to the division length d0 are the side parallel to the first major line and the side included on the minor line in the subdivided triangle that divides the region sandwiched by the minor line pair. As a result, the basic triangle can be divided into a plurality of subdivided triangles having a shape with a relatively large degree of coincidence with an equilateral triangle.

[0212] (1) Also, in the above (1g), specifically, the combination information may include at least one of the first designation pattern and the second designation pattern when designating the points on the minor line belonging to the subdivided triangle. The first designation pattern designates the points on the minor line belonging to the subdivided triangle in the order of the reference point on the minor line, the adjacent point on the minor line, and the other adjacent reference point on the minor line. That is, the points on the minor line that are closest to each other among those belonging to the triangle are designated. The second designation pattern designates the points on the minor line belonging to the subdivided triangle in the order of the adjacent point on the minor line, the reference point on the minor line, and the other adjacent point on the adjacent minor line. That is, similar to the first designation pattern, the points on the minor line that are closest to each other are designated.

[0213] The arithmetic unit 20, in the first designation pattern, is the base point A B For the subdivided triangle that is convex on the side, and for the subdivided triangle that is convex on the side opposite to the base point A in the second designation pattern B A shape with a relatively large degree of coincidence with an equilateral triangle can be obtained.

[0214] (2) In the above (1) of (1g), when there are a plurality of subdivided triangles that divide the region sandwiched between the pair of minor lines, the combination information may alternately designate the first designation pattern and the second designation pattern. The arithmetic unit 20 can divide the region of the basic triangle sandwiched between the pair of minor lines without overlapping each other by repeating the division of the subdivided triangle according to the first designation pattern and the second designation pattern based on the combination information.

[0215] (1h) In any one of the above (1g), (1) of (1g), and (2), the arithmetic unit 20 sets the main division point identification number (that is, maj_div_idx) for the first major line point at S330. The arithmetic unit 20, at S545, sets the sub-division point identification number (that is, m inSet (_div_idx). For example, the secondary division point identification numbers are set in order from the first major line side. Each of the points on the minor line is specified by the major division point identification number and the secondary division point identification number. The combination information specifies how the points on the minor line belonging to the sub-division triangles that divide the region of the basic triangle sandwiched between the pair of minor lines are combined, based on the major division point identification number and the secondary division point identification number.

[0216] The arithmetic unit 20 can uniquely identify how the points on the minor line belonging to the sub-division triangles are combined using the combination information.

[0217] (1) In the above (1h), in the arithmetic unit 20, the combination information may specify how the points on the minor line belonging to the sub-division triangles are combined, based on the displacement amount of the major division point identification number and the displacement amount of the secondary division point identification number.

[0218] Since the combination information can be made into simple information having regularity based on the displacement amount, the amount of information of the combination information can be reduced. As a result, when the arithmetic unit 20 generates the combination information, the generation becomes easy, and when the arithmetic unit 20 stores the combination information in advance, its memory capacity can be reduced.

[0219] (2) In the above (1) of (1h), in the arithmetic unit 20, the displacement amount of the major division point identification number may be expressed as the displacement amount with respect to the major division point identification number that the point on the minor line set for the point on the first major line has. Secondary division PointThe displacement amount of the identification number may be expressed as the displacement amount with respect to the sub-division point identification number of the minor line point specified second when specifying the minor line point belonging to the subdivided triangle. The arithmetic unit 20 can generate subdivided triangles such as the above-described first specification pattern and second specification pattern for each point on the first major line by the same method using the combination information based on the displacement amount. When the arithmetic unit 20 is a device capable of parallel processing, the same parallel processing can be executed for each point on the first major line.

[0220] (3) As described above, the arithmetic unit 20 may generate combination information. Since it is not necessary to previously store a table indicating the combination information in a storage device or the like, the memory capacity can be suppressed in the arithmetic unit 20.

[0221] <Corresponding relationship of the language> The arithmetic unit 20 corresponds to a triangle generation device. The array vertices[] corresponds to a vertex coordinate group. The value of the first term in the formula (2) corresponds to the main division number, and the value of the first term in the formula (10) corresponds to the sub-division number. The first major line corresponds to the first side, the second major line corresponds to the second side, and the third major line corresponds to the third side. The point on the first major line corresponds to the main division point, and the point on the minor line corresponds to the sub-division point. maj_div_idx corresponds to the main division point identification number, and min_div_idx corresponds to the sub-division point identification number. maj_div_offset corresponds to the displacement amount of the main division point identification number, and min_div_offset corresponds to the displacement amount of the sub-division point identification number.

[0222] S1 corresponds to the process as an acquisition unit, and S2 corresponds to the process as a triangle division unit. S120 corresponds to the process as an object determination unit, S150 corresponds to the process as a pre-shaping execution unit, and S155 corresponds to the process as an addition unit. S21 and S240 correspond to the process as a main division number setting unit, S22 and S350 correspond to the process as a sub-division number setting unit, and S23 corresponds to the process as an execution unit. S330 corresponds to the process as a main identification setting unit, and S545 corresponds to the process as a sub-identification setting unit.

[0223] [2. Second Embodiment] [2-1. Configuration] The second embodiment of the present disclosure will be described below with reference to the drawings. In the second embodiment, the parts different from the first embodiment will be described. The same reference numerals will be given to the common configurations.

[0224] The arithmetic unit 20 of the second embodiment is different from the first embodiment in that it includes a GPU 22 and executes various processes in parallel using the GPU 22. For example, the GPU 22 as the arithmetic unit 20 may execute the pre-shaping in S11 and the multi-stage division in S12.

[0225] For example, in the pre-shaping executed by the GPU 22 in S11, the processes repeatedly executed for each basic triangle specified by the value stored in idx may be executed in parallel by parallel processing.

[0226] Specifically, since S105 to S130 shown in FIG. 4 are repetitive processes for each idx, the GPU 22 may provide a thread for each idx in S105 to S130 and execute the processes of S105 to S120 in parallel in each thread. Also, since S140 to S165 are repetitive processes for each idx, the GPU 22 may provide a thread for each idx in S140 to S165 and execute the processes of S140 to S155 in parallel in each thread. Also, since S170 to S185 are repetitive processes for each idx, the GPU 22 may provide a thread for each idx in S170 to S185 and execute the processes of S170 to S175 in parallel in each thread.

[0227] Also, for example, in the multi-stage division executed by the GPU 22 in S12, the processes repeatedly executed for each basic triangle specified by the value stored in idx, or the processes repeatedly executed for each point on the first major line specified by the value stored in idx, may be executed in parallel by parallel processing.

[0228] Specifically, since S200 to S260 shown in FIG. 15 are repetitive processes for each idx, the GPU 22 may provide a thread for each idx in S200 to S260 and execute the processes of S200 to S240 in parallel for each thread. Also, since S300 to S380 shown in FIG. 16 are repetitive processes for each idx, the GPU 22 may provide a thread for each idx in S300 to S380 and execute the processes of S300 to S360 in parallel for each thread. Also, since S500 to S570 shown in FIG. 18 are repetitive processes for each idx, the GPU 22 may provide a thread for each idx in S500 to S570 and execute the processes of S500 to S560 in parallel for each thread.

[0229] [2-2. Effect] (2a) In such an arithmetic unit 20, in pre-shaping, for each basic triangle in parallel, the vertex coordinates are sorted in descending order, and it is determined whether it is the target triangle, so that the processing speed of pre-shaping and thus triangle division can be improved.

[0230] Also, in such an arithmetic unit 20, in multi-stage division, for each basic triangle in parallel, the first major line upper points are set, so that the processing speed of multi-stage division and thus triangle division can be improved. Also, in such an arithmetic unit 20, in multi-stage division, for each first major line upper point in parallel, the coordinates of the vertices of the finely divided triangles are calculated, so that the processing speed of multi-stage division and thus triangle division can be improved.

[0231] In the second embodiment, the GPU 22 corresponds to the triangle processing device. Note that instead of the GPU 22, the CPU 21 capable of executing parallel processing may execute the above-described parallel processing. In this case, the CPU 21 capable of executing parallel processing corresponds to the triangle generation device.

[0232] [2. Third Embodiment] [3-1. Configuration] The third embodiment of the present disclosure will be described below with reference to the drawings. In the third embodiment, parts different from the second embodiment will be described. The same reference numerals will be given to the common configurations.

[0233] In the above-described second embodiment, for example, in the process of calculating the cumulative sums such as S135, S270, and S390, a form in which parallel processing by the GPU 22 is not executed was shown. However, the GPU 22 may execute parallel processing also in the process of calculating the cumulative sum, for example, by executing the cumulative sum parallel processing described later.

[0234] [3-2. Process] The cumulative sum parallel processing will be described based on the flowchart shown in FIG. 30. <Explanation of Array> In this process, the array input[idx] is used as the input array. The array input[idx] is an array in which the values for which the cumulative sum is to be calculated are stored.

[0235] When the cumulative sum parallel processing ends, the cumulative sum of the array input[idx] is stored in the array input[idx]. For example, when calculating S cumulative sums for the arrays input[0] to input[S-1], when the cumulative sum parallel processing ends, the element input[0] of the array specified by idx = 0 is stored in the array input[0]. In the array input[1], 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. And in the array input[S-1], the total sum of each of the array elements input[0] to input[S-1] is stored.

[0236] <Process> First, in S600, the GPU 22 acquires the array input[idx] having the number of elements S. The range of idx is 0 ≦ idx ≦ S-1.

[0237] Next, in S610, the GPU 22 stores 1 in the variable stride. Subsequently, in S620, the GPU 22 stores 0 in idx. Next, at S630, GPU 22 determines whether idx - stride ≥ 0. Here, if idx - stride < 0, GPU 22 transfers the process to S650. On the other hand, when idx - stride ≥ 0, GPU 22 transfers the process to S640.

[0238] At S640, the sum of the array element input[idx] and the array element input[idx - stride] is stored as the new array element input[idx]. At S650, GPU 22 increments idx. That is, GPU 22 stores in idx the value obtained by adding 1 to the value stored in idx.

[0239] At S670, GPU 22 determines whether the value stored in idx is greater than or equal to S. Here, when it is determined that the value is greater than or equal to S, GPU 22 transfers the process to S670. On the other hand, when it is determined that the value is less than S, GPU 22 transfers the process to S630 and repeats the processes of S630 - S660.

[0240] At S670, stride * 2 is stored as the new value of stride. At S680, stride is incremented. That is, GPU 22 stores in stride the value obtained by adding 1 to the value stored in stride.

[0241] At S690, GPU 22 determines whether the value stored in stride is greater than or equal to S. Here, when it is determined that the value is less than S, GPU 22 transfers the process to S620 and repeats the processes of S620 - S690. On the other hand, when the arithmetic unit 20 determines that the value is greater than or equal to S, the cumulative sum parallel process ends here.

[0242] <Operation> By executing cumulative sum parallel processing, as shown in FIG. 31, the sum of each of the elements input[0] to input[S-1] of the array is stored in the array input[S-1].

[0243] For example, at S135, the above-described array input[] may be replaced with the array flag[]. By executing the above-described cumulative sum parallel processing, the sum of the elements flag[idx] of the array (i.e., the cumulative sum) is stored in the element flag[L-1] of the array.

[0244] Also, for example, at S270, the above-described array input[] may be replaced with the array maj_vert_num[]. By executing the above-described cumulative sum parallel processing, the cumulative sum Q is stored in the element maj_vert_num[P-1] of the array.

[0245] Also, for example, at S390, the above-described array input[] may be replaced with the array prim_num_per_edge[]. By executing the above-described cumulative sum parallel processing, the cumulative sum R is stored in the element maj_vert_num[Q-1] of the array.

[0246] [3-3. Effects] In this way, the arithmetic unit 20 can further improve the processing speed by executing parallel processing for each idx even in the case of cumulative sum. Also, since the arithmetic unit 20 can set a thread for each point on the first major line and execute triangle division in parallel for each point on the first major line, the processing speed can be further improved.

[0247] In the third embodiment, the GPU 22 corresponds to the triangle processing device. Instead of the GPU 22, a CPU 21 capable of executing parallel processing may execute the above-described parallel processing. In this case, the CPU 21 capable of executing parallel processing corresponds to the triangle generation device.

[0248] [4. Other Embodiments] As described above, the embodiments of the present disclosure have been explained. However, the present disclosure is not limited to the above-described embodiments and can be implemented in various modifications.

[0249] (4a) In the above-described embodiment, a form is shown in which when the maximum interior angle in the basic triangle is less than a predetermined angle (for example, 120°), it is determined to be the target triangle. However, in the basic triangle, when the ratio of the lengths of the remaining sides to the length of one side is within a predetermined range, it may be determined to be the target triangle. For example, h1 ≤ ratio of lengths ≤ h2 (for example, h1 < 1, h2 ≥ 1) may be satisfied. The range in which the ratio of lengths can be taken is not limited to this and may be arbitrarily set.

[0250] (4b) In the above-described embodiment, a form is shown in which the arithmetic device 20 generates combination information and generates a subdivided triangle based on the generated combination information (that is, acquires the generated combination information). However, the arithmetic device 20 may store the combination information in the memory in advance as a table and generate a subdivided triangle based on the combination information stored in the memory. Thereby, the processing load on the arithmetic device 20 can be reduced.

[0251] (4c) In the above-described embodiment, a form is shown in which the main division point identification number is set in order from the base point A B that connects the first major line and the second major line and is the vertex of the basic triangle. However, the main division point identification number may be set with either of the two endpoints of the first major line as 0. For example, the main division point identification number is the right vertex A R that is the intersection of the first major line and the second major line and is the vertex of the basic triangle, from which to the base point A BThey may be set in order as 0, 1, 2,... towards it. In this case, in the minor line pair, the main division point identification number of the point on the reference minor line + 1 becomes the main division point identification number of the point on the adjacent minor line. In this case, for example, when tess_prim_idx[idx] is even, (0, +1, 0) may be calculated as the displacement amount of the main division point identification number. Also, for example, when tess_prim_idx[idx] is odd, (+1, 0, +1) may be calculated as the displacement amount of the main division point identification number.

[0252] (4d) In the above-described embodiment, the form in which the secondary division point identification numbers are set in order from the first major line side in the basic triangle was shown. However, as the secondary division point identification numbers, either of the two end points of the minor line may be set as 0. For example, the secondary division point identification numbers may be set in order as 0, 1, 2,... towards the first major line side starting from the second major line side. In this case, the same displacement amount as in the above-described embodiment may be used as the displacement amount of the secondary division point identification numbers.

[0253] (4e) In the above-described embodiment, the form in which the arithmetic unit 20 executes both pre-shaping and multi-stage division in the triangle division process was shown. However, the arithmetic unit 20 may execute only multi-stage division in the triangle division process.

[0254] (4f) In the above-described embodiment, in the basic triangle, the form in which the first major line is the opposite side of the interior angle having the largest angle, the second major line is the opposite side of the interior angle having the second largest angle after the largest angle, and the third major line is the opposite side of the interior angle having the smallest angle was shown. However, for example, the first major line may be the opposite side of the interior angle having the second largest angle after the largest angle, the second major line may be the opposite side of the interior angle having the largest angle, and the third major line may be the opposite side of the interior angle having the smallest angle.

[0255] (4g) The arithmetic unit 20 and its method described in the present disclosure may be implemented by a dedicated computer provided by configuring a processor and a memory programmed to execute one or more functions embodied by a computer program. Alternatively, the arithmetic unit 20 and its method described in the present disclosure may be implemented by a dedicated computer provided by configuring a processor with one or more dedicated hardware logic circuits. Or, the arithmetic unit 20 and its method described in the present disclosure may be implemented by one or more dedicated computers configured by a combination of a processor and a memory programmed to execute one or more functions and a processor configured by one or more hardware logic circuits. Also, the computer program may be stored in a computer-readable non-transitory tangible recording medium as instructions executable by a computer. The method for realizing the functions of each part included in the arithmetic unit 20 does not necessarily have to include software, and all of its functions may be realized using one or more hardware.

[0256] (4h) A plurality of functions of one component in the above embodiment may be realized by a plurality of components, or one function of one component may be realized by a plurality of components. Also, a plurality of functions of a plurality of components may be realized by one component, or one function realized by a plurality of components may be realized by one component. Also, a part of the configuration of the above embodiment may be omitted. Also, at least a part of the configuration of the above embodiment may be added to or replaced with the configuration of another above embodiment.

[0257] (4i) In addition to the arithmetic unit 20 described above, the present disclosure can also be realized in various forms such as a device or a system having the arithmetic unit 20 as a component, a program for operating the arithmetic unit 20, a non-transitory physical recording medium such as a semiconductor memory storing this program, and a triangle generation method. The device having the arithmetic unit 20 as a component may include, for example, a radar simulator.

[0258] [The technical idea disclosed in this specification] [Item 1] A triangle generation device, An acquisition unit (S1) configured to acquire a vertex coordinate group including the coordinates of each vertex for one or more basic triangles; A triangle division unit (S2) 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; Comprising, The triangle division unit, For each of the basic triangles defined by the vertex coordinate group, a target determination unit (S120) configured to determine whether it is a target triangle having a shape with a relatively large degree of coincidence with an 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 have a shape with a relatively large degree of coincidence with the equilateral triangle; An addition unit (S155) configured to generate a new vertex coordinate group including the vertex coordinates of the divided triangles; Having, For each of the basic triangles defined by the coordinates of each vertex included in the new vertex coordinate group generated by the addition unit, calculating the coordinates of the vertices of a plurality of subdivided triangles that divide the area of the basic triangle smaller than the basic triangle, Triangle generation device. [Item 2] The triangle generation device according to Item 1, The target determination unit determines, for each of the basic triangles, whether the maximum value of the interior angles is less than the allowable angle, determines that the basic triangle is the target triangle when the maximum value of the interior angles is less than the allowable angle, and determines that the basic triangle is not the target triangle when the maximum value of the interior angles is greater than or equal to the allowable angle Triangle generation device. [Item 3] The triangle generation device according to Item 1 or Item 2, When the pre-shaping execution unit determines, by the target determination unit, that the basic triangle is not the target triangle, the pre-shaping execution unit divides the basic triangle into two by a bisector that bisects the interior angle having the maximum value in the basic triangle. Triangle generation device. [Item 4] The triangle generation device according to any one of Items 1 to 3, wherein the triangle division unit a main division number setting unit (S21, S240) configured to set a main division number (M) when equally dividing the first side of the basic triangle based on a predetermined division length; a sub-division number setting unit (S22, S350) configured to set a sub-division number (N) when equally dividing the set minor lines for each of the plurality of main division points set on the first side based on the division length; for each of the main division points, for each set pair of minor lines, the region of the basic triangle sandwiched by the pair of minor lines is divided into one or more triangles without overlap, with the sub-division points on the two minor lines belonging to the pair of minor lines as vertices, and the triangles are defined as the finely divided triangles. Information specifying the combination method of the sub-division points belonging to each finely divided triangle is used as combination information, and the combination information is obtained. Using the vertex coordinate group, the main division number, and the combination information, for each pair of minor lines set for each of the main division points, the coordinates of the vertices of the finely divided triangles are calculated. An execution unit (S23) configured as such; further having the main division points are a plurality (M + 1) of points including both ends of the first side and located at positions where the first side is equally divided by the main division number; the minor line is a line segment passing through the main division point, extending from the first side to the second side, and along the third side; the sub-division points are a plurality (N + 1) of points including both ends of the minor line and located at positions where the minor line is equally divided by the sub-division number; The minor line pair is, in the minor line, any combination of two adjacent minor lines, For each of the basic triangles defined by the coordinates of each vertex included in the new vertex coordinate group generated by the additional part, the main division number is set by the main division number setting part, the sub-division number is set by the sub-division number setting part, and the execution part calculates the coordinates of the vertices of the plurality of the finely divided triangles that divide the area of the basic triangle smaller than the basic triangle. Triangle generation device (20). [Item 5] The triangle generation device according to item 4, In the basic triangle, the first side is the side opposite the interior angle having the largest angle, the second side is the side opposite the interior angle having the second largest angle after the largest angle, and the third side is the side opposite the interior angle having the smallest angle. [Item 6] The triangle generation device according to item 4 or item 5, When specifying the sub-division points belonging to one of the finely divided triangles, for each of the minor line pairs set for each of the main division points, the sub-division points on the minor line set for each of the main division points and the sub-division points on the adjacent minor line are alternately specified. Triangle generation device. [Item 7] The triangle generation device according to any one of items 4 to 6, A main division point identification setting part (S330) configured to set a main division point identification number for identifying each of the main division points for each of the main division points, A sub-division point identification setting part (S545) configured to set a sub-division point identification number for identifying each of the sub-division points for each of the sub-division points, Further comprising, Each of the sub-division points is Specified by, The combination information specifies how the sub-division points belonging to the sub-divided triangles are combined, based on the main division point identification number and the sub-division Point identification number. Triangle generation device. [Item 8] The triangle generation device according to any one of Items 4 to 7, wherein the execution unit calculates the coordinates of the vertices of the sub-divided triangles in parallel for each main division point. Triangle generation device. [Item 9] For one or more basic triangles, obtain a vertex coordinate group including the coordinates of each vertex, A triangle generation method 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 sub-divided triangles, wherein for each of the basic triangles defined by the vertex coordinate group, determine whether it is a target triangle having a shape with a relatively high degree of coincidence with an equilateral triangle (S120), divide the basic triangle determined not to be the target triangle into a plurality of triangles so that the shape has a relatively high degree of coincidence with the equilateral triangle (S150), generate a new vertex coordinate group including the vertex coordinates of the divided triangles (S155), for each of the basic triangles defined by the coordinates of each vertex included in the new vertex coordinate group, calculate the coordinates of the vertices of a plurality of sub-divided triangles that divide the area of the basic triangle smaller than the basic triangle, Triangle generation method. [Item 10] A triangle generation program that causes a computer to function as a triangle generation device, comprising: an acquisition step (S1) configured to acquire a vertex coordinate group including the coordinates of each vertex for one or more basic triangles; and a triangle division step (S2, S12) 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 sub-divided triangles. The triangular division step is For each of the basic triangles defined by the vertex coordinate group, a target determination step (S120) configured to determine whether it is a target triangle having a shape with a relatively large degree of coincidence with an equilateral triangle; A pre-shaping execution step (S150) configured to divide a basic triangle determined not to be the target triangle into a plurality of triangles so as to have a shape with a relatively large degree of coincidence with the equilateral triangle; An additional step (S155) configured to generate a new vertex coordinate group including the vertex coordinates of the divided triangles; and has For each of the basic triangles defined by the coordinates of each vertex included in the new vertex coordinate group generated by the additional step, calculate the coordinates of the vertices of a plurality of sub-divided triangles that divide the area of the basic triangle smaller than the basic triangle. Triangle generation program.

Explanation of symbols

[0259] 20... arithmetic unit, 21... CPU, 22... GPU.

Claims

1. A triangle generation device, an acquisition unit (S1) configured to acquire a vertex coordinate group including the coordinates of each vertex for one or a plurality of basic triangles; a triangle division unit (S2) 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; comprising the triangle division unit for each of the basic triangles defined by the vertex coordinate group, a target determination unit (S120) configured to determine whether it is a target triangle having a shape with a relatively large degree of coincidence with an 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 have a shape with a relatively large degree of coincidence with the equilateral triangle; an addition unit (S155) configured to generate a new vertex coordinate group including the vertex coordinates of the divided triangles; having for each of the basic triangles defined by the coordinates of each vertex included in the new vertex coordinate group generated by the addition unit, calculating the coordinates of the vertices of a plurality of subdivided triangles that divide the area of the basic triangle smaller than the basic triangle, a triangle generation device (20).

2. The triangle generation device according to claim 1, the target determination unit determines, for each of the basic triangles, whether the maximum value of the interior angles is less than the allowable angle, determines that the basic triangle is the target triangle when the maximum value of the interior angles is less than the allowable angle, and determines that the basic triangle is not the target triangle when the maximum value of the interior angles is greater than or equal to the allowable angle a triangle generation device.

3. The triangle generation device according to claim 1 or claim 2, When the pre-shaping execution unit determines that the basic triangle is not the target triangle by the target determination unit, the basic triangle is divided into two by a bisector that bisects the interior angle having the maximum value in the basic triangle. Triangle generation device.

4. The triangle generation device according to claim 1, wherein The triangle division unit A main division number setting unit (S21, S240) configured to set a main division number (M) when equally dividing the first side of the basic triangle based on a predetermined division length; For each of a plurality of main division points set on the first side, a sub-division number setting unit (S22, S350) configured to set a sub-division number (N) when equally dividing the set minor line based on the division length; For each of the main division points, for each set minor line pair, the region of the basic triangle sandwiched by the minor line pair is defined as a plurality of triangles that do not overlap with each other with the sub-division points on the two minor lines belonging to the minor line pair as vertices, and the combination information specifying the combination method of the sub-division points belonging to each sub-divided triangle is used as combination information, and the combination information, the vertex coordinate group, and the main division number are used to calculate the coordinates of the vertices of the sub-divided triangle for each minor line pair set for each of the main division points. Execution unit ( S23) and further has The main division points are a plurality (M + 1) of points including both ends of the first side and located at positions where the first side is equally divided by the main division number. The minor line is a line segment passing through the main division point, reaching from the first side to the second side, and along the third side. The sub-division points are a plurality (N + 1) of points including both ends of the minor line and equally dividing the minor line by the sub-division number. The minor line pair is, in the minor line, any combination of two adjacent minor lines, For each of the basic triangles defined by the coordinates of the vertices included in the new vertex coordinate group generated by the additional part, the main division number is set by the main division number setting part, the sub-division number is set by the sub-division number setting part, and the execution part calculates the coordinates of the vertices of the plurality of fine division triangles that divide the area of the basic triangle smaller than the basic triangle. Triangle generation device.

5. The triangle generation device according to claim 4, In the basic triangle, the first side is the side opposite the interior angle having the largest angle, the second side is the side opposite the interior angle having the second largest angle after the largest angle, and the third side is the side opposite the interior angle having the smallest angle. Triangle generation device.

6. The triangle generation device according to claim 4 or claim 5, When specifying the sub-division points belonging to one of the fine division triangles, for each of the minor line pairs set for each of the main division points, the sub-division points on the minor line set for each of the main division points and the sub-division points on the adjacent minor line are alternately specified. Triangle generation device.

7. The triangle generation device according to claim 4 or claim 5, A main division point identification setting part (S330) configured to set a main division point identification number for identifying each main division point for each of the main division points, A sub-division point identification setting part (S545) configured to set a sub-division point identification number for identifying each sub-division point for each of the sub-division points, Further comprising, Each of the sub-division points is specified by the main division point identification number and the sub-division point identification number. The combination information specifies how the sub-division points belonging to the sub-divided triangles are combined based on the main division point identification number and the sub-division point identification number. Triangle generation device.

8. The triangle generation device according to claim 4, The execution unit calculates the coordinates of the vertices of the sub-divided triangles in parallel for each main division point. Triangle generation device.

9. For one or more basic triangles, obtain a vertex coordinate group including the coordinates of each vertex. A triangle generation method 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 sub-divided triangles, For each of the basic triangles defined by the vertex coordinate group, determine whether it is a target triangle having a shape with a relatively large degree of coincidence with an equilateral triangle (S120). Divide the basic triangle determined not to be the target triangle into a plurality of triangles so that it has a shape with a relatively large degree of coincidence with the equilateral triangle (S150). Generate a new vertex coordinate group including the vertex coordinates of the divided triangles (S155). For each of the basic triangles defined by the coordinates of each vertex included in the new vertex coordinate group, calculate the coordinates of the vertices of a plurality of sub-divided triangles that divide the area of the basic triangle smaller than the basic triangle. Triangle generation method.

10. A triangle generation program that causes a computer to function as a triangle generation device, An acquisition step (S1) configured to obtain a vertex coordinate group including the coordinates of each vertex for one or more basic triangles, And a triangle division step (S2, S12) 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 sub-divided triangles. The triangular division step is a target determination step (S120) configured to determine, for each of the basic triangles defined by the vertex coordinate group, whether it is a target triangle having a shape with a relatively large degree of coincidence with an equilateral triangle; a pre-shaping execution step (S150) configured to divide the basic triangle determined not to be the target triangle into a plurality of triangles so as to have a shape with a relatively large degree of coincidence with the equilateral triangle; an additional step (S155) configured to generate a new vertex coordinate group including the vertex coordinates of the divided triangles; and has for each of the basic triangles defined by the coordinates of each vertex included in the new vertex coordinate group generated by the additional step, calculating the coordinates of the vertices of a plurality of sub-divided triangles that divide the area of the basic triangle smaller than the basic triangle; a triangle generation program.

Citation Information

Patent Citations

  • Smooth free deformation algorithm for quick segmentation of triangle

    CN106960469A

  • Three-dimensional geological analysis prediction model construction method

    CN112562078A

  • Tessellation method using displacement factors

    US10832473B2

  • Accelerated ray tracing using shallow bounding volume hierarchies

    US20100053162A1