Abstract:
Provided are a system for generating a surface mesh surrounding particles on a 3D space. An implicit function module receives particle data containing three-dimensional location and radius data of the particles, grids the particles into rectangular parallelepiped shape, and generates implicit function data having implicit function value determining the surface at grid points. A mesh module generates a mesh through a pre-process of substituting the implicit function value of the gird point, where the implicit function value is defined, by zero when the a distance between a grid point where the implicit function value of the implicit function data and the vertex of the mesh is within a set distance. Accordingly, the system and method are useful for visualizing the results of particle simulations used in basic science and engineering. In particular, the system and method can generate high-quality mesh in computer graphics of fluid simulation using the particles.

Description:
BACKGROUND OF THE INVENITON  
       [0001]     1. Field of the Invention  
         [0002]     The present invention relates to a system and method for generating a surface mesh surrounding particles, and more particularly, to a system and method for generating a surface mesh surrounding particles, which can visualize particle simulation results faster and more effectively in basic science and engineering.  
         [0003]     2. Description of the Related Art  
         [0004]     A method for rendering particles into three-dimensional (3D) spheres and visualizing the results has been proposed. This method has an advantage in that it is very simple and can roughly estimate the results rapidly. However, this method is unsuitable for computer graphics field requiring more accurate surface information. Specifically, when spherical surfaces overlap each other, a mesh of the inside of the spheres is unnecessarily generated. Thus, an amount of data unnecessarily increases.  
         [0005]     In recent years, methods for finding a surface mesh corresponding to a fluid surface in a fluid simulation using particles have been studied. Desbrun adopted a method of calculating an equi-density surface using density values of fluid particles. However, finding a reference value for calculation of the equi-density surface is very ambiguous. In some cases, important portions of the fine fluid surface disappear. Thus, it often seems that viscosity of the fluid is large.  
         [0006]     According to another method proposed by Mueller et. al, a color field is formed by assigning a value of  1  to a fluid particle and a value of 0 to the others, and a fluid surface is calculated using a method of calculating an equi-surface with respect to a specific value. Also, a surface tension in a specific location is calculated. Compared with the Desbrun&#39;s method, the Mueller&#39;s method has an advantage in that it usable in the general particles because a fluid density is not used, but it also has a disadvantage of ambiguity and blurring.  
       SUMMARY OF THE INVENTION  
       [0007]     Accordingly, the present invention is directed to a system and method for generating a surface mesh surrounding particles, which substantially obviates one or more problems due to limitations and disadvantages of the related art.  
         [0008]     It is an object of the present invention to provide a system and method for generating a surface mesh surrounding particles. Since the particle surface expression is derived using the Ricci&#39;s union modeling method considering the radius of the particle, the blurring of the mesh generated as the density function or color field can be prevented and thus the fine expression is possible. Also, in calculating the particle surface expression obtained by the Ricci&#39;s union modeling, the grid point is initialized to zero and only the neighbor grid points located below a predetermined distance of the grid point are updated as the implicit function value. Therefore, the generation time of the implicit function can be remarkably reduced.  
         [0009]     Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention. The objectives and other advantages of the invention may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings. To achieve these objects and other advantages and in accordance with the purpose of the invention, as embodied and broadly described herein, there is provided a system for generating a surface mesh surrounding particles, including: an implicit function module for receiving particle data containing three-dimensional location and radius data of the particles, gridding the particles into rectangular parallelepiped shape, and generating implicit function data having implicit function value determining the surface at grid points; and a mesh module for generating a mesh through a pre-process of substituting the implicit function value of the gird point, where the implicit function value is defined, by zero when the a distance between a grid point where the implicit function value of the implicit function data and the vertex of the mesh is within a set distance.  
         [0010]     In accordance with another aspect of the present invention, there is provided a method for generating a surface mesh surrounding particles, including the steps of: (a) at an implicit function module, receiving particle data containing three-dimensional location and radius data of the particles, gridding the particles into rectangular parallelepiped shape, and generating implicit function data having implicit function value determining the surface at grid points; and (b) at a mesh module, generating a surface mesh through a polygon mesh generating process using a tetrahedron-based region division for processing implicit function data containing zero.  
         [0011]     It is to be understood that both the foregoing general description and the following detailed description of the present invention are exemplary and explanatory and are intended to provide further explanation of the invention as claimed. 
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0012]     The accompanying drawings, which are included to provide a further understanding of the invention, are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the principle of the invention. In the drawings:  
         [0013]      FIG. 1  is a block diagram of a system for generating a surface mesh according to an embodiment of the present invention;  
         [0014]      FIG. 2  is a flowchart illustrating a method for generating a surface mesh according to an embodiment of the present invention; and  
         [0015]      FIG. 3  illustrates a Ricci&#39;s union modeling with respect to two elliptical regions according to an embodiment of the present invention. 
     
    
     DETAILED DESCRIPTION OF THE INVENTION  
       [0016]     Reference will now be made in detail to the preferred embodiments of the present invention, examples of which are illustrated in the accompanying drawings.  
         [0017]      FIG. 1  is a block diagram of a system for generating a surface mesh according to an embodiment of the present invention, and  FIG. 2  is a flowchart illustrating a method for generating a surface mesh according to an embodiment of the present invention  
         [0018]     Referring to  FIGS. 1 and 2 , the system for generating the surface mesh according to an embodiment of the present invention includes an implicit function module  1  for generating implicit function data of surfaces surrounding particles, and a mesh module  2  for generating a mesh from the implicit function data. The system receives particle data as input data and generates mesh data through the implicit function module  1  and the mesh module  2 .  
         [0019]     The implicit function module  1  will be described below in more detail.  
         [0020]     The implicit function module  1  receives the particle data as the input data and generates the implicit function data of the surface as the result value. The particle data contains a 3D location and a radius of each particle. The implicit function data has specific function values at grid points when a rectangular parallelepiped surrounding the particle is gridded.  
         [0021]     More specifically, the implicit function module  1  determines a particle volume having a rectangular parallelepiped shape (S 1 ), grids the particle volume considering the particle radius (S 2 ), calculates the implicit function values determining the surface at each grid point (S 3 ), and obtain the implicit function data (S 4 ).  
         [0022]     At this point, the process of generating the implicit function data at the grid points is a core of the implicit function module  1 . In order to generate the implicit function, this invention uses a modeling method using union of a surface (Ricci, A constructive geometry for computer graphics, The Computer Journal, 16(2)).  
         [0023]     That is, assuming that f i (x, y, z) is a non-negative function (i.e, M i ={(x, y, z)|f i (x, y, z)=1}) representing surfaces M i  and f(x, y, z):=min(f i (x, y, z), . . . , f n (x, y, z)), M i ={(x, y, z)|f i (x, y, z)=1} represents a boundary of a region defined by union of the inside of the surfaces M i . This is illustrated in detail in  FIG. 3 . Specifically, Ricci showed that when U p :=(f i   −p + . . . +f n   −p ) −1/p  
         min   ⁢     (     ⁢       f   1     ⁡     (     x   ,   y   ,   z   ,   …   ⁢           ,       f   n     ⁡     (     x   ,   y   ,   z     )         )         =       lim     p   →   ∞       ⁢     U   p           
         min   ⁢     (     ⁢       f   1     ⁡     (     x   ,   y   ,   z   ,   …   ⁢           ,       f   n     ⁡     (     x   ,   y   ,   z     )         )         =       lim     p   →   ∞       ⁢     U   p           
 
         [0024]     is obtained. Since a minimum value of a left term in is practically impossible, a right term is used. If using the Ricci&#39;s union modeling method, the particles are regarded as small spheres having a predetermined radius and the implicit function of the desired surface is given as their union. For the particle (x i ,y i ,z i ,r i ), f i (x,y,z)=((x−x i ) 2  +(y−y i ) 2 +(z−z i ) 2 )/r i   2  . However, in the actual calculating process of  
           lim     p   →   ∞       ⁢     U   p       ,       
 
 the infinity of p cannot be taken. Thus, for p≦8, Uis considered as the implicit function of the surface. Generally, as the value of p increases, it is possible to obtain the result that is much closer to the actual union. On the other hand, for p&gt;8, the almost same results are obtained. 
 
         [0025]     If this method is implemented using a general method, a large amount of calculation time is required because f i  for each particle is defined with respect to an entire particle volume. According to the present invention, when f i  is more than a specific distance, it is made to be infinity. Therefore, calculation time is remarkably reduced. Specifically, function values of all grid points are initialized to zero in an initial period. During the calculating process in each particle, only the grid points located within a set distance are updated. In this way, the grid points located away from the surface have infinity as the implicit function value. The mesh module  2  must process the infinity without error. Pseudocode for the implicit function is as follows:  
                                                   For each grid point p i              Set f (p i )           0           End for           For each particle of index i            Determine the scaled distance function f i              Find neighbor grid points n j              For each neighbor grid point n j               Compute f i (n j )             Update f (n j )           f (n j ) + f i (n j ) −p              End for           End for           For each grid point p i              Set f (p i )           1/f (p i ) 1/p             End for                      
 
         [0026]     The mesh module  2  will be described below in detail.  
         [0027]     The mesh module  2  receives the implicit function data generated from the implicit function module  1  and generates the surface mesh as the result value. A polygon mesh generation algorithm using a tetrahedron-based region division is applied to the mesh module 2. Compared with the hexahedron-based polygon mesh generation algorithm (a so-called Marching cubes), the tetrahedron-based method is advantageous to processing the implicit function data containing zero.  
         [0028]     In order to reduce the number of polygons of the generated mesh, a special pre-process is carried out (S 5 ). This pre-process modifies the implicit function data. Specifically, vertices of the mesh are predicted and, if the grid points whose locations are defined as the implicit function, the implicit function values of the grid points are substituted by zero. The number of the polygons can be reduced to 50% through this process. The substitute condition is as follows. It is assumed that the grid point is v, its neighbor grid point is w, and their implicit function values are f and g, respectively. For convenience, f&gt;0 and g&lt;0. If the location of the expected vertex is less than ε (0&lt;ε&lt;0.5), f0. In other words, the substitute condition is as follows:  
         f     f   +        g            &lt;   ɛ       
 
         [0029]     When the substitute condition test is carried out with respect to all grid points, the pre-process is completed. Pseudocode for this process is as follows:  
                                                                                                                         Determine   ⁢           ⁢   a   ⁢           ⁢   tolerance   ⁢           ⁢   value   ⁢           ⁢   ɛ                    For each grid point p i                                        Set   ⁢           ⁢   f     ←     f   ⁢           ⁢     (     p   i     )                       For each neighbor grid point n j             If f and g have different signs                                                  Set   ⁢           ⁢   r     ←          f               f        +        g                                                  If   ⁢           ⁢   r     &lt;   ɛ                                              Set   ⁢           ⁢   f   ⁢           ⁢     (     p   i     )       ←   0                        End for                 End for                      
 
         [0030]     The implicit function data that has undergone the pre-process contains zero and infinity. Thus, the special process is required. In the mesh module  2 , the polygon mesh generation algorithm using the tetrahedron-based region division requires two modifications. First, when the polygons are extracted from the basic tetrahedron, the number of cases expanded considering zero is predicted. This method is disclosed in a paper of Koide et al., Polyhedral approximation approach to molecular orbital graphics, Journal of Molecular Graphics 4(3), 149-155. The process of the infinity may cause an error by the calculation of infinity/infinity during the process of calculating the vertex generation location of the mesh. However, this problem can be solved by placing the implicit function value of the grid point having no infinity at the numerator.  
         [0031]     As described above, the system and method for generating the surface mesh surrounding the particle according to the present invention have the following effects.  
         [0032]     First, since the particle surface expression is derived using the Ricci&#39;s union modeling method considering the radius of the particle, the blurring of the mesh generated as the density function or color field can be prevented and thus the fine expression is possible.  
         [0033]     Second, in calculating the particle surface expression obtained by the Ricci&#39;s union modeling, the grid point is initialized to zero and only the neighbor grid points located below a predetermined distance of the grid point are updated as the implicit function value. Therefore, the generation time of the implicit function can be remarkably reduced.  
         [0034]     Third, the number of the polygon of the mesh generated through the pre-process of the mesh module can be reduced by 50%.  
         [0035]     Fourth, while the hexahedron-based polygon mesh generation algorithm (Marching cubes) has difficulty in processing data containing zero, the present invention can process the implicit function data having specific values of zero and infinity through the modification of the tetrahedron-based polygon generation algorithm.  
         [0036]     Fifth, the algorithm and system according to the present invention can visualize various data expressed as particles fast and effectively  
         [0037]     It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention. Thus, it is intended that the present invention covers the modifications and variations of this invention provided they come within the scope of the appended claims and their equivalents.