Interactive Control of Mesh Topology in Quadrilateral Mesh Generation Based on 2D Tensor Fields Chongke Bi1 , Daisuke Sakurai2 , Shigeo Takahashi2 , and Kenji Ono1 1
2
RIKEN Advanced Institute for Computational Science, Japan Graduate School of Frontier Sciences, The University of Tokyo, Japan
Abstract. Generating quadrilateral meshes is very important in many industrial applications such as finite element analysis and B-spline surface fitting. However, it is still a challenging task to design appropriate vertex connectivity in the quadrilateral meshes by respecting the shapes of the target object and its boundary. This paper presents an approach for interactively editing such mesh topology in quadrilateral meshes by introducing a 2D diffusion tensor field to the interior of the target object. The primary idea is to track the two principal directions of the tensor field first and then construct the dual graph of the quadrilateral mesh, so that we can control the mesh topology through the design of the underlying 2D diffusion tensor field. Our method provides interactive control of such mesh topology through editing the orientations of the tensor samples on the boundary of the target object. Furthermore, it also allows us to intentionally embed degeneracy inside the object to introduce extraordinary (i.e., non-degree-four) vertices according to user requirements.
1 Introduction In industrial applications, such as finite element analysis (FEA), quadrilateral meshes have become more preferable to triangular meshes since they give better and more precise simulation results. However, existing methods do not provide an effective means of controlling the mesh topology that fully satisfy the requirements of industrial applications, in that they are more likely to produce unnecessary extraordinary vertices inside the target objects. Such extraordinary vertices tend to distort the shape of quadrilaterals contained in the mesh. On the other hand, several methods tried to generate quadrilaterals from the object boundary, while this inevitably incurs non-quadrilaterals such as triangles and pentagons around the center of the object. In order to appropriately control the mesh topology in quadrilateral meshes, we have to retain the following two conditions: (1) The shape of the target object and its boundary should be taken into account when generating quadrilateral meshes. (2) The extraordinary vertices should be introduced only when non-quadrilaterals were generated. The first condition suggests that the generated quadrilateral mesh elements should be properly aligned with the boundary of the target object. The second condition requires us to minimize the number of extraordinary vertices generated in the quadrilateral mesh. However, existing methods can achieve either of them at most. In this paper, we present an approach for interactively controlling such mesh topology of quadrilateral meshes in order to fulfill the requirements in industrial applications
(a)
(b)
(c)
(d)
Fig. 1. Generating a quadrilateral mesh in the interior of a fan-shaped object. (a) Input fan-shaped object. (b) The generated 2D diffusion tensor field by referring to the shape of the object and its boundary, where each tensor sample is represented as an ellipse. (c) The streamlines along the two principal directions of the diffusion tensor field. (d) The quadrilateral mesh generated from its dual graph represented by the streamlines.
described above. This is accomplished by introducing a 2D diffusion tensor field in the target object, which is inspired by the dual relationship between a quadrilateral mesh and a 2D diffusion tensor field. Firstly, a 2D diffusion tensor field is generated in the interior of the target object by employing the Poisson equation. This way of introducing diffusion tensor field can fully respect the shape of the entire target object together with its boundary. We then transform the configuration of the diffusion tensor field to the mesh topology of the quadrilateral meshes. This is accomplished by tracking the streamlines along the two principal directions of the 2D diffusion tensor field to construct the dual graph of the quadrilateral meshes. Furthermore, our method also provides interactive control of the mesh topology through editing the orientations of the tensor samples on its boundary. We also equip our system with an interface for intentionally embedding degenerate tensor samples to control the positions of extraordinary vertices according to user requirements. Figure 1 shows an example where a quadrilateral mesh of a fan-like object is generated using our approach. A 2D diffusion tensor field has been introduced by referring to the shape of the fan (Figure 1(b)). This is followed by tracking the streamlines along the two principal directions of the tensor field (Figure 1(c)). The final quadrilateral mesh is obtained by transforming the configuration of the streamlines to its dual, and thus maximally respects the shape of the fan and its boundary (Figure 1(d)). The remainder of this paper is organized as follows: Section 2 surveys previous work related to ours. Section 3 explains the dual relationship between a 2D diffusion tensor field and a quadrilateral mesh. Section 4 describes how we introduced a 2D diffusion tensor field into the interior of the target object, which is followed by a scheme for constructing the dual graph of quadrilateral meshes through tracking the streamlines of the 2D diffusion tensor field in Section 5. Section 6 presents several experimental results to demonstrate the effectiveness of the proposed scheme. Section 7 concludes this paper and refers to possible future extensions.
2 Related Work Existing schemes for quadrilateral mesh generation can be roughly classified into indirect and direct methods. Indirect methods generate triangular meshes in the target object first and then decompose each triangle into three quadrilaterals. On the other hand, direct methods try to embed quadrilaterals into the target object directly. Indirect methods were widely used in the early stages. Lo [1] proposed such an indirect method to generating quadrilateral meshes, which has been improved by Lau et al. in [2]. However, the generated quadrilateral meshes cannot satisfy the requirements of industrial applications, in the sense that the triangles contained in the mesh degrade the quality of the simulation of FEA. Several schemes were proposed to alleviate this problem through merging two neighboring triangles to generate quadrilateral meshes. Owen et al. [3] have tried to minimize the number of triangles contained in the generated quad-dominant mesh. Repulsive forces were introduced to uniformly distribute the vertices of the triangular meshes over the target domains before merging pairs of neighboring triangles, including bubble packing methods [4] and square cells packing methods [5]. Nonetheless, all these schemes are still more or less likely to suffer from the same problem. Recently, more attention has been paid to direct methods. The simplest one is the grid-based method [6], where the interior of the target object is filled with regular grids first and then the boundary region is partitioned into small quadrilaterals by using 2D operations. This method incurs the problems that the quadrilateral elements around the object boundary are distorted in shape when the boundary is not aligned with the grid horizontally or vertically. To alleviate this problem, Robert [7] employed an octree shape representation to improve the quality of the quadrilateral meshes. However, the grid-based methods cannot fully incorporate the shape of the object boundary into the generated mesh topology. In order to respect the boundary shape, several paving methods are proposed. Blacker et al. [8] developed a plastering method to extend quadrilateral mesh decomposition from the boundary to the center of the target object. However, it is unavoidable that irregular shapes are generated around the center in the last stage of the mesh generation. Transforming these irregular shapes to quadrilateral mesh elements requires us to change the entire mesh topology of the target object. In all of the aforementioned approaches, no one focuses on the appropriate locations of extraordinary vertices for improving the quality of the overall mesh topology. Our approach employs a 2D diffusion tensor field, as an underlying configuration of the quadrilateral mesh, in order to conform the entire mesh topology to the shapes of the target object and its boundary. The details will be introduced in the next three sections.
3 Dual Relationship Our proposed approach allows us to control the mesh topology of quadrilateral meshes consistently through editing the generated diffusion tensor fields in the target object. This approach is indeed supported by the dual relationship between 2D diffusion tensor fields and quadrilateral meshes, which will be described in this section. The streamlines of diffusion tensor fields can be used to construct the dual graph of the quadrilateral meshes. Figure 2 shows such an example, where the streamlines in
(a)
(b)
(c)
(d)
Fig. 2. Dual relationship between diffusion tensor fields and quadrilateral meshes. (a) The streamlines in a 2D diffusion tensor field. (b) A quadrilateral mesh is generated from the dual graph consisting of the streamlines in diffusion tensor fields. (c) and (d) show the zoom-up views of the regions in the orange and blue circles of (b), respectively.
Figure 2(a) guide the dual graph of the quadrilateral mesh in Figure 2(b). As shown in Figure 2, an intersection between two streamlines corresponds to a quadrilateral face of the resulting mesh, since the four lines emanating from the intersection point correspond to the four side edges of the quadrilateral face. Note that ordinary vertices in quadrilateral meshes are matched with non-degenerate regions in the diffusion tensor fields. Figure 2(c) shows an ordinary vertex (in orange), whose degree is four. On the other hand, extraordinary vertices are generated in degenerate regions in the diffusion tensor fields. As shown in Figure 2(d), the degree of an extraordinary vertex (in blue) is not four. A degenerate point exists around the blue point marked in Figure 2(a).
4 Generating 2D Diffusion Tensor Fields This section describes how we introduce a 2D diffusion tensor field into the interior of the target object. The diffusion tensor field can be used to respect the shape of the target object and its boundary, and to automatically locate degenerate points for generating extraordinary vertices in quadrilateral meshes. 4.1
Generating a Tensor Field Along the Boundary
We begin with the generation of tensor samples on the boundary of the target object. For obtaining newly introduced tensor samples between the two endpoints of each boundary edge, we interpolate between the two tensor samples at the two endpoints along each boundary edge. The tensor samples at the corners of the object boundary are given as input, where the directions of the primary eigenvectors of the tensor samples are designed by referring to the boundary shape of the target object. The interpolated tensor samples along the boundary should be consistent with the boundary edge direction of the input target object. For this purpose, we employ an eigenstructure-based interpolation method for diffusion tensor fields, because we can fully preserve the shape of the boundary by interpolating the eigenvectors and eigenvalues individually. Suppose that we calculate the interpolated tensor DM at the ratio of t : (1 − t) in the range [0,1] between DS (t = 0) and DT (t = 1). The eigenvalues
(a)
(b)
(c)
(d)
Fig. 3. Generating a 2D diffusion tensor field in a target object. (a) A target object. (b) The tensor samples on the vertices have been set as input. (c) The tensor samples along the boundary are interpolated. (d) The tensor samples in the interior of the target object are interpolated, where the blue point is a degenerate point.
M can λiM (i = 1, 2) and their corresponding normalized eigenvectors eM i (i = 1, 2) of D be obtained as follows:
λiM = t λiS + (1 − t)λiT , M t S S (eM 1 , e2 ) = R (e1 , e2 ), where R = (eT1 , eT2 )(eS1 , eS2 )−1 .
(1) (2)
Note that R is a 2 × 2 rotation matrix that transforms between the tensor samples DS and DT . Figure 3(c) shows the interpolated diffusion tensor field along the boundary by using this method. The interpolated tensor field retains the boundary shape since our first priority here is to reflect the boundary shape into the mesh topology to be generated inside the object, as already described in Section 1. 4.2
Generating Tensor Fields Inside the Objects
The diffusion tensor field in the interior of the target object should be interpolated for respecting the shape of the target object, as well as its boundary shape. For this purpose, we employ the Poisson equation to generate the 2D diffusion tensor field. This is because the Poisson equation can continuously propagate the properties of the tensor field along the boundary into the interior. For applying the Poisson equation to such 2D diffusion tensor fields, it is preferable to represent the two eigenvectors of the diffusion tensor field as scalar values. In our approach, we use the polar angle of the tensor sample θ , where −π < θ < π . Now we can employ the Poisson equation to generate diffusion tensor field in the interior of the target object by using the polar angles. Suppose that we denote by θi,n j , the polar angle at a tensor sample Di, j in the n-th iteration for solving the Poisson equation. We can compute θi,n+1 j as follows: n θi,n+1 j − θi, j
∆t
=
dx n ((θ n − θi,n j ) − (θi,n j − θi−1, j )) ∆ x2 i+1, j dy + 2 ((θi,n j+1 − θi,n j ) − (θi,n j − θi,n j−1 )), ∆y
(3)
(a)
(b)
(c)
Fig. 4. Interactively controlling the mesh topology through editing the streamlines. (a) The streamline has been tracked in the diffusion tensor field. (b) User changed the direction of the primary eigenvector of the tensor samples (circled in yellow) by drawing a straight segment (in black). (c) The streamlines have been tracked in the diffusion tensor fields together with a degenerate point, which was inserted by the user through clicking the position.
where Eq. (4) must hold for convergence. dx
∆t ∆t 1 + dy 2 ≤ . ∆ x2 ∆y 2
(4)
Here, in our approach we use ∆ t = 1/4. Figure 3(d) shows the interpolated tensor field using the Poisson equation. The properties of the tensor samples along the boundary are successfully propagated into interpolated tensor samples inside the target object. 4.3
Locating Tensor Degeneracy
When aligning quadrilateral elements along the boundary of the target object, we may have to inevitably introduce non-quadrilateral elements such as triangles and pentagons in the interior of the target object. For generating a fully quadrilateral mesh over the object, our approach allows us to insert non-degree-four vertices to rearrange mesh connectivity. However, the number of such extraordinary vertices should be as small as possible while appropriately controlling their positions. In our approach, the extraordinary vertices can be fully controlled through editing the degenerate points in the generated diffusion tensor fields, as described in Section 3. We locate the degenerate points in the diffusion tensor fields by employing a minimum spanning tree-based algorithm proposed in [9]. In Figure 3(d), a degenerate point represented by the blue point was introduced for generating an extraordinary vertex. How to introduce extraordinary vertices will be detailed in Section 5.
5 Generating a Quadrilateral Mesh Through Constructing Its Dual Graph In this section, we will explain how to transform the set of streamlines to its dual graph for constructing the quadrilateral mesh. An interface for interactively controlling the mesh topology through editing diffusion tensor fields will also be introduced.
(a)
(b)
(c)
(d)
Fig. 5. Generating a quadrilateral mesh. Constructing the dual graph (b) of the quadrilateral mesh (c) from the streamlines (a). (d) Rearranging the geometry of the generated quadrilateral mesh.
5.1
Tracking Streamlines for Constructing the Dual Graph
In our approach, we track the primary and secondary eigenvectors over the generated 2D diffusion tensor fields by employing the algorithm proposed by Basser et al. [10]. In their method, a seedpoint is selected first to start the tracking process. The streamlines are then pursued forward and backward from the selected seedpoint with a small step size, where the forward and backward directions can be calculated by interpolating the eigenvectors of the generated diffusion tensor field. The above subprocess will be continued until we reach the boundary of the target object. In the above subprocess, it is very important to select appropriate seedpoints for obtaining an evenly-spaced streamlines from the diffusion tensor fields. For achieving this task, we employ the seedpoints selection method proposed by Jobard et al. [11]. Their method was designed for creating evenly-spaced streamlines by setting a threshold to spare enough space between a new seedpoint and the existing streamlines. Figure 5(a) shows the streamlines tracked by using the aforementioned two methods. The figure clarifies that the tracked streamlines can fully respected by the shape of the target object and its boundary. Figure 5(b) is the dual graph of quadrilateral mesh in Figure 5(c). Finally, in order to improve the geometric quality of the generated quadrilateral mesh, we employ the Laplacian smoothing method to rearrange the positions of the vertices in the quadrilateral mesh. Figure 5(d) shows the result after the geometric smoothing has been carried out. The geometry of the quadrilateral mesh has been well rearranged in the sense that the vertices are more uniformly distributed. 5.2
Interactive Control of the Mesh Topology
Our approach also provides an interactive control of the mesh topology through editing the tensor samples. Figure 4 shows such an example where the initial streamlines are extracted from the interpolated 2D diffusion tensor field. The configuration of streamlines can be further modified by users according to their requirements. This is accomplished by editing the primary directions of the diffusion tensor samples. In Figure 4(b), the tensor sample in the yellow circle has been rotated by drawing a straight segment (in black), which is used as the primary direction of the tensor sample. Furthermore, our approach also allows users to intentionally embed degeneracy into the interior of the object, so as to introduce extraordinary vertices specifically on de-
mand. This is useful in many applications for avoiding non-quadrilateral mesh elements to be generated. We perform this by changing the directions of the four tensor samples around the user-specified region. Figure 4(c) shows an example where we generate a degenerate point in a specific position indicated by the blue point. Here, the directions of the four tensor samples around the blue point are changed.
6 Results and Discussion This section presents several experimental results to demonstrate the effectiveness of the proposed approach, followed by a discussion on our approach. 6.1
Results
Figure 6 shows two examples where we generated the quadrilateral meshes in the interior of the target objects of a bunny and a complex shape with a hole in Figure 6(a). Figures 6(b) and (c) are the generated tensor fields along the boundaries and in the interior of the target objects, where the boundaries of the target objects are well respected in the diffusion tensor field. Note that a degenerate point is introduced between the two ears of the bunny in our approach automatically from the input tensor samples on the boundary. This degenerate point is used to generate an extraordinary vertex in the quadrilateral mesh for avoiding non-quadrilateral mesh elements to be introduced. The streamlines of such diffusion tensor fields have been tracked in Figure 6(d), which have been used to construct the dual graph of quadrilateral mesh, as shown in Figure 6(e). Finally, a quadrilateral mesh is generated as shown in Figure 6(f). The mesh topology of the generated quadrilateral mesh is well designed since the streamlines of the diffusion tensor can fully outline the shape of the target object. 6.2
Discussion
Our approach allows users to interactively control the mesh topology of the generated quadrilateral meshes. However, the local configuration of mesh topology can be degraded if users drastically change the directions of primary eigenvectors at original boundary samples or introduce many degenerate points. Basically, our approach automatically generate an initial 2D tensor field by referring to the shape of the target object and its boundary, thus the users can naturally generate a consistent mesh topology in the target object if they start their mesh design with the initially generated tensor field over the object. Nonetheless, providing a more effective means of systematically alter the mesh topology while respecting the shapes of the target object and its boundary is left as future work.
7 Conclusion This paper has presented an approach to interactively controlling the mesh topology of quadrilateral meshes by introducing a 2D diffusion tensor field into the interior of the
target object. Our idea is inspired by the fact that the streamlines of the 2D diffusion tensor field constitute the dual of the quadrilateral mesh in general. Our approach can fully respect the shape of the target object and its boundary through interactively controlling the mesh topology in quadrilateral meshes through editing the streamlines of the diffusion tensor field. Furthermore, our method also allows us to introduce extraordinary vertices while consistently rearranging the mesh topology by embedding tensor degeneracy into the underlying diffusion tensor field. Several results are presented to demonstrate the effectiveness of the proposed approach. Our future extension includes the challenge to extend our framework to 3D cases, i.e., all-hexahedral mesh generation by introducing 3D diffusion tensor fields in the target volume, which will significantly improve the simulation quality of FEA. Acknowledgements. This work has been partially supported by JSPS under Grants-inAid for Scientific Research (B) No. 22300037, and challenging Exploratory Research No. 23650042 and No. 23650052.
References 1. Lo, S.H.: Generating quadrilateral elements on plane and over curved surfaces. Computers and Structures 31 (1989) 421–426 2. Lau, T.S., Lo, S.H., Lee, C.K.: Generation of quadrilateral mesh over analytical curved surfaces. Finite Elements in Analysis and Design 27 (1997) 251–272 3. Owen, S.J., Staten, M.L., Canann, S.A., Saigal, S.: Q-Morph: an indirect approach to advancing front quad meshing. International Journal for Numerical Methods in Engineering 44 (1999) 1317–1340 4. Shimada, K., Gossard, D.C.: Bubble mesh: Automated triangular meshing of non-manifold geometry by sphere packing. In: Proceedings of ACM Symposium on Solid Modeling and Applications. (1995) 409–419 5. Shimada, K., Liao, J., Itoh, T.: Quadrilateral meshing with directionality control through the packing of square cells. In: Proceedings of the 7th International Meshing Roundtable. (1998) 61–75 6. Ho-Le, K.: Finite element mesh generation methods: A review and classification. Computer Aided Design 20 (1988) 27–38 7. Schneiders, R.: A grid-based algorithm for the generation of hexahedral element meshes. Engineering with Computers 12 (1996) 168–177 8. Blacker, T.D., Stephenson, M.B.: Paving: A new approach to automated quadrilateral mesh generation. International Journal for Numerical Methods in Engineering 32 (1991) 811–84 9. Bi, C., Takahashi, S., Fujishiro, I.: Interpolating 3D diffusion tensors in 2D planar domain by locating degenerate lines. In: Proceedings of the 6th International Conference on Advances in Visual Computing. Volume 6453 of Springer Lecture Notes in Computer Science. (2010) 328–337 10. Basser, P.J., Pajevic, S., Pierpaoli, C., Duda, J., Aldroubi, A.: In vivo fiber tractography using DT-MRI data. Magnetic Resonance in Medicine 44 (2000) 625–632 11. Jobard, B., Lefer, W.: Creating evenly-spaced streamlines of arbitrary density. In: Visualization in Scientific Computing. (1997) 43–56
(a)
(b)
(c)
(d)
(e)
(f)
Fig. 6. Generating a quadrilateral mesh in the interior of the target objects. (a) Boundary shape of target objects. (b) The diffusion tensor field along the boundary of the target objects. (c) The generated diffusion tensor field in the interior of the target objects. (d) The streamlines along the two principal directions of the diffusion tensor fields. (e) The dual graphs of the quadrilateral meshes obtained from the streamlines in (d). (f) The quadrilateral meshes obtained from their dual graphs in (e).