4
USE OF HIERARCHICAL SURFACE PARAMETERIZATION FOR MODEL CONSTRUCTION IN POLY3D AND DYNEL Syed Irfan Raza Zaidi, Department of Electrical Engineering, Stanford University, Stanford, CA 94305 e-mail: [email protected] Abstract We summarize the development of an algorithm to parameterize surfaces to allow for fast remeshing of surface, to facilitate surface intersection (Boolean operation), and to optimize contact object interaction. This new tool is developed for the creation of Poly3D and Dynel models. Introduction Remeshing of surfaces and Boolean operations (intersections) play an important role for modeling with Poly3D. For instance, fault/fracture surfaces (i.e. discontinuities) must be subdivided into a continuous array of triangular elements with approximately the same surface area and shape. This geometric constraint is essential to avoid undesirable effects of larger or oddly shaped elements on the numerical analysis. Contact interaction between two objects (most of the time between 2 surfaces) also has an important role in the Dynel numerical code. Using simplified parameterization of surfaces can decrease considerably the time to detect these contacts. In general when using geomechanical codes, there is a compromise between computation time and computation precision. This compromise is achieved by increasing or reducing the number of elements for a given model. In geomechanical analyses the geometry of objects (e.g. faults, fractures, fold) is an important parameter that has a first order influence on the computed deformations. Therefore, remeshing must honor both the original surface border and shape. For these reasons, we have developed a hierarchical surface parameterization algorithm, and the aim of this paper is to present the technique as well as the advantages over other methods (see for example Hoppe, 1996). It is important to note that the results presented here are not a remeshing of surfaces, but simply a mesh parameterization by decreasing the number of elements. This is the first stage of the algorithm development, and the next few months will be focused on the remeshing and the Boolean operations using this parameterization technique. Algorithm Overview We use hierarchical surface parameterization as suggested by Lee (Lee, 2000) and Lee et al (Lee, 1998) by first doing mesh simplification to get a base mesh from the original mesh. Then, using harmonic maps (Duchamp, 1997), we remap points which are removed during each coarsification step to maintain a correspondence between the original and simplified meshes. Input The input mesh can be any arbitrary triangulated 2-manifold mesh, so we can have triangulated meshes with holes as well as boundaries. It is required that the mesh be 2-manifold i.e. no more than two triangles should share an edge, so the mesh is topologically consistent. Definitions star(v) is 1-ring neighborhood of vertex v. link(v) is the outer boundary of the star(v). A set of vertices is said to be independent if no two vertices are neighbors i.e. connected by an edge. A set of vertices is said to be maximally independent if no larger independent set contains it. Mesh Simplification There are many methods proposed for mesh simplification. Hoppe (Hoppe, 1996) used progressive meshes, which use “edge collapse” and vertex split” operations to maintain the mapping from fine to coarse mesh. This method doesn’t work in our case as it changes the topology of the mesh for surfaces with holes. Garland et al. (Garland, 1997) used error quadrics simplification algorithm which computes for each vertex v sum Q of squared distances to the associated set of planes p H planes(v) and used this sum to get an error quadric v T Q v. Based on this error quadric it selects valid vertex pairs and finds pairs having minimal error. The error for each pair is computed by aggregating Q computed for each vertex. The new vertex obtained by “pair contraction” lies somewhere between the removed vertex pairs which give minimum Q for that position. In this method one vertex is removed and the other is shifted, so this strategy does not work well for our method, contrary to what Lee (Lee, 2000) proposed. Both of the above methods give us O (N) levels of hierarchical simplification where N is the number of vertices in the mesh. To get topologically consistent results we used a variation of Dobkin and Kirkpatrick (Dobkin, 1985) DK hierarchy as suggested by Lee et al. (Lee, 1998). Each DK atomic simplification step involves a Stanford Rock Fracture Project Vol. 13, 2002 P-G-1

