This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2011-204166, filed on Sep. 20, 2011, the entire contents of which are incorporated herein by reference.
This technique relates to a visualization method and apparatus.
As a method for visualizing the velocity field of objects such as fluids, there is a method of visualizing the flow of objects by using objects such particles or streamlines (hereafter, referred to as particle flow).
Incidentally, in recent years, the computing performance of computers has been improving, so it is possible to visualize the flow in more detail by displaying a lot of objects. However, when many objects are displayed, objects may collect in a certain area, so instead it may become difficult to know the flow condition. For example, in a simple laminar flow as illustrated in
Particularly, in the case of simulating the movement of smoke or dust in a diffusion field, or simulating aerodynamic characteristics in the design of an industrial product, the display of streak lines may be used to illustrate many particles that increase overtime in a one-to-many relationship. In such a case, by displaying many objects, particles whose movement is being tracked may be covered by other particles and become difficult to see, or may further become lost from view.
Conventionally, there has been a technique that virtual particles are placed in a flow channel of the substance, and based on flow velocity field data, which is data of the velocity field of the flow, the flow velocities at the positions of virtual particles and the displacements after a small unit of time are repeatedly calculated in order to obtain the data for the streak lines of the virtual particles. However, according to such a technique, when the flow has a complicated structure, streak lines may overlap, and it may become difficult to understand the movement of the virtual particles.
Moreover, there is a visualization method to make it possible to easily understand flows that occur around an object such as an elliptical body or car by performing coloring. However, according to such a method of visualization, when the structure of the flow becomes complicated, erroneous recognition may occur.
In other words, there is no technique for making it easy to understand movement of particles in the diffusion field.
A visualization processing method relating to one aspect of this technique includes: (A) classifying plural particles in a diffusion field into plural groups, based on data of positions and velocities of the plural particles, so that particles between which a distance is equal to or less than a predetermined distance and of which an absolute value of a difference between velocity vectors is equal to or less than a predetermined value among the plural particles are classified to a same group; (B) first generating, for each of the plural groups, group display data for particles belonging to the group; and (C) second generating display data by attaching the generated group display data to particle display data for displaying the particles belonging to the group.
The object and advantages of the embodiment will be realized and attained by means of the elements and combinations particularly pointed out in the claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the embodiment, as claimed.
When accepting a visualization instruction from the user of the information processing apparatus 1, the input unit 101 sends a visualization processing request to the particle flow generator 103. The velocity calculation unit 106 uses simulation data that is stored in the simulation result storage unit 105 to calculate velocity field data (for example, velocity data for the particles in three dimensions), and stores the calculated velocity field data in the velocity data storage unit 107. The particle flow generator 103 uses the simulation data that is stored in the simulation result storage unit 105, data of objects to be rendered, which is stored in the object storage unit 102, and the velocity field data that is stored in the velocity data storage unit 107 to generate rendering data for displaying the flow using the particle flow, and stores the generated data in the first rendering data storage unit 104. The grouping processing unit 109 uses the velocity field data that is stored in the velocity data storage unit 107 to perform a grouping processing of the particles, and stores the grouping data, which are the results of the grouping processing, in the grouping table storage unit 113. The object generator 110 uses the grouping data that is stored in the grouping table storage unit 113, and data of the particle table that is stored in the particle table storage unit 114 to perform a processing to generate group display data, and stores the generated group display data in the second rendering data storage unit 115. The streamline generator 111 carries out a processing to generate streamlines for the group display that was generated by the object generator 110. The coloring processing unit 112 carries out a processing to color the group display that was generated by the object generator 110. The rendering processing unit 116 carries out a processing by using the rendering data that is stored in the first rendering data storage unit 104 and the rendering data for the group display, which is stored in the second rendering data storage unit 115, and stores display data, which is a result of the processing, in the third rendering data storage unit 117. The graphics processing unit 118 carries out a well-known process for displaying the data that is stored in the third rendering data storage unit 117. The display unit 119 displays the processing results from the graphics processing unit 118 on a display device.
Next, the operation of the information processing apparatus 1 illustrated in
First, in response to the instruction, for example, from the user, the velocity calculation unit 106 uses the data stored in the simulation result storage unit 105 to calculate the velocity field, and stores the velocity field data, which represents the calculation results, in the velocity data storage unit 107 (
Then, the grouping processing unit 109 in the group display generator 108 sets “0” as the initial value of time t (step S3), and sets “0” as the initial value of the group number g (step S5).
The grouping processing unit 109 sets “1” to the particle number n (step S7). Then, the grouping processing unit 109 identifies the minimum natural number that satisfies the relationships m≧2, and m>n, and sets the identified natural number to the particle number m (step S9).
The grouping processing unit 109 then uses the position data that is stored in the velocity data storage unit 107 to calculate the difference (in other words, the distance) Δp between the positions of two particles (here, particle m and particle n) at time t, and stores the result in a storage device such as a main memory (step S11).
The grouping processing unit 109 then determines whether or not Δp satisfies the relationship Δp<pg (step S13). Here, pg is a preset reference value for the distance.
When it is determined that the relationship Δp<pg is not satisfied (step S13: NO route), the particle m does not belong to the same group as the particle n, so the processing moves to step S21 in
On the other hand, when it is determined that the relationship Δp<pg is satisfied (step S13: YES route), the grouping processing unit 109 uses the velocity data that is stored in the velocity data storage unit 107 to calculate the absolute value Δv of a vector representing the difference between the velocity vector of the particle m and velocity vector of the particle n at time t, and stores the result in the storage device such as the main memory (step S15).
The grouping processing unit 109 then determines whether or not Δv satisfies the relationship Δv<vg (step S17). Here, vg is a preset reference value for the magnitude of the velocity. At the step S15, a velocity vector, which corresponds to the difference between two velocity vectors, is calculated, and the absolute value of the calculated velocity vector is calculated. Therefore, when the direction of the two velocity vectors is very different, the absolute value of the difference between the velocity vectors becomes greater than that obtained when the direction of the two velocity vectors is close. Therefore, when the direction of the two velocity vectors is very different, it is determined that the two particles belong to different groups.
When it is determined that the relationship Δv<vg is not satisfied (step S17: NO route), the particle m does not belong to the same group as the particle n, so the processing moves to the step S21 in
On the other hand, when it is determined that the relationship Δv<vg is satisfied (step S17: YES route), the particle m belongs to the same group as the particle n. Therefore, the grouping processing unit 109 sets “g” as the group numbers of the particle m and particle n in the particle table that is stored in the particle table storage unit 114 (step S19). The processing then moves to the step S21 in
Moving to an explanation of
On the other hand, when it is determined that there is no unprocessed particle m (step S21: NO route), the grouping processing unit 109 sets g=g+1 as the group number g that represents the group (step S25). Then, the grouping processing unit 109 determines whether or not there is an unprocessed particle n (step S27).
When it is determined that there is an unprocessed particle n (step S27: YES route), the grouping processing unit 109 sets n=n+1 as the particle n, in order to process the next particle n (step S29). The processing then returns to the step S9 via a terminal C.
However, when it is determined that there is no unprocessed particle n (step S27: NO route), the object generator 110, the streamline generator 111 and the coloring processing unit 112 carry out a group display generation processing for time t (step S31). The group display generation processing will be explained using
First, the object generator 110 sets “0” to the group number g (
The object generator 110 then searches the particle table by the particle number m and particle number n, and determines whether or not the group number of the particle m and particle n is g (step S47). In other words, the object generator 110 determines whether or not the particle m and particle n belong to the same group g.
When it is determined that the group number of either particle m or particle n is not g (step S47: NO route), the processing moves to step S51.
On the other hand, when it is determined that the group number of both particle m and particle n is g (step S47: YES route), the object generator 110 uses the position data that is stored in the velocity data storage unit 107 to calculate the length of the line segment that connects the particle m and particle n at time t, or in other words, the distance between the particles m and n, and stores the calculation result in the grouping table storage unit 113 (step S49).
The object generator 110 then determines whether or not there is an unprocessed particle m (step S51). When it is determined that there is an unprocessed particle m (step S51: YES route) , the grouping processing unit 109 sets m=m+1 in order to process the next particle m (step S53). The processing then returns to the step S47.
On the other hand, when it is determined that there is no unprocessed particle m (step S51: NO route), the object generator 110 determines whether or not there is an unprocessed particle n (step S55). When it is determined that there is an unprocessed particle n (step S55: YES route), the object generator 110 sets n=n+1 in order to process the next particle n (step S57). The processing then returns to the step S45.
However, when it is determined that there is no unprocessed particle n (step S55: NO route), the processing moves to step S59 in
Moving to an explanation of
The object generator 110 then identifies, from among the line segments for which the processing to determine whether the line segment is to be used in the skeleton structure has not been carried out, a line segment that has the shortest length (step S61). The object generator 110 also determines whether or not a loop will be formed inside the skeleton structure being generated, by adding the identified line segment to that skeleton structure (the skeleton structure will be explained in detail later) (step S63). The determination of whether or not the loop is formed by adding the line segment will be described later.
When it is determined that a loop is formed (step S63: YES route), the object generator 110 deletes the data for the line segment that is a processing target from the grouping table (step S64). Then, in order to process the next line segment, the processing returns to the step S61.
However, when it is determined that a loop is not formed (step S63: NO route), the object generator 110 generates rendering data for the identified line segment, and stores the generated data in the storage device (step S65).
The object generator 110 then determines whether or not the number of line segments for which rendering data was generated has reached (Pn−1) (step S67). Here, Pn is the number of particles that belong to the group having the group number g. When it is determined that the number of line segments for which rendering data was generated has not reached (Pn−1) (step S67: NO route), the processing returns to the step S61 in order to process the next line segment.
Here, the processing that is carried out from the step S61 to the step S67 will be explained using a detailed example. The processing from the step S61 to the step S67 is a processing for forming line segments between particles, and generating data of a structure (hereafter, called a skeleton structure) such as illustrated in
Generating a skeleton structure for a group that includes seven particles, such as illustrated in
When data such as illustrated in
First, one of the particles (particle 1 and particle 4) on both ends of the line segment L3 to be added is selected. Here, it is assumed that the particle 1 is selected. The search path that starts from the particle 1 will be considered. More specifically, an n-ary tree structure with the particle 1 as the root is generated using data in the grouping table.
First, a tree structure such as illustrated in
Next, for the particles 2 and 4, which are terminals of the n-ary tree structure, line segments L8 and L7, which are line segments for which rendering data has already been generated, are added to the n-ary tree structure. The line segment L8 is a line segment that connects the particle 2 and particle 4 in
Here, the n-ary tree structure illustrated in
As described above, a skeleton structure is generated by connecting line segments between particles in order from the line segment that is the shortest so as not to form loops.
Returning to the explanation of
On the other hand, when it is determined that there are no unprocessed groups (step S69: NO route), the processing moves to step S73 in
Moving to an explanation of
For example, when the processing of the step S73 is carried out for the skeleton structure illustrated in
The object generator 110 generates group display data by carrying out a correction process on the concave sections and a rounding processing for rounding corners for the structure generated by the processing at the step S73, and stores the generated data in the storage device (step S75). Correction of the concave sections is a smoothing processing by further carrying out a swelling processing on the recessed portions in the portions for which the swelling processing was carried out. The rounding processing of the corner is a processing for eliminating sharp corners by carrying out a swelling processing on sharp portions such as portions that were tips of the segments. By carrying out the processing of the step S75, the group display has a shape close to an elliptical body or spherical body.
For example, when the processing of the step S75 is carried out on the structure illustrated in
The coloring processing unit 112 uses position data that is stored in the velocity data storage unit 107 to identify the position on the z-axis of each group at time t (step S76). Here, the average of the coordinate values in the z-axis direction of the particles belonging to a group is taken to be the coordinate value of the position in the z-axis direction of the group.
The coloring processing unit 112 then carries out a coloring processing on the group display according to the position of the group in the z-axis direction, and stores the processing result in the storage device (step S77). For example, as illustrated in
The streamline generator 111 then carries out a streamline rendering processing (step S79). The streamline rendering processing will be explained later. The processing then returns to the calling-source processing.
As explained above, a group display is generated that covers the particles that are included in the same group. By using this kind of display, it is possible to easily know the condition of the flow more than a case of simply displaying only particles.
Moreover, the result of further carrying out the coloring processing on the group displays illustrated in
Next, the streamline rendering processing (step S79) will be explained using
Then, the streamline generator 111 identifies one unprocessed particle from among the target group (step S85). The streamline generator 111 calculates the distance between the particle identified at the step S85 and the average position Pa that was calculated at the step S83, and stores the calculation result in the storage device such as the main memory (step S87).
The streamline generator 111 then determines whether or not there are any unprocessed particles (step S89). When it is determined that there is an unprocessed particle (step S89: YES route), the processing returns to the step S85 in order to process the next particle.
On the other hand, when it is determined that there aren't any unprocessed particles (step S89: NO route), the streamline generator 111 sets “1” to the column of the streamline flag in the particle table for a particle whose distance calculated at the step S87 is shortest among the particles belonging to the target group (step S91).
Then, the streamline generator 111 determines whether or not there are any unprocessed groups (step S93). When it is determined that there is an unprocessed group (step S93: YES route), the processing returns to the step S81 in order to process the next group.
On the other hand, when it is determined that there are no unprocessed groups (step S93: NO route), the streamline generator 111 uses data that is stored in the velocity data storage unit 107 for each particle at time t to identify the position of each particle after At seconds from the time t (step S95). After that, the streamline generator 111 generates streamline data for each particle at time t from the position at time t to the position after Δt seconds from the time t, then adds the generated data to the group display data, and stores the processing result in the second rendering data storage unit 115 (step S97). For representative particles in the particle table for which “1” is set to the streamline flag, the streamline color is made a different color from the colors of the streamlines of other particles. The processing then returns to the calling-source processing.
Moreover, an example was given in which streamlines that were generated for each particle at time t were attached to each particle at time t, however, the streamlines may be attached to each particle at time t+Δt.
By carrying out the processing explained above, group display data and streamline data are generated and stored in the second rendering data storage unit 115.
On the other hand, the particle flow generator 103 uses data stored in the simulation result storage unit 105, rendering object storage unit 102 and velocity data storage unit 107 to generate data for displaying the flow using the particle flow (
For example, first, data for carrying out the display such as illustrated in
Then, the grouping processing unit 109 determines whether or not there are any unprocessed time t (step S33). When it is determined that there is an unprocessed time t (step S33: YES route), the grouping processing unit 109 sets t=t+1 in order to carry out a processing for the next time (step S35). The processing then returns to the step S7 via a terminal D.
On the other hand, when there are no unprocessed time t (step S33: NO route), the rendering processing unit 116 reads data for displaying the flow by the particle flow from the first rendering data storage unit 104, and reads the group display data from the second rendering data storage unit 115. The rendering processing unit 116 then carries out a processing to superimpose and display the particles, streamlines and group displays, and stores the display data, which is the processing result, in the third rendering data storage unit 117 (step S37).
With the processing up to this point, display data for carrying out a display such as illustrated in
The graphics processing unit 118 then carries out a processing to cause display data that is stored in the third rendering data storage unit 117 to be displayed by the display unit 119 (step S39). The processing then ends.
At the step S39, a processing such as described in the following is carried out. In other words, display data for carrying out the display such as illustrated in
By carrying out the processing described above, particles that are presumed to be at the same position before time Δt belong to the same group, so it is possible to easily know the movement of the particles in a diffusion field.
Next, a second embodiment will be explained. In this second embodiment, group displays are generated by a group display generation processing that differs from that of the first embodiment. In the following, the group display generation processing in this second embodiment will be explained.
The configuration of the information processing apparatus 1 in the second embodiment is the same as that of the information processing apparatus 1 in the first embodiment. First, the object generator 110 of the group display generator 108 sets “0” to the group number g as the initial value (
Then, the object generator 110 reads position data of particles belonging to a group having the group number g from the velocity data storage unit 107, and determines a straight line whose sum of the squares of the distances from the respective particles becomes minimum, by the least squares method, and then stores data for the determined straight line in a storage device (step S103). With the processing of the step S103, data for a straight line as illustrated in
The object generator 110 then identifies one unprocessed particle from among the particles belonging to the group having the group number g (hereafter, this particle is referred to as the processing target particle) (step S105). The object generator 110 also identifies the position of an intersection point of the determined straight line with a perpendicular line where the perpendicular line is drawn from the processing target particle to the determined straight line, and stores the identified position in the grouping table (step S107).
Moreover, the object generator 110 calculates the distance from a point set on the straight line (hereafter, called the end point) to the intersection point of the straight line with the perpendicular line, and stores the calculated distance in the grouping table (step S109). The endpoint is set at a position such as illustrated with 370 in
The object generator 110 then uses the position data for the processing target particle to determine whether the processing target particle is on the right or the left of the straight line, and stores the determination result in the grouping table (step S111). In this embodiment, it is presumed that the coordinate space is observed in a direction from the positive position of the z coordinate on the z axis toward the origin, and that the observer's right is “right” and the observer's left is “left”. For example, in the case of
Then, the object generator 110 determines whether or not there are any unprocessed particles (step S113). When it is determined that there is an unprocessed particle (step S113: YES route), the processing returns to the step S105 in order to process the next particle.
On the other hand, when it is determined that there are no unprocessed particles (step S113: NO route), the processing moves to step S115 in
Moving to an explanation of
Then, the object generator 110 generates rendering data for line segments that connect between particles, and stores that data in a storage device (step S117). For example, in the example in
Then, the object generator 110 carries out correction of concave sections and rounding processing of corners for the structure generated by the processing of the step S117, generates group display data, and stores the generated display data in the storage device (step S119). These processing is the same as those explained in the first embodiment. With the processing up to the step S119, data such as illustrated in
Moreover, the coloring processing unit 112 uses position data that is stored in the velocity data storage unit 107 to identify the position in the z-axis direction of the group having the group number g (step S120). Here, the average of the positions of the particles belonging to the group is taken to be the position of the group.
Then, the coloring processing unit 112 carries out the coloring processing of the group display according to the position of the group in the z-axis direction, and stores the processing result in the storage device (step S121). The coloring processing is the same as that explained in the first embodiment.
The object generator 110 then determines whether or not there are any unprocessed groups (step S123). When it is determined that there is an unprocessed group (step S123: YES route), the object generator 110 sets g=g+1 as the group number g in order to process the next group (step S125). The processing then returns to the step S103 via a terminal H.
On the other hand, when it is determined that there are no unprocessed groups (step S123: NO route), the streamline generator 111 carries out the streamline rendering processing (step S127). The streamline rendering processing is the same as that explained in the first embodiment. The processing then returns to the calling-source processing.
By carrying out the processing such as described above, it is possible to generate a group display having a suitable shape.
Although the embodiments of this technique were explained, this technique is not limited to the embodiments. For example, the aforementioned functional configuration of the information processing apparatus 1 does not always correspond to an actual program module configuration.
In addition, the respective structures of the aforementioned tables are mere examples, and the data structures are not limited to the aforementioned examples. Furthermore, as for the processing flow, the order of the steps may be exchanged as long as the processing result does not change. Moreover, the steps may be executed in parallel.
Moreover, in the aforementioned example, the color of the group display is set according to the position in the z-axis direction. However, the direction used when the color is set is not limited to the z-axis direction. The x-axis direction, y-axis direction or an arbitrary direction may be selected according to the direction of the flow in the coordinate space, and the color may be changed according to the position in the selected axis direction.
Moreover, in the aforementioned example, the smoothing processing of the concave portions and rounding processing of the corners are carried out. However, in order to shorten the processing time, these processing may be omitted.
In addition, the least squares method is used in the second embodiment. However, a method of the principal component analysis may be utilized.
Furthermore, in the aforementioned example, one computer is used to carryout the aforementioned processing. However, plural computers may be used to execute the aforementioned processing.
In addition, the aforementioned information processing apparatus 1 is a computer device as illustrated in
Incidentally, the respective processing unit illustrated in
The embodiments described above are summarized as follows:
A visualization processing method relating to the embodiments includes: (A) classifying plural particles in a diffusion field into plural groups, based on data of positions and velocities of the plural particles, so that particles between which a distance is equal to or less than a predetermined distance and of which an absolute value of a difference between velocity vectors is equal to or less than a predetermined value among the plural particles are classified to a same group; (B) first generating, for each of the plural groups, group display data for particles belonging to the group; and (C) second generating display data by attaching the generated group display data to particle display data for displaying the particles belonging to the group.
By carrying out such a processing, because particles which were presumed to be placed at the same position before the minute time are classified to the same group, it becomes possible to easily understand the movement of the particles in the diffusion field.
Moreover, the first generating may further include: identifying, for each of the plural groups, a position of the group in a direction of a first axis by using data of positions of the particles belonging to the group; and determining a color to be used for a group display according to the identified position of the group. For example, when the uniform flow is in a depth direction, there is a case where the three-dimensional structure of the flow cannot be easily understood depending on the direction of the sight. In such a case, when the color of the group display is changed according to the position of the depth direction, it becomes possible to easily understand the three-dimensional structure of the flow.
Moreover, the visualization processing method may further include: identifying, for each of the plural groups, a particle closest to an average of positions of the particles belonging to the group, from among the particle belonging to the group; generating data of a streamline from a position of the identified particle to a position of the identified particle after a predetermined time; and adding the generated data of the streamline to the group display data. By carrying out such a processing, when displaying the streamline for each group, it becomes possible to easily grasp the rough status of the flow.
Furthermore, the first generating may further include: generating, for each of the plural groups, data of a first structure, by connecting N−1 segments between the particles belonging to the group so as not to form a loop in ascending order of lengths of the segments, wherein N represents the number of particles belonging to the group; and generating the group display data by thickening thickness of the segments included in the first structure and smoothing a concave portion included in the first structure. Thus, the shape of the group display becomes a natural shape near the sphere or ellipsoid.
Moreover, the first generating may include: identifying, for each of the plurality of groups, a straight line based on a regression analysis by using data of positions of particles belonging to the group; classifying, for each of the plurality of groups, the particles belonging to the group into a first group and a second group based on a positional relationship between the identified straight line and the particles belonging to the group; identifying, for each of particles belonging to the first group, a position at which a perpendicular line from the particle to the identified straight line intersects with the identified straight line; generating data of a second structure by connecting, by a line segment, particles whose identified positions are adjacent to each other; identifying, for each of particles belonging to the second group, a position at which a perpendicular line from the particle to the identified straight line intersects with the identified straight line; generating data of a third structure by connecting, by a line segment, particles whose identified positions are adjacent to each other; generating data of a fourth structure by connecting, by a line segment, an edge of the second structure and an edge of the third structure; and generating the group display data by smoothing a concave portion of the fourth structure. Even when such a processing is carried out, the shape of the group display becomes an appropriate shape.
Incidentally, it is possible to create a program causing a computer to execute the aforementioned processing, and such a program is stored in a computer readable storage medium or storage device such as a flexible disk, CD-ROM, DVD-ROM, magneto-optic disk, a semiconductor memory, and hard disk. In addition, the intermediate processing result is temporarily stored in a storage device such as a main memory or the like.
All examples and conditional language recited herein are intended for pedagogical purposes to aid the reader in understanding the invention and the concepts contributed by the inventor to furthering the art, and are to be construed as being without limitation to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although the embodiments of the present inventions have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2011-204166 | Sep 2011 | JP | national |