metho dology - pdfs.semanticscholar.org

14

Upload: others

Post on 08-Jun-2022

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Metho dology - pdfs.semanticscholar.org

A Methodology for Piecewise Linear Approximation of Surfaces�Luiz Velhoy, Luiz Henrique de Figueiredoz, and Jonas GomesyyIMPA { Instituto de Matem�atica Pura e AplicadaEstrada Dona Castorina 110, 22460-320 Rio de Janeiro, [email protected] [email protected] { Laborat�orio Nacional de Computa�c~ao Cient���caRua Lauro M�uller 455, 22290-160 Rio de Janeiro, RJ, [email protected] discuss the problem of adaptive polygonization ofregular surfaces of the euclidean 3D space, and presente�ective algorithms for computing optimal polygoniza-tions of surfaces described in parametric or implicitform.Keywords: Surface approximation, polygonization,parametric surfaces, implicit surfaces, geometric mod-eling.1 IntroductionThe polygonization of surfaces is a classical problemin computer graphics and geometric modeling that hasmany practical applications. The problem is comput-ing a piecewise linear approximation for a smooth sur-face described either in parametric or implicit form.In this paper, we present a conceptual frameworkfor the piecewise linear approximation of surfaces andalso a methodology for computing good polygonal ap-proximations while keeping the number of polygonslow. Based on the general principles in this methodol-ogy, we describe two speci�c new algorithms for theadaptive polygonization of parametric and implicitsurfaces.1.1 Importance of the ProblemA polygonal approximation is the simplest form of sur-face description and therefore is the representationof choice in the implementation of a large numberof algorithms. Moreover, existing graphics hardwareand libraries (e.g., OpenGL) have special support forpolygonal meshes, specially triangular meshes. Thus,�Research supported by grants from the Brazilian Councilfor Scienti�c and Technological Development (CNPq) and Riode Janeiro State Foundation for Research (FAPERJ).

despite the existence of more sophisticated standardforms for surface description (e.g., B�ezier, B-splines,NURBS, etc.), there is always a need to represent sur-faces in polygonal form.1.2 Parametric and Implicit SurfacesThe piecewise linear approximation of surfaces can beposed as the problem of obtaining a polygonal approx-imation for a smooth 2-dimensional manifold embed-ded in the 3-dimensional euclidean space R3. Thisgeometric object is usually called a regular surface [1].By conveniently subdividing a regular surface S,we can write S = Smi=1 Si, where each Si is a regularsurface (with boundary), de�ned either parametricallyor implicitly. In other words, for each i there exists aregular parameterized patch fi:Ui � R2 ! Si � R3,f(Ui) = Si, or an \implicit patch" gi:R3 � Vi � Si !R, such that g�1(0) = Si.Therefore, in this context, the problem of approx-imating a regular surface reduces to the problem ofobtaining a polygonal approximation for an implicitor a parametric surface patch.1.3 Motivation and GoalsPolygonization methods for parametric and implicitsurfaces have been studied exhaustively in the litera-ture, but no conceptual survey exists. Since conver-sion between parametric and implicit representationsis di�cult [2], or even impossible, it is important todevise good polygonization methods for both class ofsurfaces.The polygonization problem is well understood, andthe existence of many published methods show thatthe area is mature. Therefore, there is a need for areview of the state of the art, containing a theoretical1

Page 2: Metho dology - pdfs.semanticscholar.org

discussion and an analysis of the basic mechanisms be-hind existing solutions. The goal in any review of thiskind should be to look for a deeper understanding ofthe problem, one that helps to reveal new solutions.This paper contains both a conceptual review of thestate of the art and new solutions for the polygoniza-tion problem.1.4 Structure of the PaperIn Section 2, we discuss the polygonization problemas a mathematical problem that needs computationalsolutions. In Section 3, we extend this theoretical dis-cussion to adaptive methods. In Section 4, we dis-cuss previous methods in the light of this theoreti-cal framework. Section 5 describes a new polygoniza-tion method for parametric surfaces, and Section 6 de-scribes a new polygonization method for implicit sur-faces. Finally, Section 7 contains a discussion of thesetwo solutions.2 Piecewise Linear ApproximationsIn this section, we formally de�ne the polygonizationproblem and discuss some issues faced by computa-tional solutions for this problem.Algorithms for computing a polygonal approxima-tion to a surface are known under the generic name ofpiecewise linear methods, or simply PL methods. Theresulting piecewise linear surface is called a polygoniza-tion of the regular surface.The polygonization problem can be compared tothe problem of carving a precious stone: we have tocarve planar faces with a minimum loss of material.Mathematically, this problem can be stated in the fol-lowing way:Polygonization Problem. Given a surface M , �nda polygonal surface fM , such that fM has the sametopology as M and fM approximates the geometry ofM , as close as desired.More precisely, we have:� fM is a piecewise linear manifold [3];� There exists a homeomorphism h:M ! fM (byde�nition, this guarantees that fM and M havethe same topology);� For every point p in M , we have d(p; h(p)) < ",where d is the ordinary euclidean distance in theambient space R3, and " > 0 is a pre-selectedtolerance (this guarantees that the geometry offM approximates the geometry of M within thetolerance ").

The error condition means that the polygonal sur-face is contained within a tubular neighborhood of ra-dius " of the regular surface, provided that " is su�-ciently small (see Figure 1).

Figure 1: Polygonization and tubular neighborhood.We say that a surface polygonization is optimal if ithas the smallest number of polygons among all poly-gonizations that satisfy the same approximation er-ror. Finding optimal polygonal approximation withthe exact minimum number of polygons required fora given accuracy is a very di�cult problem (probablyNP-hard), and we must rely on good heuristics.Trying to minimize the size of the approximation isimportant, but some applications have further require-ments on the geometry of each polygon. For instance,long, thin polygons should be avoided in �nite-elementmesh generation and terrain modeling.A related problem is decimation: reduce the num-ber of polygons in an existing polygonal approxima-tion while remaining within the chosen tolerance [4].Optimal decimation seems to be just as di�cult asoptimal approximation.2.1 Building a Polygonal ApproximationPolygonization methods incorporate two basic opera-tions: sampling and structuring.The sampling operation uses the surface geometryto generate a set of points on the surface. The struc-turing operation reconstructs a polygonal surface fromthe samples. This polygonal surface has the sametopology of the original surface and approximates itsgeometry, as described above.Sampling points on a parametric surface is a simplematter: just evaluate the parameterization function on2

Page 3: Metho dology - pdfs.semanticscholar.org

a sample of the domain. As explained in Section 2.2,this domain sampling usually provides a natural struc-ture for the samples on the surface.Sampling points on an implicit surface is not soeasy: conceptually, several non-linear equations inthree variables must be solved. However, as explainedin Section 2.2, this sampling can be done indirectly,by sampling the ambient space around the surface.2.2 Polygonization MethodsThe simplest strategy for polygonizing a parametricsurface f :U � R2 ! R3 uses an intrinsic approach:Subdivide the domain U and use the function f toconstruct the polygonal approximation for the surfacefrom the domain subdivision. The rationale behindthis method is that, for a su�ciently �ne triangulationof the domain, the surface f can be approximated byan a�ne surface ~f that coincides with f on the verticesof the triangulation. The most usual case occurs whenthe domain U is a rectangular region of the plane R2,subdivided into a regular triangular mesh (i.e., all ofthe triangles in the mesh are congruent, but possiblyin di�erent orientations). In this case, we say that thepolygonization is uniform. Figure 2 illustrates this fora parametric curve f :U � R! R2.

Figure 2: Uniform approximation of a parametriccurve.The simplest strategy for polygonizing an implicitsurface f :V � R3 ! R uses an extrinsic approach:Subdivide the ambient space V into simplicial sub-cellsV = [Vi, and compute a polygonal approximation tothe surface inside each sub-cell Vi. The rationale be-hind this method is that, for su�ciently small spatialsub-cells, the solution of the equation f = 0 is ap-proximated by the solution of the corresponding a�ne

equation ~f = 0, where ~f is an a�ne approximation tof inside the cell (there is a unique a�ne function ~fthat coincides with f on the vertices of the cell). Themost common case occurs when the domain V is a cu-bic region of the space R3, subdivided into a regularcubic mesh (i.e., all cubes in the mesh are congruent).These cubes are then subdivided into tetrahedra, toobtain a simplicial decomposition of V . In this case,we say that the polygonization is uniform. Figure 3illustrates this for an implicit curve f :V � R2 ! R.

Figure 3: Uniform approximation of an implicit curve.3 Adaptive PolygonizationUniform polygonization methods are simple to under-stand and easy to implement. The connectivity of theuniform mesh provides the structure for a polygonalmesh approximating the surface. There are, neverthe-less, some interesting optimizations to avoid comput-ing f more than once at each vertex of the mesh. Forexample, one can see a regular mesh as a completelybalanced quadtree, and then traverse it down to thelowest level, where the cells reside, while computing fexactly once at each vertex.Based on the rationale behind the two methodsdescribed above, it is apparent that if a surface hashigh frequency details (large variations), then we needmany small polygons to approximate it; on the otherhand, if the surface has only low frequency details(small variations), then we should be able to obtaingood approximations even with few, large polygons.In general, the frequency details in a surface varyacross the domain. Therefore, in uniform polygoniza-tions, we are forced to use a large number of polygonseverywhere in the mesh in order to obtain good ap-proximations in the high-frequency regions.3

Page 4: Metho dology - pdfs.semanticscholar.org

A better alternative to uniform decomposition isadaptive polygonization, in which the sampling rate(and consequently the polygon size) varies across thedomain according to the frequency variation of the sur-face.In this paper, we are concerned with adaptive poly-gonizations of parametric and implicit surfaces. Weshall use the curvature as a geometric measure of sur-face variation. Therefore, the adaptive polygonizationmethods we describe below sample the domain �nelyin regions where the curvature variation is high, andcoarsely in regions where the curvature has a low rateof variation.Adaptive methods try to produce an optimal poly-gonization, i.e., to obtain a good approximation of thesurface within a prescribed accuracy, using the min-imum number of polygons. Recall that �nding theexact minimum number of polygons is very hard, andthat we must rely on good heuristics. Thus, adaptivemethods de�ne practical criteria for optimization andheuristics for �nding optimal polygonizations accord-ing to these criteria.3.1 Adaptation MechanismsAdaptive polygonization algorithms are more complexthan uniform algorithms because they must solve twointerdependent problems:� perform optimal sampling;� ensure correct structuring.Optimal sampling guarantees a faithful geometricapproximation, and depends on the adaptation criteria(i.e., curvature). Correct structuring guarantees theglobal topological consistency of the polygonal meshand depends on the structuring mechanism.The main di�culty is that when changes are madelocally to the sampling rate, the mesh topology may bea�ected globally. Therefore, it is necessary to carefullysynchronize the solution of these two problems; oth-erwise, the polygonization may exhibit holes causedby wrong connectivity in the mesh (also called topo-logical inconsistency). For example, di�erent levels ofsubdivision in two adjacent cells can create a crackalong the boundary between them (Figure 4). In thiscase, cracks show up in the surface and the piece-wise approximation is not continuous. This problem iscaused by a topologically inconsistent decomposition(Figure 5).3.2 Classi�cation CriteriaAdaptive polygonization algorithms can be classi�edaccording to the way that they implement the basic

Figure 4: Surface cracks due to topological inconsis-tency in the quadtree decomposition shown in Fig-ure 5 [5].

Figure 5: Topologically inconsistent quadtree domaindecomposition.operations of sampling and structuring, while solvingthe approximation and consistency problems.There are two basic strategies to obtain a correctstructuring of the cells: perform sampling and struc-turing in a single step, or in separate steps. Whendone in a single step, there are two main methods:1. restricting a hierarchical subdivision; or2. exploiting cell coherence.The �rst approach uses a restricted spatial subdi-vision. The subdivision is maintained balanced withrepeated re�nement steps that modify a single cell ateach step. Whenever a cell is divided, its neighborsare constrained to be at levels immediately above orbelow [5].The second approach focuses on the commonboundary elements of the subdivision. In the case ofparametric surfaces, these elements are the edges ofa 2D hierarchical mesh (quadtree); in the case of the4

Page 5: Metho dology - pdfs.semanticscholar.org

implicit surface, these elements are the faces of a 3Dhierarchical mesh (octree). The cells are subdividedindependently, constraining the polygonization alongcommon boundary elements, according to the adapta-tion criteria. In that way, a consistent decision can bemade when splitting neighbor cells sharing the sameboundary element [6].When sampling and structuring are done in sepa-rate steps, the main issue is how to pass informationbetween the two stages of the algorithm in order toguarantee topological consistency.Another strategy is to use an algorithm that doesnot enforce correct structuring, but �xes the incon-sistencies in a post-processing step. Typically, suchpost-processing implies the construction of a topolog-ical data structure representing the polygonal approx-imation, so that inconsistencies in neighboring facescan be found [7].4 Previous WorkIn this section, we give an overview of existing poly-gonization methods and compare them with a newmethodology for adaptation based on the conceptualframework presented in Sections 2 and 3.4.1 Algorithms for Parametric SurfacesPrevious algorithms for adaptive polygonal approxi-mation of parametric surfaces subdivide patches recur-sively by splitting edges at their midpoints and creat-ing internal edges to connect these sample points, untilthe surface patches are at within a tolerance.Three approaches have been used to obtain cor-rect structuring, thus eliminating cracks: Clark inhis pioneering work [8] uses cell coherence; vonHerzenand Barr [5] use restricted quadtrees; Tamminen andJansen [7] perform post-processing.The main de�ciency of these algorithms is in thecontrol of the adaptation process. Recursive subdivi-sion is controlled by atness tests for surface patchesthat only exist for special classes of surfaces [9-16],with a single exception to the use of interval arith-metic [17].4.2 Algorithms for Implicit SurfacesPrevious adaptive polygonization algorithms for im-plicit surfaces employ a full 3D adaptive partitionof space, and perform sampling and structuring ina single step. They recursively subdivide a large 3-dimensional cell complex in which the implicit surfaceis embedded, until the adaptation criteria are met; atthat stage, polygons are generated for the cells inter-secting the surface.

Correct structuring is achieved either by using a re-stricted octree [18, 19] or by imposing coherence acrossthe faces of a tetrahedral subdivision [20].The main de�ciency of these algorithms is theirhigh complexity. Strictly speaking, the 3-dimensionalsearch is necessary for computing a correct solution inthe case of surfaces with arbitrary topology. Unfortu-nately, such a requirement places an enormous burdenin actual programs, both in terms of implementationand performance. This is mainly due to the 3D com-binatorics of the problem, as well as the need of spaceand time resources. Recently, however, range analysistechniques [21] have been used successfully to avoidfull enumeration of implicit surfaces in high-resolutionmeshes [22-25].Another problem that needs to be faced when com-puting polygonal approximations for implicit surfacesis the presence of singularities. Although this problemcould be present in parametric surfaces too, it is muchharder for implicit surfaces, especially in a design en-vironment [26]. As mentioned in the introduction, thediscussion in this paper is restriced to regular surfaces,which do not have singularities.4.3 A New Strategy for AdaptationWe propose a general methodology to solve the adap-tive polygonization problem. Using this methodol-ogy we are able to develop two new algorithms forthe approximation of parametric and implicit surfaces.These two polygonization methods will be describedrespectively in Sections 5 and 6. They share threemain principles:� start the adaptive decomposition from a coarseuniform decomposition of the domain;� decouple sampling from structuring;� exploit edge coherence to guarantee topologicalconsistency by construction.With this methodology, unlike in previous algo-rithms, the polygonization problem is solved in twoseparate steps that correspond to the operations ofsampling and structuring.The coupling of sampling and subdivision imposesrestrictions on the structure of the decomposition.This requires complex algorithms and often results insub-optimal polygonal meshes. By eliminating such arestriction we are able to develop simpler and moree�cient methods.Note that this strategy does not involve any post-processing. Instead, sampling and structuring arelinked through edge coherence ensuring in this waythe topological consistency of the mesh.5

Page 6: Metho dology - pdfs.semanticscholar.org

5 Polygonization of Parametric SurfacesWe now present an adaptive polygonization algorithmfor parametric surfaces that uses complete edge sam-pling to avoid cracks, and area scanning to guide thesubdivision [27]. This algorithm combines adaptivecurve sampling with simplicial subdivision. This strat-egy allows better adaptation, trivially ensures globalconsistency, and produces meshes with a small numberof polygons.The basic algorithm is as follows:1. [Initialization] Start with a coarse uniform sim-plicial decomposition of the parametric patch do-main. If the domain is rectangular, this can besimply the subdivision of the domain along its di-agonal into two triangular cells.2. [Curve generation] Sample the edges of all cells inthe initial decomposition adaptively to constructa polygonal approximation of the correspondingcurves on the surface.3. [Cell subdivision] Subdivide each cell by con-structing internal edges, based on the number ofpoints on the boundary edge curves. Repeat thesampling in step 2 for each new internal edge.4. [Test for atness] For each cell, test the corre-sponding surface patch for atness.5. [Recursion] Recursively subdivide cells whosepatches are not at. A at patch is one whoseedges are at, according to the sampling in step 2.Unlike previous methods for parametric surfaces,edge sampling is completely done at each subdivisionstep, while creating new edges in step 3. Further sub-divisions respect this sampling. This is the key factorfor optimal sampling and global consistency. Becauseedge curves are generated �rst, in a single operation,it is possible to �nd the minimum number of samplepoints that produces the desired approximation. Theapproximation criterion is given by the atness test.Moreover, global consistency is automatically guaran-teed, because edge curves are shared by adjacent cells.Sections 5.1 and 5.2 below contain details of steps 2and 3 of the algorithm.5.1 Curve GenerationThe edges in the domain decomposition are straightline segments, but the corresponding curves on thesurface are not. The goal of the sampling in step 2 isto build an adaptive polygonal approximation of thesecurves.

There are many methods for adaptive sampling ofparametric curves [15, 28-31]. In our implementation,we use multiple random probing, an extension of sin-gle random probing [31], because it is easy to imple-ment and has many degrees of freedom to help achievea good sampling [27]. This method implements astochastic search for splitting the edge at the pointfarthest from the straight line segment joining the ex-tremes of the curve.This procedure can be seen as a heuristic for �nd-ing the critical points of the curve, e.g., the pointsof maximum curvature. Such a subdivision scheme isspecially important in the early stages of the subdi-vision, when the edges are long and the surface canoscillate signi�cantly from one extreme to the other.The method tries to compute a polygon whose dis-tance to the actual curve on the surface is at mostthe desired tolerance ". As we shall see below, thesepolygonal approximations are the basis of a heuristic atness test for surface patches.5.2 Cell SubdivisionTo subdivide each triangular cell, we classify its edgesaccording to the number of sample points created dur-ing the curve generation step of the algorithm. Asimple edge is composed of a single linear segment;it corresponds to a at curve segment on the surface.A complex edge contains interior sample points, andtherefore it is composed of several linear segments cor-responding to a polygonal curve on the surface. Thesubdivision of the cells is based on the classi�cation ofeach cell edge as simple or complex. There are fourpossible cases (Figure 6):1. three simple edges : Recursive subdivision termi-nates and the procedure outputs one triangle, cor-responding to a at surface patch (Figure 6a).2. two simple edges : The cell is divided into two subcells. A new internal edge is created by choosingan internal point in the complex edge and con-necting it to the opposite vertex (Figure 6b).3. one simple edge: The cell is divided into two subcells. A new internal edge is created by connectingan internal point in one of the complex edges tothe opposite vertex (Figure 6c).4. no simple edge: The cell is divided into four subcells by generating new three internal edges con-necting internal points between each pair of adja-cent complex edges (Figure 6d).6

Page 7: Metho dology - pdfs.semanticscholar.org

(a) three simple edges.(b) two simple edges.(c) one simple edge.(d) no simple edge.Figure 6: Four cases for cell subdivision in thepath-based adaptive method: three simple edges (a);two simple edges (b); one simple edge(c); no simpleedge(d).Note that the atness test in case 1 is heuristic: Atriangular surface patch is considered at when all theedges of the corresponding cell are at. This test workswell in practice, but, if necessary, it can be combinedwith further heuristic tests, such as testing the dis-tance of the center of the triangular face to the pointon the surface corresponding to this center. If this dis-tance is not less than the tolerance ", then the cell isdeclared not at and can be further subdivided, sayat the midpoints of its edges, as in case 4.5.2.1 Creation of Internal EdgesIn the cell subdivision process described above, thechoice of the internal splitting edge is not unique. Thealgorithm uses the following criteria to make a choice.

For each potential splitting edge, we polygonize thecorresponding curve on the surface using the algorithmdescribed in Section 5.1. We choose the edge thatcorresponds to the curve with the smallest number ofpolygonal segments. This criterion minimizes the totalnumber of segments in internal edges, and is a goodheuristic for determining curves with low curvaturevariations.These choices made by the algorithm in the subdi-vision step is a key factor for global optimal sampling.In fact, the choices provide the best subdivision of eachpatch: good accuracy of the approximation and smallnumber of polygons.5.3 CommentsOne drawback of the current implementation of themethod is that it is slow, due to the exhaustive searchused to locate curves with low variation of the cur-vature inside each cell. A dynamic programming ap-proach could probably be used to avoid recomputingcandidates edges in later subdivisions. On the otherhand, the cost of the method as described here maybe appropriate for applications that do not change thesurfaces, such as high-quality rendering.5.4 ExamplesWe now show four examples of the method in action.For each example, we show the parameter domain de-composition and a 3-dimensional image of the polyg-onal approximation, rendered with Gouraud shading.Cylinder. Figure 7 shows the cylinder given by:x = cosu; y = sinu; z = vu 2 [0; 3:12]; v 2 [0; 1]:The polygonization is built along lines that are paral-lel to the main axis of the cylinder. These lines corre-spond to paths of minimum curvature on the surface,which are, in this case, straight line segments. Theother lines | the boundaries and the diagonal | arepart of the initial triangulation.Saddle. Figure 8 shows the \saddle" given by:x = u; y = v; z = (uv)3u 2 [0; 1]; v 2 [0; 1]:Note how the polygonization adapts to the surface'sgeometry. The at center is covered by only six trian-gles. The curved sides form a ruled structure in whichthe triangles are aligned transversally to the steepestdirections.7

Page 8: Metho dology - pdfs.semanticscholar.org

Figure 7: Domain decomposition (top) and polyg-onal approximation (bottom) for the cylinder givenby f(u; v) = (cosu; sinu; v); where u 2 [0; 3:12] andv 2 [0; 1].Mountain. Figure 9 shows the \mountain" given by:x = u; y = v; z = (sinu sin v)4u 2 [1:5; 2:7]; v 2 [0:75; 1:65]:Here we can see that the polygonization follows con-tour lines of the surface as in a topography map. Thesecurves are level sets parallel to the base xy-plane.Besides their importance in geometric approximation,contour lines are perceptually insightful because theydepict the surface's height variations.Needles. Figure 10 shows the \needles" given by:x = u; y = v; z = 0:8 sinu sin vu 2 [1:33; 11:33]; v 2 [10:25; 21:25]:

Figure 8: Domain decomposition (top) and polygo-nal approximation (bottom) for the saddle given byf(u; v) = (u; v; (uv)3); where u 2 [0; 1] and v 2 [0; 1].This surface has both high frequency detail and sharpvariations. Even though the algorithm started withjust two triangles covering the entire parametric do-main, it was able to capture all important featuresin the surface. Moreover, the polygons are uniformlydistributed around those features.6 Polygonization of Implicit SurfacesIn this section, we present an adaptive polygonizationmethod for implicit surfaces [32]. The algorithm iseasy to implement and is very e�cient both in stor-age and execution time. For this reason, it provides apractical solution for real-world applications.The basic algorithm uses both an extrinsic and in-trinsic subdivision approach:8

Page 9: Metho dology - pdfs.semanticscholar.org

Figure 9: Domain decomposition (top) and polygo-nal approximation (bottom) for the mountain givenby f(u; v) = (u; v; (sinu sin v)4); where u 2 [1:5; 2:7]and v 2 [0:75; 1:65].1. [Initial Mesh] Start with a coarse uniform decom-position of the domain of the implicit functionand compute a polygonal approximation to thesurface (extrinsic step).2. [Cell Subdivision] Re�ne the polygonal mesh fromthe previous step using edge coherence (intrinsicstep).3. [Test of atness] For each cell, test the corre-sponding implicit surface for atness.4. [Recursion] Recursively subdivide cells whose cor-responding implicit surface is not at.The key to simple adaptation is the separation be-tween structuring and sampling. Structuring is done

Figure 10: Domain decomposition (top) and polygo-nal approximation (bottom) for the needles given byf(u; v) = (u; v; 0:8 sinu sin v); where u 2 [1:33; 11:33]and v 2 [10:25; 21:25].in step 1, where a coarse sampling is also performed.In the step 2, the structure of the initial mesh guidesthe adaptive sampling and, at the same time, providesthe connectivity information for maintaining geomet-rical consistency.The �rst step takes place in a 3-dimensional space(i.e., in the region delimited by the domain of the im-plicit function), while the second step is performedintrinsically (i.e., using the polygonal mesh approxi-mating the implicit surface). This reduction in thedimensionality of the problem makes the computationvery e�cient.The atness test uses the implicit surface curvature.The curvature is estimated over the corresponding cellusing the deviation of the surface normal from the nor-9

Page 10: Metho dology - pdfs.semanticscholar.org

mal of the polygon's support plane.Below, we explain each step in detail.6.1 Initial MeshThis process corresponds to an uniform polygoniza-tion of the implicit surface, which is a well understoodproblem with many alternative solutions available inthe graphics literature [33-36]. We employ a polygo-nization algorithm based on a simplicial space decom-position [37]. This is an elegant solution for the prob-lem and it is a perfect match for our mesh adaptationmethod because of its simplicity and conciseness.The uniform polygonization algorithm decomposesthe bounding box of the implicit function domain us-ing a simplicial cell complex. Our simplicial decompo-sition employs the classical Coxeter-Freudenthal spacesubdivision scheme [38], which is illustrated in Fig-ure 11 for the 2D case. For the 3D case, see [37].

Figure 11: Coxeter-Freudenthal decomposition of thesquare in R2.If the resolution of the space decomposition is ad-equate, a surface-cell intersection can be determinedfrom the values of the implicit function f at the ver-tices of the cell. This is because the surface de�nedby f(x; y; z) = 0 intersects a cell only if the value off changes from positive to negative within the cell, asindicated in Figure 12 for the 2D case.When the surface intersects a cell, it is approxi-mated by an a�ne mapping inside the cell, thus gen-erating a new polygon that is added to the mesh. Poly-gon vertices are the intersection points of the implicitsurface with the edges of the cell (see the dashed linein Figure 12).6.2 Cell SubdivisionA triangle, with vertices v0; v1; v2, is subdivided intofour triangles by splitting its edges, e0 = v0v1, e1 =v1v2, and e2 = v2v0, at their midpoints | m0, m1and m2 | and connecting the midpoints of adjacent

Figure 12: Intersection of a 2D cell with an implicitcurve.

Figure 13: Subdivision scheme of a triangle.edges. A diagram illustrating this scheme is depictedin Figure 13.The decision to subdivide the triangle is based on aclassi�cation of the surface curvature along its edges.If all edges are at, then no subdivision is done, andthe algorithm outputs that triangle. If one or moreedges are not at, then the current polygonal approx-imation the triangle must be subdivided. In this case,the edge midpoints are computed and the procedureis called recursively for each piece.6.2.1 Edge CoherenceThe most important part of the adaptation process,the edge coherence mechanism, is implemented in thecomputation of edge midpoints. If a triangle v0v1v2 isnot at, then it must be subdivided. After computingthe true midpoint mi of the linear segment ei = vivj ,we have two options to avoid cracks:1. Always project the midpoint mi onto the implicitsurface and subdivide the adjacent polygon byconnecting mi to the opposite vertex. This has10

Page 11: Metho dology - pdfs.semanticscholar.org

the advantage of producing a PL-manifold struc-ture, but would require a more complex scheme toguarantee the topological consistency of the mesh.2. Project the midpoint mi onto the surface only ifthe edge ei is not at. In this case, for at edges,no cracks are created even if we do not split theadjacent polygon. This solution has the advan-tage of generating fewer polygons and is adequateif a PL structure is not required.We use the second option in our implementationbecause of its simplicity and e�ciency.6.2.2 ProjectionThe projection of the midpoint mi onto the implicitsurface amounts to computing the point p0 such thatf(p0) = 0 and, at the same time, minimizes jjp0�mijj(this problem has a unique solution because the pointmi is inside a tubular neighborhood of the surface).The solution of such an optimization problem canbe computed using various numerical techniques, suchas gradient descent. We employ a physics basedmethod that is simple to implement and provides goodaccuracy control (see [39] for details).6.3 CommentsThis new hybrid extrinsic/intrinsic polygonizationmethod for implicit surfaces has one limitation com-pared with methods that employ a full extrinsicscheme. If the initial sampling is too coarse in rela-tion to the complexity of the implicit shape, the poly-gonization may not capture the correct topology ofthe surface. This is because structuring is done in3D during the �rst pass. At that stage, the methodcommits to a topology and proceeds on to the secondpass, which works in 2D and changes just the geom-etry. However, this is not a serious problem becausethere is usually enough information about the surfaceto determine the appropriate sampling rate for the ini-tial step of the algorithm.The performance gains are signi�cant because theinitial mesh computation, which is expensive at highresolution, needs to be executed only once { at a �xed,coarse resolution { while the intrinsic recursive subdi-vision is a fast operation.6.4 ExamplesWe now show two examples of the method in action.Blobby Object. The �rst example is a blobby object[40]. This type of model de�nes the implicit functionas a density �eld generated from a point skeleton. The

implicit surface is a level set of that �eld. In sucha formulation, point sources can be combined eitheradditively or subtractively in order to produce smoothblends.We chose this implicit model because this is a com-mon technique to construct implicit surface models incomputer graphics modeling systems.The test object is a spherical shape with a cavityon top. It was constructed using a skeleton with twopoints consisting of one strong positive source and oneweaker negative source.Figure 14 shows a polygonal approximation of thisobject. The mesh contains 2351 triangles.

Figure 14: Polygonal approximation of blobby object.Note that the density of the mesh increases mostlyaround the rim of the crater, where the subtractedmaterial blend occurs. This area contains the sharpestvariations in surface curvature.Figure 15 shows a close up view of a portion of thetriangle mesh with high polygon density.

Figure 15: Detail of an area with high surface curva-ture.11

Page 12: Metho dology - pdfs.semanticscholar.org

Hypertexture Object. The second example is ahypertexture object [41]. This type of model is a pro-cedural implicit shape, de�ned by functional composi-tion of a base density function with density modula-tion functions.In the example, we have a \noisy sphere" of radius1, generated from a spherical �eld modulated band-limited noise. Figure 16 shows the polygonal approx-imation produced by our algorithm. The initial sam-pling employed a 3 � 3 � 3 grid enclosing the object.Figure 17 shows a Gouraud-shaded rendering of theobject. The mesh has 1058 triangles and was com-puted in 0.9 seconds in a SGI Indigo R4000 worksta-tion.

Figure 16: Polygonal approximation of the \NoisySphere".

Figure 17: Gouraud-shaded \Noisy Sphere".

7 ConclusionsWe have presented two new adaptive polygonizationmethods: one for parametric surfaces and one for im-plicit surfaces. Both methods are based on the samegeneral principles: edge coherence; and separation ofsampling and structuring,The method for parametric surfaces combines re-cursive simplicial subdivision of the domain with pointsampling along the corresponding curves on the sur-face. Cracks in the polygonal mesh are avoided by de-termining the optimal sampling rate along the edgesof a cell before subdividing it. This method is suit-able for surfaces with low variations, such as bicubicpatches, as well as for surfaces with high variations,such as height �elds. The method is also suitable forcomputing trimmed surfaces: just sample the trim-ming curves as described in Section 5.1 and start froma triangulation of the trimmed domain constrained tothis sampling.The method for implicit surfaces is a simpli�cationof the method introduced by one of the authors [20].The main di�erence is that the original method em-ployed an extrinsic 3D adaptation, making the imple-mentation more complex and less e�cient. In the newmethod, we decompose the problem in two subprob-lems, so that most of the computation can be done in-trinsically (2D). This makes the implementation sim-pler and more e�cient. A disadvantage of this methodis that to ensure a correct solution, the resolution ofthe sampling grid must be �ne enough to discriminatethe topology of each connected component of the ob-ject. In practice, a very coarse sampling grid su�cesfor most shapes of interest.A similar polygonization method for implicit sur-faces was developed independently by Thad Beier ofPaci�c Data Images (PDI) [42] and by Brian Wyvill[43].We are currently working on a uni�ed adaptivepolygonization method based on edge coherence whichcomputes a hierarchical polygonization, and handlesboth parametric and implicit surfaces in the same way.AcknowledgementsThe �gures in Sections 5.4 and 6.4 were generated withGeomview [44].References[1] M. do Carmo. Di�erential Geometry of Curvesand Surfaces. Prentice Hall, 1976.[2] L. Velho and J. Gomes. Approximate conver-sion of parametric to implicit surfaces. ComputerGraphics Forum, 15(5):327{337, 1996.12

Page 13: Metho dology - pdfs.semanticscholar.org

[3] C. P. Rourke and B. J. Sanderson. Introductionto Piecewise Linear Topology. Springer-Verlag,1982.[4] W. J. Schroeder, J. A. Zarge, andW. E. Lorensen.Decimation of triangle meshes. Computer Graph-ics (SIGGRAPH '92 Proceedings), 26(2):65{70,July 1992.[5] B. Von Herzen and A. H. Barr. Accurate triangu-lations of deformed, intersecting surfaces. Com-puter Graphics (SIGGRAPH '87 Proceedings),21(4):103{110, July 1987.[6] L. Velho. Interactive modeling of soft objects. InProceedings of Ausgraph '90, pages 227{230, 1990.[7] M. Tamminen and F. W. Jansen. An integrity�lter for recursive subdivision meshes. Computersand Graphics, 9(4):351{363, 1985.[8] J. H. Clark. A fast algorithm for rendering para-metric surfaces. In K. I. Joy, C. W. Grant, N. L.Max, and L. Hat�eld, editors, Tutorial: Com-puter Graphics: Image Synthesis, pages 88{93.Computer Society Press, 1988.[9] J. Lane and L. Carpenter. A generalized scan linealgorithm for the computer display of parametri-cally de�ned surfaces. Computer Graphics andImage Processing, 11:290{297, 1979.[10] J. Lane and R. Riesenfeld. A theoretical devel-opment for the computer generation and displayof piecewise polynomial surfaces. IEEE Trans-actions on Pattern Analysis and Machine Intelli-gence, 2(1):35{46, 1980.[11] P. A. Koparkar and S. P. Mudur. Computa-tional techniques for processing parametric sur-faces. Computer Vision, Graphics, and ImageProcessing, 28(3):303{322, 1984.[12] D. Filip. Adaptive subdivision algorithms for aset of B�ezier triangles. Computer Aided Design,18(2):74{78, 1986.[13] R. D. Clay and H. P. Moreton. E�cient adap-tive subdivision of B�ezier surfaces. In Proceedingsof Eurographics '88, pages 357{371, September1988.[14] D. R. Forsey and R. V. Klassen. An adaptivesubdivision algorithm for crack prevention in thedisplay of parametric surfaces. In Proceedings ofGraphics Interface '90, pages 1{8, May 1990.

[15] M. Kosters. Curvature-dependent parametriza-tion of curves and surfaces. Computer Aided De-sign, 23(8):569{578, 1991.[16] J. W. Peterson. Tessellation of NURB surfaces.In P. Heckbert, editor, Graphics Gems IV, pages286{320. Academic Press, 1994.[17] S. P. Mudur and P. A. Koparkar. Interval meth-ods for processing geometric objects. IEEE Com-puter Graphics and Applications, 4(2):7{17, 1984.[18] J. Bloomenthal. Polygonization of implicitsurfaces. Computer Aided Geometric Design,5(4):341{355, 1988.[19] M. Hall and J. Warren. Adaptive polygonizationof implicitly de�ned surfaces. IEEE ComputerGraphics and Applications, 10(6):33{43, 1990.[20] L. Velho. Adaptive polygonization of implicit sur-faces using simplicial decomposition and bound-ary constraints. In Proceedings of Eurographics'90, pages 125{136, September 1990.[21] H. Ratschek and J. Rokne. Computer Methodsfor the Range of Functions. Ellis Horwood Ltd.,1984.[22] K. G. Su�ern and E. D. Fackerell. Interval meth-ods in computer graphics. Computers & Graphics,15:331{340, 1991.[23] J. M. Snyder. Interval analysis for computergraphics. Computer Graphics (SIGGRAPH '92Proceedings), 26(2):121{130, July 1992.[24] T. Du�. Interval arithmetic and recursive subdi-vision for implicit functions and constructive solidgeometry. Computer Graphics (SIGGRAPH '92Proceedings), 26(2):131{138, July 1992.[25] L. H. de Figueiredo and J. Stol�. Adaptive enu-meration of implicit surfaces with a�ne arith-metic. Computer Graphics Forum, 15(5):287{296,1996.[26] C. L. Bajaj, J. Chen, and G. Xu. Modeling withcubic A-Patches. ACM Transactions on Graph-ics, 14(2):103{133, 1995.[27] L. Velho and L. H. de Figueiredo. Optimal adap-tive polygonal approximation of parametric sur-faces. In Proceedings of SIBGRAPI '96, pages127{133, October 1996.13

Page 14: Metho dology - pdfs.semanticscholar.org

[28] U. Ramer. An iterative procedure for the polyg-onal approximation of plane curves. ComputerGraphics and Image Processing, 1:244{256, 1972.[29] M. Crampin, R. Guifo, and G. A. Read. Linearapproximation of curves with bounded curvatureand a data reduction algorithm. Computer AidedDesign, 17(6):257{261, 1985.[30] R. E. Chandler. A recursive technique for render-ing parametric curves. Computers and Graphics,14(3/4):477{479, 1990.[31] L. H. de Figueiredo. Adaptive sampling of para-metric curves. In A. Paeth, editor, Graphics GemsV, pages 173{178. Academic Press, 1995.[32] L. Velho. Adaptive polygonization made simple.In Proceedings of SIBGRAPI '95, pages 111{118,October 1995.[33] W. E. Lorensen and H. E. Cline. Marching cubes:A high resolution 3D surface construction algo-rithm. Computer Graphics (SIGGRAPH '87 Pro-ceedings), 21(4):163{169, August 1987.[34] G. Wyvill, C. McPheeters, and B. Wyvill. Datastructure for soft objects. The Visual Computer,2(4):227{234, 1986.[35] J. Bloomenthal. An implicit surface polygonizer.In P. S. Heckbert, editor, Graphics Gems IV,pages 324{349. Academic Press, 1994.[36] E. L. Allgower and P. H. Schmidt. An algorithmfor piecewise linear approximation of an implic-itly de�ned manifold. SIAM Journal of Numeri-cal Analysis, 22:322{346, 1985.[37] J. Gomes and L. Velho. Implicit Objects in Com-puter Graphics. Number 53 in IMPA MonographSeries. IMPA, Rio de Janeiro, 1993.[38] H. Coxeter. Regular Polytopes. Macmillan, NewYork, 1963.[39] L. H. de Figueiredo and J. Gomes. Sampling im-plicit objects with physically-based particle sys-tems. Computers & Graphics, 20(3):365{375,1996.[40] J. F. Blinn. A generalization of algebraic sur-face drawing. ACM Transactions on Graphics,1(3):235{256, 1982.[41] K. Perlin and E. Ho�ert. Hypertexture. Com-puter Graphics (SIGGRAPH '89 Proceedings),23(3):253{262, July 1989.

[42] T. Beier, 1990. (personal communication).[43] B. Wyvill. Explicating implicit surfaces. In Pro-ceedings of Graphics Interface '94, pages 165{173,May 1994.[44] Geomview. Software written at the GeometryCenter, University of Minnesota. Available athttp://www.geom.umn.edu/software/.

14