USE OF HIERARCHICAL SURFACE PARAMETERIZATION FOR …qg248ky5378/RFP_2002_Zaidi.pdfSyed Irfan Raza Zaidi, Department of Electrical Engineering, Stanford University, Stanford, CA 94305

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: USE OF HIERARCHICAL SURFACE PARAMETERIZATION FOR …qg248ky5378/RFP_2002_Zaidi.pdfSyed Irfan Raza Zaidi, Department of Electrical Engineering, Stanford University, Stanford, CA 94305

USE OF HIERARCHICAL SURFACE PARAMETERIZATION FOR MODEL CONSTRUCTION IN POLY3D AND DYNEL

Syed Irfan Raza Zaidi, Department of Electrical Engineering, Stanford University, Stanford, CA 94305

e-mail: [email protected]

Abstract We summarize the development of an algorithm

to parameterize surfaces to allow for fast remeshing of surface, to facilitate surface intersection (Boolean operation), and to optimize contact object interaction. This new tool is developed for the creation of Poly3D and Dynel models. Introduction

Remeshing of surfaces and Boolean operations (intersections) play an important role for modeling with Poly3D. For instance, fault/fracture surfaces (i.e. discontinuities) must be subdivided into a continuous array of triangular elements with approximately the same surface area and shape. This geometric constraint is essential to avoid undesirable effects of larger or oddly shaped elements on the numerical analysis.

Contact interaction between two objects (most of the time between 2 surfaces) also has an important role in the Dynel numerical code. Using simplified parameterization of surfaces can decrease considerably the time to detect these contacts.

In general when using geomechanical codes, there is a compromise between computation time and computation precision. This compromise is achieved by increasing or reducing the number of elements for a given model. In geomechanical analyses the geometry of objects (e.g. faults, fractures, fold) is an important parameter that has a first order influence on the computed deformations. Therefore, remeshing must honor both the original surface border and shape.

For these reasons, we have developed a hierarchical surface parameterization algorithm, and the aim of this paper is to present the technique as well as the advantages over other methods (see for example Hoppe, 1996). It is important to note that the results presented here are not a remeshing of surfaces, but simply a mesh parameterization by decreasing the number of elements. This is the first stage of the algorithm development, and the next few months will be focused on the remeshing and the Boolean operations using this parameterization technique. Algorithm Overview

We use hierarchical surface parameterization as suggested by Lee (Lee, 2000) and Lee et al (Lee, 1998) by first doing mesh simplification to get a base

mesh from the original mesh. Then, using harmonic maps (Duchamp, 1997), we remap points which are removed during each coarsification step to maintain a correspondence between the original and simplified meshes.

Input

The input mesh can be any arbitrary triangulated 2-manifold mesh, so we can have triangulated meshes with holes as well as boundaries. It is required that the mesh be 2-manifold i.e. no more than two triangles should share an edge, so the mesh is topologically consistent. Definitions

star(v) is 1-ring neighborhood of vertex v. link(v) is the outer boundary of the star(v). A set of vertices is said to be independent if no two vertices are neighbors i.e. connected by an edge. A set of vertices is said to be maximally independent if no larger independent set contains it.

Mesh Simplification

There are many methods proposed for mesh simplification. Hoppe (Hoppe, 1996) used progressive meshes, which use “edge collapse” and “vertex split” operations to maintain the mapping from fine to coarse mesh. This method doesn’t work in our case as it changes the topology of the mesh for surfaces with holes. Garland et al. (Garland, 1997) used error quadrics simplification algorithm which computes for each vertex v sum Q of squared distances to the associated set of planes p H planes(v) and used this sum to get an error quadric vTQ v. Based on this error quadric it selects valid vertex pairs and finds pairs having minimal error. The error for each pair is computed by aggregating Q computed for each vertex. The new vertex obtained by “pair contraction” lies somewhere between the removed vertex pairs which give minimum Q for that position. In this method one vertex is removed and the other is shifted, so this strategy does not work well for our method, contrary to what Lee (Lee, 2000) proposed. Both of the above methods give us O (N) levels of hierarchical simplification where N is the number of vertices in the mesh.

To get topologically consistent results we used a variation of Dobkin and Kirkpatrick (Dobkin, 1985) DK hierarchy as suggested by Lee et al. (Lee, 1998). Each DK atomic simplification step involves a

