Abstract:
The present invention addresses the problem of describing an arbitrary object (up to user-defined limits) given a set of triangles with vertex normals describing the object. A novel method of successively merging traingles into larger and larger patches to compute a set of &#34;as-few-as-possible&#34; Bezier patches is presented. This method is not only applicable to arbitrary objects, but also aims at producing as few patches as possible depending on the geometry of the input object. Also presented are methods to enforce C 0  - and C 1  -continuity between a pair of patches B L  (s,t) and B R  (s,t), placed arbitrarily. The methods perturb the appropnate control points to achieve geometric continuities. For C 0  -continuity the area of the hole between the patches is minimized by formulating the area as a series of linear programs, where the continuity has to be enforced across the adjacent boundary curves B L  (1,t) and B R  (0,t). Similarly, to enforce C 1  -continuity the hole-area in tangential space is minimized.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a completely automated method for converting a polygonal representation to a compact, high-quality surface representation using Bezier patches. 
     2. Description of the Related Art 
     There is a growing interest in the graphics, vision, and manufacturing communities to be able to digitize the shape and external appearance of objects for the purpose of transmission, display, and numerically controlled fabrication. This would have applications in product design, fast prototyping, reverse engineering, and digitizing shapes for the visual simulation, animation, and entertainment industries. Current advancement in laser range scanners now offers a promising methodology for fully-automated model acquisition of arbitrary objects. Several million points scanned on an arbitrary object can be converted easily into an irregular mesh of polygons. These polygons have to then be converted into a parametric surface representation, which is a more compact and manipulable form. This last step is referred to as the problem of surface reconstruction, and has been noted by CAD/CAGD as one of the top ten problems to be solved. Prior art on surface reconstruction method have generally been constrained by the enforced assumption that objects be well-behaved in the sense that they have no creases or sharp edges. Also, prior art surface representation construction methods are generally only semi-automated, i.e., require user intervention. Therefore, an improved system and method is desired for converting a polygonal representation to a compact, high quality surface representation using Bezier patches. 
     SUMMARY OF THE INVENTION 
     The present invention addresses the problem of describing an arbitrary object (up to user-defined limits) given a set of triangles with vertex normals describing the object. A novel method of successively merging triangles into larger and larger patches to compute a set of &#34;as-few-as-possible&#34; Bezier patches is presented. This method is not only applicable to arbitrary objects, but also aims at producing as few patches as possible depending on the geometry of the input object. Also presented are methods to enforce C 0  - and C 1  -continuity between a pair of patches B L  (s,t) and B R  (s,t), placed arbitrarily. The methods perturb the appropriate control points to achieve geometric continuities. For C 0  -continuity the area of the hole between the patches is minimized by formulating the area as a series of linear programs, where the continuity has to be enforced across the adjacent boundary curves B L  (1,t) and B R  (0,t). Similarly, to enforce C 1  -continuity the hole-area in tangential space is minimized. 
     Broadly speaking, the present invention contemplates a method for modifying a representation of an appearance of an object. The method includes the step of forming a dual graph for a set of patches of degree-d, which describe the appearance of the object. The method also includes the step of removing from the dual graph a set of edges representing (i) sharp edges of the object, (ii) junctions between patches which do not share a common side, (iii) junctions between patches with areas that differ by a predetermined amount. The method further includes the steps of processing remaining edges of the dual graph to determine a maximum cardinality matching which specifies a set of disjoint pairs, and combining the disjoint pairs to form a set of patches of degree d+1. 
     The present invention further contemplates a method for improving the digitized appearance of an object, which is described by a plurality of Bezier patches. The method includes the step of calculating a hole area between a pair of adjacent Bezier patches, which each possess associated patch-edge control points. The method also includes the steps of determining perturbation limits for the patch-edge control points, and reducing the hole area by perturbing the patch-edge control points within the perturbation limits. Reducing the hole area operates to improve the digitized appearance of the object. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     Objects and advantages of the invention will become apparent upon reading the following detailed description and upon reference to the accompanying drawings in which: 
     FIG. 1 is a table illustrating a time evolution of the object representation and its dual graph as the method is executed; 
     FIG. 2 is an illustration of rules used in determining pairs of combinable triangles and patches; 
     FIG. 3 illustrates a method for iteratively merging polygons to create a Bezier patch representation of an object from a set of triangles; 
     FIG. 4 is an illustration of a hole between adjacent Bezier patches which is used to demonstrate the method of determining the hole area; 
     FIG. 5 is an illustration demonstrating the feasibility of an method for determining relative patch orientation; 
     FIG. 6 illustrates a method for determining relative patch orientation; 
     FIG. 7 illustrates a subroutine for determining the area between two Bezier curves; 
     FIG. 8 illustrates a subroutine used to determine the limits of integration for alculating the area between two Bezier curves; 
     FIG. 9 illustrates a method for enforcing C 0  and C 1  continuities between adjacent patches in a Bezier patch representation of an object; 
     FIG. 10 illustrates a subroutine for minimizing the hole area and tangential hole area between adjacent Bezier patches; 
     FIG. 11 is a table demonstrating results of applying the merging method to exemplary object representations; and 
     FIGS. 12A-B are a flowchart illustrating the high-level structure of the disclosed method. 
    
    
     While the invention is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herein be described in detail. It should be understood, however, that the drawings and detailed description thereto are not intended to limit the invention to the particular form disclosed, but on the contrary, the intention is to cover all modifications, equivalents and alternatives falling within the spirit and scope of the present invention as defined by the appended claims. 
     DETAILED DESCRIPTION OF THE INVENTION 
     The present invention comprises a system and method for describing an arbitrary object. After receiving a tessellation of (i.e. a set of polygons describing) an arbitrary object the present invention solves the problem of computing a set of &#34;as-few-as-possible&#34; Bezier patches that approximates the given object within user-specified tolerance limits. Work on surface reconstruction done in the past (e.g., M. Eck and H. Hoppe, &#34;Automatic reconstruction of B-spline surfaces of arbitrary topological type,&#34; in Proc. SIGGRAPH &#39;96 Conference, pp. 313-324, Aug. 4-9 (1996), New Orleans, La., which is hereby incorporated by reference as though fully and completely set forth herein, and V. Krishnamurthy and M. Levoy, &#34;Fitting smooth surfaces to dense polygon meshes,&#34; in Proc. SIGGRAPH &#39;96 Conference, pp. 313-324, Aug. 4-9 (1996), New Orleans, La., which is also hereby incorporated by reference as though fully and completely set forth herein) is either semi-automated (i.e., requires user intervention) or assumes objects to have no creases or sharp edges. 
     The following assumptions are made here: 
     1. the tessellation polygons are triangles, 
     2. three coordinates and three surface-normals (vertex-normals) are supplied for each triangle, and 
     3. Bezier patches constructed are bicubic i.e., 4×4 control points. The first assumption can be relaxed by introducing a pre-processing stage to convert arbitrary polygons to a set of triangles. Although the method can be adapted for constructing Bezier patches of arbitrary degree, the present invention assumes bicubic patches for practical reasons. 
     The present invention comprises a new method for the problem which includes two phases: (i) Successive merging of triangles into larger and larger patches, (ii) forcing C 0  - and C 1  -continuity among patches obtained from the first phase by perturbing appropriate control points. In the sections to follow the methods for the two phases are described, followed by some implementation details, and some computational results. As the methods are described, reference will be regularly made to FIG. 12 which provides a flowchart describing the high level structure of the methods. FIG. 12a illustrates the first phase and FIG. 12b illustrates the second phase. 
     The following explains the various terms used in the present disclosure. An undirected graph G=(V,E) is defined by a set V of nodes and a set E of edges, where each edge e.di-elect cons.E is an unordered pair of nodes. The cardinality |V| is denoted by n and |E| by m. A set, T={t 1 , t 2 , . . . , t n  }, of triangles in 3-D space is a good example of a graph, in which V is the set of all triangle vertices and E, the set of all triangle sides. The dual of such a graph is defined by letting each triangle t i , 1≦i≦n, represent a node and letting each pair of triangles with a common side represent an edge. As an example, the dual of the graph in FIG. 1a (a 16-node, 35-edge graph) has 21 nodes (=21 triangles) and 28 edges, as shown in FIG. 1b. A subset M.OR right.E of edges of a graph G=(V,E) is called a matching of G if no two edges in M share a common node. The maximum-cardinality matching of a graph G is one that has the largest number of edges among all possible matchings of G. Obviously, the cardinality of such a matching is at most .left brkt-bot.|V|/2.right brkt-bot.. As an example, for the dual graph in FIG. 1b the set of edges {(1,12), (2,4), (5,6), (7,8), (9,16), (11,14), (13,15), (17,18), (19,20)} is a matching, but not the maximum-cardinality matching. In fact, the set {(2,3), (4,6), (5,10), (7,8), (9,16), (11,14), (12,13), (15,17), (18,19), (20,21)} is a maximum-cardinality matching of the same graph, since it contains 10 (=.left brkt-bot.21/2.right brkt-bot.) edges. 
     A Bezier curve B(s) of degree d is given by a degree-d polynomial in s and is defined in terms of a set g i , 0≦i≦d, of control points. Control points g 0  and g d  lie on the curve B(s) whereas the others, in general, lie outside the curve. Similarly, a Bezier patch B(s,t) of degree d-by-d (also referred here as degree-d patch) is a degree d-by-d polynomial in s and t and is defined in terms of a set g ij , 0≦ij≦d of control points. Only control points g 00 , g 0d , g d0 , and g dd  necessarily lie on B(s,t). These four control points are referred to as the corners of a patch. The corners of a patch define a four-sided surface, g 00  -g 0d  -g d0  -g 00 , which is referred to as the base of that patch. The control points g 01 , g 02 , g d1 , and g d2  are examples of edge control points, i.e. control points that govern the shape of the patch edges. The remaining control points are herein referred to as surface control points. 
     Two patches are defined to be combinable if (at least) their bases share a common ide. Also, symbols B(s) a   b  are used to represent a sub-curve of B(s) extending from arameters s=a to s=b; such a sub-curve can be obtained by reparameterizing the original curve into the new form B((s-a)/(b-a)). 
     Further discussion on graphs (including related methods) can be found in standard textbooks, e.g., N. Deo, Graph Algorithms with Applications to Engineering and Computer Science (1974) Englewood Cliffs, N.J., which is hereby incorporated by reference as though fully and completely set forth herein, M. M. Syslo, N. Deo, and J. S. Kowalik, Discrete Optimization Algorithms: With Pascal Programs (1983) Englewood Cliffs, N.J., which is hereby incorporated by reference as though fully and completely set forth herein, and F. Harary, Graph Theory (1988) Addison-Wesley, which is hereby incorporated by reference as though fully and completely set forth herein. Readers can refer to J. D. Foley, A. van Dam, S. K. Feiner, and J. F. Hughes, Computer Graphics: Principles and Practice, Chap. 11 (1990) Addison-Wesley, for details on Bezier curves/patches. The above chapter is hereby incorporated by reference as though fully and completely set forth herein. 
     SUCCESSIVE MERGING 
     The overall structure of this phase is illustrated in FIG. 12a. A set of polygons or patches is provided at input 102. In step 104, a dual graph is formed for the graph representing the set of input polygons or patches. In step 106, edges of the dual graph are removed according to criteria discussed further below. A maximum-cardinality matching is then performed on the dual graph in step 108. The resulting pairs indicate pairs of polygons or patches that are combined in step 110. Any unpaired polygons or patches are then promoted as though they had been combined with another polygon or patch. In step 114, a decision is made to continue iterating on the first phase or to progress to the second phase via node 116. 
     The central idea used in this phase is that of merging pairs of small degree-d patches into larger patches of degree d or d+1. To start with, a given set of n triangles is matched to obtain pairs of triangles that are &#34;combinable&#34;. Each pair of matched triangles can then be combined to give a degree-1 patch. Then, the procedure is repeated on degree-1 patches (instead of triangles) to obtain even fewer degree-2 patches; and further repeated on degree-2 patches to obtain degree-3 patches. At any stage if there are unmatched patches, the degree of such isolated patches is elevated by one. For more information on degree elevation, please see A. Watt and M. Watt, Advanced Animation and Rendering Techniques, Chap. 3 (1993), Addison-Wesley, which is hereby incorporated by reference as though fully and completely set forth herein. 
     Once all the patches are bicubic, the described combining step is preferably repeated further, but this time, the pairs of bicubic patches are combined into larger patches of the same degree (i.e, three). One such extra step of combining decreases the number of patches appreciably without affecting the fit of the patches significantly, as shown by the computational results of FIG. 11. 
     FIG. 1 illustrates an example of successive merging on 21 triangles. In this example the procedure is repeated three times; the number of patches at the end of iteration 1 (FIG. 1c) is 11, at the end of iteration 2 (FIG. 1e) is 6, and at the end of iteration 3 (FIG. 1g) is 4. The corresponding dual graphs are shown in FIGS. 1d, 1f, and 1g respectively. 
     Selection of Which Triangles to Combine 
     The following section describes how to obtain the &#34;best&#34; set of matches among triangles (or patches) and how to combine a pair of patches to get a larger patch. For a given set of triangles the dual graph (see the previous subsection) contains an edge for every possible triangle-pair that can potentially be combined. The dual graph for a subsequent stage is obtained from one for the previous stage by short-cutting every edge that belongs to the matching of the previous stage. Each pair of matched nodes is collapsed to give a single node for the next dual graph. This is followed by renumbering the nodes using consecutive labels. Readers may note that a dual graph may contain more edges than the ones representing combinable pairs of patches. For example, the dual graph will contain an edge for a patch-pair that looks like the one in FIG. 2d, although such a pair is not combinable. The subgraph, G c , of the dual graph, G, that precisely contains edges representing only combinable patch-pairs is obtained by retaining only those edges of G that pass the following tests: 
     For Triangles (Stage 1 only): 
     (i) Sharp Edge Test (FIG. 2a): Two triangles are not combined if the surface normals on the common comers of the triangles differ significantly. 
     (ii) Degeneracy Test (FIG. 2b): Two triangles are not combined if the resulting surface is a triangle (or even &#34;nearly&#34; triangle). It is checked by testing collinearity of corner points (e.g., Points 1, 2, and 3 in FIG. 2b are nearly collinear). 
     For Patches (Other stages): 
     (i) Common Comer Test (FIG. 2c and 2d): Two patches are not combined if their bases do not share a common side. 
     (ii) Sharp Edge Test (FIG. 2e): Two patches are not combined if the surface normals on the common comers of the patches differ significantly. 
     (iii) Patch Area Test (FIG. 2f): Two patches are not combined if their surface areas differ significantly. 
     (iv) Boundary Skew Test (FIG. 2g): Two patches are not combined if a boundary of the resulting surface has high curvature. (Readers may note that the pair of patches in FIG. 2g passes the Sharp Edge Test.) It is checked by testing if the angle between the boundary curves of the two patches (such as (1,2) and (2,3)) differs significantly from 180°. 
     Once the graph G c  has been obtained, the maximum-cardinality matching of that graph gives the &#34;best&#34; set of matches; since larger the cardinality, fewer will be the number of patches in the next stage. Such matchings can be computed in O(n 3 ) time (e.g., J. Edmonds, &#34;Paths, trees, and flowers,&#34; Canadian J. Math. 17 (1965) 449-467, and H. Gabow, &#34;An efficient implementation of Edmonds algorithm for maximum matching on graphs,&#34; J. ACM 23 (1975) 221-234), where n is the number of nodes in the graph. One particularly good method that can be implemented easily is due to U. Pape and D. Conradt, &#34;Maximales matching in graphen,&#34; in H. Spath (ed.) Ausgewahlte Operations Research Software in FORTRAN (1980) 103-114. Oldenburg, Munich. The above papers are hereby incorporated by reference as though fully and completely set forth herein. 
     Method for Combining Triangles and Patches 
     Control points for a large patch, say of degree d×d, that represents a combination of a given pair of adjacent patches is obtained by sampling the two given patches at (d+1) 2  different points, followed by parameterizing the sampled points with respect to the larger patch, and then solving a system of (d+1) 2  linear equations for the (d+1) 2  new control points. If the application at hand requires greater accuracy, the patches can be sampled at even more than (d+1) 2  points to form an overspecified system of equations, which can then be solved using least-square approximations instead (of a system of linear equations). Next, a specific example is provided. 
     Let B L  (s,t) and B R  (s,t) denote a pair of combinable degree-d Bezier patches (left and right patches) that are to be combined into a single large patch B(s,t). Let g ij   L  and g ij   R , 0≦i,j≦d, denote the control points for the left and right patches, respectively and g ij , 0≦i,j≦d+1 for the larger patch. It is assumed that control points g L   d0  and g L   dd  are the same as g R   00  and g R   0d , respectively (or else, a pair of combinable patches is reoriented to satisfy this condition). Then g ij  can be obtained in terms of g ij   L  and g ij   R , as follows. Consider for example the case d=2. In this case, solving for g ij , 0≦ij≦3 (say, using MAPLE) is performed by using the following 16 equations: 
     B(0, 0)=B L  (0, 0); B(0, 1/3)=B L  (0, 1/3); B(0, 2/3)=B L  (0, 2/3); B(0, 1)=B L  (0, 1); 
     B(1/3, 0)=B L  (2/3, 0); B(1/3,1/3)=B L  (2/3, 1/3); B(1/3,2/3)=B L  (2/3,2/3); B(1/3, 1)=B L  (2/3, 1); 
     B(2/3, 0)=B R  (1/3, 0); B(2/3, 1/3)=B R  (1/3, 1/3); B(2/3, 2/3)=B R  (1/3, 2/3); B(2/3, 1)=B R  (1/3, 1); 
     B(1, 0)=B R  (1, 0); B(1,1/3)=B R  (1, 1/3); B(1, 2/3)=B R  (1, 2/3); B(1, 1)=B R  (1, 1); 
     the result is: 
     
         g.sub.00 :=g.sup.L.sub.00 
    
     
         g.sub.01 :=1/3 g.sup.L.sub.00 +2/3 g.sup.L.sub.01 
    
     
         g.sub.02 :=2/3 g.sup.L.sub.01 +1/3 g.sup.L.sub.02 
    
     
         g.sub.03 :=g.sup.L.sub.02 
    
     
         g.sub.10 :=-1/2 g.sup.L.sub.00 +1/6 g.sup.L.sub.01 +2/3 (g.sup.L.sub.20 +g.sup.R.sub.00)/2-2/3 g.sup.R.sub.10 +4/3 g.sup.L.sub.10 
    
     
         g.sub.11 :=8/9 g.sup.L.sub.11 -1/6 g.sup.L.sub.00 -1/3 g.sup.L.sub.01 +4/9 g.sup.L.sub.10 -2/9 g.sup.R.sub.10 +2/9 (g.sup.L.sub.20 +g.sup.R.sub.00)/2+4/9 (g.sup.L.sub.21 +g.sup.R.sub.01)/2-4/9 g.sup.R.sub.11 +1/18 g.sup.R.sub.20 +1/9 g.sup.R.sub.21 
    
     
         g.sub.12 :=-1/3 g.sup.L.sub.01 -1/6 g.sup.L.sub.02 +8/9 g.sup.L.sub.11 +4/9 g.sup.L.sub.12 +4/9 (g.sup.L.sub.21 +g.sup.R.sub.01 /2+2/9 g.sup.R.sub.12 -4/9 g.sup.R.sub.11 +1/9 g.sup.R.sub.21 +1/18 g.sup.R.sub.22 
    
     
         g.sub.13 :=-1/2 g.sup.L.sub.02 +4/3 g.sup.L.sub.12 +1/6 g.sup.R.sub.22 +2/3 (g.sup.L.sub.22 +g.sup.R.sub.02)/2-2/3 g.sup.R.sub.12 
    
     
         g.sub.20 :=1/6 g.sup.L.sub.00 -1/2 g.sup.R.sub.20 +2/3 (g.sup.L.sub.20 +g.sup.R.sub.00)/2+4/3 g.sup.R.sub.10 -2/3 g.sup.L.sub.10 
    
     
         g.sub.21 :=1/18 g.sup.L.sub.00 +1/9 g.sup.L.sub.01 -2/9 g.sup.L.sub.10 -4/9 g.sup.L.sub.11 +2/9 (g.sup.L.sub.20 g.sup.R.sub.00 /2+4/9 g.sup.L.sub.21 +g.sup.R.sub.01 /2+8/9 g.sup.R.sub.11 +4/9 g.sup.R.sub.10 -1/6 g.sup.R.sub.20 -1/3 g.sup.R.sub.21 
    
     
         g.sub.22 :=1/9 g.sup.R.sub.01 +1/18 g.sup.L.sub.02 -4/9 g.sup.L.sub.11 -2/9 g.sup.L.sub.12 +4/9 (g.sup.L.sub.21 +g.sup.R.sub.01)/2+4/9 g.sup.R.sub.12 +8/9 g.sup.R.sub.11 -1/3 g.sup.R.sub.21 -1/6 g.sup.R.sub.22 
    
     
         g.sub.23 :=1/6 g.sup.L.sub.02 -2/3 g.sup.L.sub.12 -1/2 g.sup.R.sub.22 +2/3 (g.sup.L.sub.22 +g.sup.R.sub.02)/2+4/3 g.sup.R.sub.22 
    
     
         g.sub.30 :=g.sup.R.sub.20 
    
     
         g.sub.31 :=1/3 g.sup.R.sub.20 +2/3 g.sup.R.sub.21 
    
     
         g.sub.32 :=2/3 g.sup.R.sub.21 +1/3 g.sup.R .sub.22 
    
     
         g.sub.33 :=g.sup.R.sub.22 
    
     In the solution derived it may be noted that there are a few terms on the right-hand side given as mean of two coordinates e.g., (g L   21  +g R   01 )/2 in the expression for g 11 . Ideally such coordinates must be identical i.e., g L   21  identical to g R   01 . On similar lines solutions can be derived for combining patches of arbitrary (but a fixed) degree. A summary outline of the first phase of the method is given in FIG. 3. 
     PATCH CONTINUITY 
     The overall structure of this phase is shown in FIG. 12b. The set of merged patches from the first phase are received via node 116. In step 118, the areas of holes between adjacent patches is calculated. These areas are used to set limits to allowable perturbations of patch-edge control points in step 120. The patch-edge control points are then perturbed to minimize the hole areas in step 122. A decision is made in step 124 whether to continue iterating to further minimize hole areas, or to continue with the next portion of the second phase. In step 126, the tangential discontinuities are calculated, and in step 128 the area of these discontinuities is used to set limits on allowable perturbations of patch-surface control points. In step 130, the patch-surface control points are perturbed to minimize the area of the discontinuities. In step 132, a decision is made whether to continue iterating to further minimize tangential discontinuities, or to conclude the second phase by proceeding to node 134. The details of the second phase are discussed below. 
     The bicubic patches that were obtained at the end of successive merging must be refined further due to the following reasons: 
     1. Two adjacent patches may have holes between them due to lack of C 0  -continuity i.e., points on the common boundary do not match. 
     2. Two adjacent patches may not look smooth at the common boundary due to lack of C 1  -continuity i.e., the tangents at the common boundary do not match. 
     Solutions to both these problems are formulated in terms of a series of linear programs--one for each pair of patches with a particular kind of discontinuity. Every edge in the dual graph obtained at the end of the first phase represents a pair of patches which are required to satisfy C 0  continuity. For C 1  -continuity only a subset of these pairs are required to be considered; C 1  -continuity need not be enforced for those patch-pairs that share between them a sharp edge. For example, in FIG. 1g there are four bicubic patches obtained at the end of the first phase; among them 5 pairs of patches are required to satisfy C 0  -continuity corresponding to the five edges of the dual graph (FIG. 1h). However, only 2 pairs of patches are required to satisfy C 1  -continuity--corresponding to the two thin edges in the dual graph. 
     For a given pair of patches the boundary curves of the patches across which the discontinuity occurs are first determined, and then the relevant extent of parameters on these boundary curves is estimated. This is followed by formulation of linear programs. C 0  -continuity for a given pair of bicubic patches is achieved by suitably perturbing edge control points g L   31 , g L   32  of the left patch and edge control points g R   01 , g R   02  of the right patch (assuming s-t axes are as shown in FIG. 4a), so that the two curves B L  (1,t) and B R  (0,t) get as close to each other as possible. Similarly, C 1  -continuity is achieved by suitably perturbing surface control points g L   21 , g L   22  of the left patch and g R   11 , g R   12  of the right patch. In practice, first all optimizations for C 0  -continuity are performed and then a similar procedure is repeated for C 1  -continuity. In the following subsections each of the steps is described in greater detail and the necessary methods are developed. 
     It may be noted that there are only 16 possible configurations (FIG. 5) of the s-t axes for a given pair of patches. (This assumes that both patches have fixed orientations for their normals, or else there would be 64=8×8 configurations by swapping the s- and t-axes themselves.) Conversion of a pair of patches into a fixed &#34;canonical form&#34; (i.e, discontinuity is across curves B L  (1,t) and B R  (0,t)) can be done by rotating the two patches counterclockwise a fixed number of times, given by rot L  and rot R . These two numbers are computed according to the method shown in FIG. 6. 
     In Line 6 of the procedure in FIG. 6, the area between two Bezier curves is computed. This can be achieved by first approximating each of the Bezier curves with a set of line segments and then summing up area of the trapezoids obtained. The method for this is provided in FIG. 7. 
     Once a pair of patches B L  (s,t) and B R  (s,t) is converted into canonical form, the discontinuity is between curves B L  (1,t) and B R  (0,t). However, since only a small part of the two curves may actually be adjoining (see FIG. 4a), it is necessary to compute parameters a L , b L , a R , and b R  such that only the subcurves B L  (1,t)| a .sbsb.L b .sbsp.L and B R  (0,t)| a .sbsb.R b .sbsp.R are relevant. 
     One way to estimate these four parameters is to find for each endpoint of the curve B R  (0,t) (i.e., B R  (0,0) and B R  (0,1)) the closest point on curve B L  (1,t); and similarly, for each endpoint of B L  (1,t) the closest point on curve B R  (0,t). Parameters corresponding to the two closest points on B L  (1,t) give a L  and b L  ; and similarly, the closest points on B R  (0,t) for the two endpoints of B L  (1,t) give a R  and b R  (see FIG. 4b). 
     Next, a method is described to find for a given Bezier curve B(t) and a given point p, the point on B(t) closest to p. The closest point is computed in two phases (see FIG. 8). A coarse search is first performed by localizing the closest point to be within a particular segment of the curve. This is followed by an intense search within that segment. 
     Given a pair of patches B L  (s,t) and B R  (s,t) in canonical form and parameters aL, b L , a R , and b R , the present invention minimizes the area of the hole between the subcurves B L  (1,t)|b L  and B R  (0,t)|b R . In subsequent discussion on C 0  -continuity, the s-parameter is dropped since it remains a constant. The hole area can be computed as ##EQU1## where, ##EQU2## Here, g 0 , g 1 , g 2 , g 3  are the four control points of the Bezier curve B(t) and ##EQU3## This can further be simplified to the form [t 3  t 2  t 1] D M [g 0  g 1  g 2  g 3  ] T , where ##EQU4## 
     Note that the area of the hole is being estimated in &#34;rectilinear&#34; metric, in which distance between two points (x 1 ,y 1 ,z 1 ) and (x 2 ,y 2 ,z 2 ) is given by (|x 1  -y 2  |+|y 1  -y 2  |+|z 1  -z 2  |) as opposed to the usual Euclidean distance. This metric is chosen to keep the objective for the minimization problem simple (i.e., a linear function and NOT quadratic or higher order). Also, it may be noted that minimization must be done independently for each of the three dimensions, since the integral implies three separate components, namely: ##EQU5## In the discussion to follow superscripts X, Y, and Z are dropped for simplicity. 
     Since the function within integral involves absolute values it is necessary to be careful about sign changes. In particular, it is necessary to find within the range 0≦t≦1 all values of t at which the function becomes zero (i.e., roots of the function), and then decompose the integral into subranges defined by these roots. Since the function B L  (t)| a .sbsb.L b .sbsp.L -B R  (t)| a .sbsb.R b .sbsp.R is a cubic polynomial in t, it can have at most three roots. A routine must be written which returns all the real roots in the range 0 to 1, and sorted in an increasing order of value. 
     Let r i  &#39;s denote the real roots of the function in the range [0 . . . 1] given in increasing order of value. Then, in the most general case, when there are three roots r 1 , r 2 , r 3  ##EQU6## where G L  =[g 0   L  g 1   L  g 2   L  g 3   L  ] T , G R  =g 0   R  g 1   R  g 2   R  g 3   R , and the 1×4 matrix T&#39; is provided in the table below for different numbers of roots. 
     
         __________________________________________________________________________# Roots    1 × 4 Matrix T&#39;__________________________________________________________________________##STR1####STR2##2##STR3##3##STR4##__________________________________________________________________________ 
    
     Now, denote control points g 1   L , g 2   L , g 1   R , and g 2   R  by symbols W, X, Y, and Z, since these four control points will be perturbed for C 0  -continuity. (Recall that these four control points correspond to g L   31 , g L   32 , g R   01 , and g R   02 , respectively in patches.) Then, ##EQU7## 
     First an estimate is formed for the largest allowable perturbation, ε, of a control point during the minimization. This is computed in terms of the average width of the hole which could be approximated by ##EQU8## 
     The value of ε may be chosen to be 5% of this width. Minimization is performed in small steps depending on the value of ε, since the coefficients, h i , 0≦i≦4 of the objective are themselves dependent on the current values of W, X, Y, Z. If a control point is perturbed by too large an amount the actual coefficients h i  &#39;s may deviate too much from their computed values. The minimization method is given in FIG. 9. 
     Next, a minimization of the hole area between the relevant boundaries of the two adjoining tangent subcurves (instead of the spatial subcurves) is performed. Whereas, for C 0  -continuity the function ∫ 0   1  |(B L  (t)| a .sbsb.L b .sbsp.L)-(B R  (t)| a .sbsb.R b .sbsp.R |dt was minimized by perturbing patch-edge control points g L   31 , g L   32 , g R   01 , and g R   02  ; here, the area 
     
         ∫.sub.0.sup.1 |(δB.sub.L /δs(t)|.sub.a.sbsb.L.sup.a.sbsp.L)-δB.sub.R /δs(t)|.sub.a.sbsb.R.sup.b.sbsp.R)|dt 
    
     is minimized by perturbing patch-surface control points g L   21 , g L  22, g R   11 , and g R   12 . Note that the parameters a L , b L , a R , b R  remain the same for both the cases. 
     The left tangent curve δB L  /δs(1,t) after reparameterizing in the range t=a L  to b L  turns out to be of the form [t 3  t 2  t 1] E L  M G&#39; L , where ##EQU9## 
     Similarly the right tangent curve δB R  /δs(1,t) after reparameng in the range t=a R  to b R  turns out to be of the form [t 3  t 2  t 1] E R  M G&#39; R , where ##EQU10## 
     On similar lines as C 0  -continuity the roots of the function T E L  M G&#39; L  -T E R  M G&#39; R  are first estimated, then the integration is decomposed into different subranges, and the expression is rewritten after integration as T&#39;(E L  M G&#39; L  -E R  M G&#39; R ). See the table above for the different values of the 1×4 matrix T&#39;. (NOTE: In this case the coefficients of an equivalent cubic polynomial are computed as [c 0  c 1  c 2  c 3  ] T  =E L  M G&#39; L  E R  M G&#39; R .) 
     In order to form a linear program for minimization, let W, X, Y, and Z denote g L   21 , g L  22, g R   11 , and g R   12 . Then, the hole-area in the tangential space can be written as ##EQU11## and expressed in the form h 0  W+h 1  X+h 2  Y+h 3  Z+h 4 . The value of ε may then be computed as, say 5% of the mean hole-width, which in this case is given by ##EQU12## The second phase of this method is summarized in FIG. 10. 
     IMPLEMENTATIONAL DETAILS 
     In this section important routines are described from the implementation point-of-view--first, for Successive Merging (phase I) and then, for Patch Continuity (phase II). 
     Phase I: 
     readDatabase(IN: char fname[ ]) 
     A routine for reading input to the software. 
     createDataStructures() 
     Process the input for efficient memory and CPU usage. 
     triangleDiscontiruity(IN: TRIANGLE T1, T2; OUT: float w) 
     patchDiscontinuity(IN: PATCH P1, P2; OUT: float w) 
     Assign a weight, denoting `surface discontinuity`, to the triangle-pair (patch-pair) T1-T2 (P1-P2). Lower weight implies that the pair will be favored during combining. If the two triangles (patches) have no common side, the weight is set to infinity. 
     createDualGraphTriangles(OUT: GRAPH G) 
     createDualGraphPatches(OUT: GRAPH G) 
     Returns a weighted graph in which each node is a triangle (patch), each edge represents a triangle-pair (patch-pair) for which the `surface discontinuity` is finite, and each edge-weight is the `surface discontinuity` value for that triangle-pair (patch-pair). 
     minMatching(IN: GRAPH G; OUT: MATCHING M) 
     Defn: The MIN-matching M of a graph G is a subgraph of G such that: (i) no two edges in M share a common node, (ii) # of edges in M is the largest, and (iii) sum of weights of edges in M is as low as possible. This procedure returns an approximate MIN-matching of G. 
     orientPatches(IN-OUT: PATCH P1, P2) 
     Alter the s-t origin for the two patches P1 and P2 to a canonical form. These two patches will be combined later. 
     deg1deg1todeg1(IN: PATCH P1, P2; OUT: PATCH P) 
     deg1deg1todeg2(IN: PATCH P1, P2; OUT: PATCH P) 
     deg2deg2todeg2(IN: PATCH P1, P2; OUT: PATCH P) 
     deg2deg2todeg3(IN: PATCH P1, P2; OUT: PATCH P) 
     deg3deg3todeg3(IN: PATCH P1, P2; OUT: PATCH P) 
     The above routines take a pair of patches (degree 1/2/3) and approximate them by a single patch. The two patches taken as input are assumed to be in canonical form. 
     elevatedeg1todeg2(IN-OUT: PATCH P) 
     elevatedeg1todeg3(IN-OUT: PATCH P) 
     elevatedeg2todeg3(IN-OUT: PATCH P) 
     For a given patch, returns a patch with a higher degree. These routines will be used in deg?deg?todeg?() routines. 
     Phase II: 
     readInput(IN: char fname[ ]) 
     Reads the outputs generated of Phase I. This includes the set of patches and the last copy of the dual graph. 
     markC1continuityEdges(IN: Graph G; OUT: Boolean flag[num --  egdes]) 
     Among all edges of the dual graph (output of Phase I) mark those that are not separated by sharp edges. 
     cubicRoots(IN: float c 0 ,c 1 ,c 2 ,c 3  ; OUT: int nroots; float r 1 ,r 2 ,r 3 ) 
     Returns the roots of the cubic polynomial c 3  x 3  +c 2  x 2  +c 1  x+c 0 . The roots must be real nd must lie between 0 and 1. The number of such roots is returned in nroots, and the roots themselves sorted (increasing order) and returned in r i  &#39;s. 
     closestPoints(IN: Bezier Curve B; Point p; OUT: float s) 
     Returns the parameter s of the curve B such that out of all points on B, the point B(s) is closest to the given point p. 
     simplex(IN: float W 0 ,X 0 ,Y 0 ,Z 0 ,ε,c 0 ,c 1 ,c 2 ,c 3  ; OUT: float W&#39;,X&#39;,Y&#39;,Z&#39;) 
     Solves the 8-constraint, 4-variable, linear program using simplex and returns the optimal solution in W&#39;, X&#39;, Y&#39;, Z&#39;. 
     rotatepatch(IN: int num rot , Boolean flag; IN-OUT: Patch P) 
     Returns a (4×4) patch after rotating the given (4×4) patch P by num rot  steps clockwise if input flag is set or counterclockwise if input flag is not set. 
     COMPUTATIONAL RESULTS 
     Preliminary experiments with the disclosed method show that for an object with n triangles, this method produces close to n/16 bicubic Bezier patches. (The actual results are tabulated in FIG. 11.) Moreover, all sharp edges of the input object are preserved. Furthermore, the disclosed continuity methods produce a set of patches that are smooth and that on rendering provide high-quality images. 
     Numerous variations and modifications will become apparent to those skilled in the art once the above disclosure is fully appreciated. It is intended that the following claims be interpreted to embrace all such variations and modifications.