Stanford Rock Fracture Project Vol. 13, 2002 P-G-1

Page 2: USE OF HIERARCHICAL SURFACE PARAMETERIZATION FOR …qg248ky5378/RFP_2002_Zaidi.pdfSyed Irfan Raza Zaidi, Department of Electrical Engineering, Stanford University, Stanford, CA 94305

“vertex remove” operation followed by retriangulation of the hole. This simplification guarantees O (log N) hierarchical levels. Each DK simplification level consists of removing the maximally independent set of vertices with low outdegree (number of vertex neighbors). First it marks all vertices as non-marked. So at the start of each level the algorithm randomly selects a non-marked vertex, marks its neighbors as unremoveable, removes it and retriangulates its star. This procedure continues till there are no more vertices left to be removed. In practice it turns out that we remove 25% of the vertices as the graph is four–colorable.

Priority Computation for Vertex Removal Lee et al. (Lee, 1998) used a similar DK

framework strategy but instead of randomly selecting a non marked vertex they select the vertices based on its topological and geometrical information. Let’s represent the current mesh level by P. Each vertex v is assigned a weight w i.e. a convex combination of its area a(v) and curvature ț(v). Priority is assigned as inversely proportional to w. Area and curvature estimates are normalized with the corresponding maximum values at that mesh level to have equal importance for relative area and relative curvature.

)(max

)(

)(max

)()(

vv

vavavw

PvPv NN

��

Curvature Calculation ț(v) is computed by first computing the principal

curvatures ț1 and ț2. We use the method given by Taubin (Taubin, 1995) to estimate the principal curvatures at vertex v. Once we have ț1 and ț2 we

compute ț(v) as 21)( NNN � v

Priority Queue for Vertex Removal

We add the vertices to a priority queue so that vertices having lesser weight get higher priority. In other words we want to remove vertices that have a relatively flat and small neighborhood. For each level we remove the vertices from the front of the queue and discard vertices for removal having outdegree greater than 12 or vertices that are marked as unremoveable.

Harmonic Map

If a vertex is not removed we remove its star(v) or 1-ring neighborhood and flatten it in 2-D using a harmonic map. A harmonic map is used for flattening, otherwise it is expensive to find a plane on which we can project the star(v) without overlapping triangles and it may not even exist (Cihen, 1997).

The harmonic map has a property that it minimizes metric distortion to map the neighborhood of the removed vertex into a plane. It is easy to compute and it always exists.

We can compute the harmonic map by first computing the sum of all angles found by circulating around v in a counter clockwise manner. We compute a term

iTSD

¦

2 If v is not a boundary vertex

iTSD¦

Otherwise

Where și is the angle formed by two consecutive neighbor edges connecting v to its neighbors moving in a ccw direction. We scale each angle și by Į so we get Įși and exponentiate each length ||v–vi|| by Į to get ||v–vi||

Į. We map each boundary vertex to a half disk and each non-boundary vertex to a full circular disk.

Retriangulation We remove the center vertex from the harmonic

map. The hole created due to vertex removal is retriangulated using Constrained Delaunay Triangulation (CDT) by constraining the link(v) or the outer boundary edges of the harmonic map. CDT gives a convex triangulation but we may have a non-convex boundary. In order to map this 2-D CDT information to the 3-D star(v) we erase the center vertex from the 3-D star(v) which will create a hole. Now we join appropriate vertices in this holed star(v) by connecting edges between vertices which are connected in its respective 2-D CDT. To avoid connecting the vertices that are connected outside the harmonic map boundary we calculate the midpoint of each connected edge in 2-D CDT and perform a “Point in Non Convex Polygon” test. Only the edges passing these test are connected in 3-D star(v).

Parameterization of Removed Vertices

For parameterization onto the coarser mesh we carryout the following two steps (Lee, 2000).

Removal of Central Vertex If the vertex to be mapped to next coarser level

is the vertex that is removed in the current level i.e. it’s the central vertex v when we retriangulate the hole using CDT we locate the new face in which v lies. For that face we calculate the barycentric coordinates of v in that face. Then we associate v along with its barycentric coordinates to the new face.

Stanford Rock Fracture Project Vol. 13, 2002 P-G-2

Page 3: USE OF HIERARCHICAL SURFACE PARAMETERIZATION FOR …qg248ky5378/RFP_2002_Zaidi.pdfSyed Irfan Raza Zaidi, Department of Electrical Engineering, Stanford University, Stanford, CA 94305

Mapping of already removed Vertices For each old face that is destroyed due to

removal of its central vertex v, if there are previously removed vertices associated with this face, we first compute the new location of these vertices by using their barycentric coordinates and old face vertices and then locate the new face in which these vertices lie. For that new face we calculate the barycentric coordinates for this vertex and then associate that vertex with it. Results

We implemented this algorithm using CGAL (CGAL, Computational Geometry Algorithms

Library) and tested different data sets. We show the application of algorithm on a human face mesh due to our innate ability to discern human faces (Fig 1).

This human face contained 12,636 faces and 6,346 vertices. These were reduced by hierarchical simplification to 272 faces and 140 vertices over 9 levels that show an average removal of 35% of the faces on a given level.

Another result is given for the sheet of paper used in G in this volume. The hierarchical simplification reduced the number of elements by 79% (Fig 2).

(a) (b) (c) (d) Figure 1: Results of algorithm applied on a human face. a) Original Mesh with 6346 vertices 12636

faces. b) Level 6 Mesh with 1048 vertices and 2077 faces. c) Level 9 Mesh with 140 vertices and 272 faces. d) Mapping of removed vertices shown on the faces of Level 9 Mesh. Note that these representations are a parameterization of the mesh and not a remeshing resulting from the parameterization.

Stanford Rock Fracture Project Vol. 13, 2002 P-G-3

Page 4: USE OF HIERARCHICAL SURFACE PARAMETERIZATION FOR …qg248ky5378/RFP_2002_Zaidi.pdfSyed Irfan Raza Zaidi, Department of Electrical Engineering, Stanford University, Stanford, CA 94305

(a) (b)

Figure 2: Mesh Simplification Procedure. (a) 2540 vertices 4877 faces Level 0. (b) 528 vertices 1027 faces Level 5.

Future Work

The next steps are: - Use the parameterization for fast surface

remeshing. - Use the parameterization for fast Boolean

operation. - Use the parameterization for fast detection of

contacts between objects. Acknowledgements

Discussions with Frantz Maerten and Laurent Maerten were very helpful. Frantz Maerten also provided the mesh data and his review contributed to significant improvements to this paper. Special thanks to David Pollard for reviewing the manuscript. References and links: Cohen J., Manocha D., Olano M, Simplifying Polygonal

Models Using Successive Mappings. In Proceedings IEEE Visualization 97, 395-402 October 1997

Computational Geometry Algorithms Library CGAL. http://www.cgal.org v2.4

Dobkin D. P. and Kirkpatrick D. G. A Linear Algorithm For Determining The Separation Of Convex Polyhedra. J. Algorithms, 6:381-392, 1985.

Duchamp,T.,Certain,A.,Derose,T.,and Stuetzle, W. Hierarchical Computation of PL harmonic Embeddings. Tech. rep., University of Washington, July 1997

Garland, M. and Heckbert P. Surface simplification using quadric error metrics. Computer Graphics (SIGGRAPH '97 Proceedings) (1997).

Hoppe, H. Progressive meshes. In Computer Graphics Proceedings, Annual Conference Series, 1996 (ACM SIGGRAPH '96 Proceedings) , pages 99--108, 1996

Lee, A., Sweldens W., Schroder P., Cowsar L., Donkin D. MAPS: Multiresolution Adaptive Parameterization of Surfaces. In Proceedings Of Siggraph 98.

Lee, A. Building Your Own Subdivision Surfaces. Gamasutra.com Sept 00

Taubin, G. Estimating the tensor of curvature of a surface from a polyhedral approximation. Proceedings of the Fifth International Conference on Computer Vision (ICCV’95), 1995

Stanford Rock Fracture Project Vol. 13, 2002 P-G-4