System and method for parametric surface representation from polygonal descriptions of arbitrary objects

Information

  • Patent Grant
  • 5999188
  • Patent Number
    5,999,188
  • Date Filed
    Monday, March 3, 1997
    27 years ago
  • Date Issued
    Tuesday, December 7, 1999
    24 years ago
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 "as-few-as-possible" 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.sup.0 - and C.sup.1 -continuity between a pair of patches B.sub.L (s,t) and B.sub.R (s,t), placed arbitrarily. The methods perturb the appropnate control points to achieve geometric continuities. For C.sup.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.sub.L (1,t) and B.sub.R (0,t). Similarly, to enforce C.sup.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 "as-few-as-possible" 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.sup.0 - and C.sup.1 -continuity between a pair of patches B.sub.L (s,t) and B.sub.R (s,t), placed arbitrarily. The methods perturb the appropriate control points to achieve geometric continuities. For C.sup.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.sub.L (1,t) and B.sub.R (0,t). Similarly, to enforce C.sup.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.sup.0 and C.sup.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 "as-few-as-possible" 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, "Automatic reconstruction of B-spline surfaces of arbitrary topological type," in Proc. SIGGRAPH '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, "Fitting smooth surfaces to dense polygon meshes," in Proc. SIGGRAPH '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.times.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.sup.0 - and C.sup.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 .vertline.V.vertline. is denoted by n and .vertline.E.vertline. by m. A set, T={t.sub.1, t.sub.2, . . . , t.sub.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.sub.i, 1.ltoreq.i.ltoreq.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..vertline.V.vertline./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.sub.i, 0.ltoreq.i.ltoreq.d, of control points. Control points g.sub.0 and g.sub.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.sub.ij, 0.ltoreq.ij.ltoreq.d of control points. Only control points g.sub.00, g.sub.0d, g.sub.d0, and g.sub.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.sub.00 -g.sub.0d -g.sub.d0 -g.sub.00, which is referred to as the base of that patch. The control points g.sub.01, g.sub.02, g.sub.d1, and g.sub.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).sub.a.sup.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 "combinable". 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 "best" 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.sub.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 "nearly" 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.degree..
Once the graph G.sub.c has been obtained, the maximum-cardinality matching of that graph gives the "best" 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.sup.3) time (e.g., J. Edmonds, "Paths, trees, and flowers," Canadian J. Math. 17 (1965) 449-467, and H. Gabow, "An efficient implementation of Edmonds algorithm for maximum matching on graphs," 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, "Maximales matching in graphen," 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.times.d, that represents a combination of a given pair of adjacent patches is obtained by sampling the two given patches at (d+1).sup.2 different points, followed by parameterizing the sampled points with respect to the larger patch, and then solving a system of (d+1).sup.2 linear equations for the (d+1).sup.2 new control points. If the application at hand requires greater accuracy, the patches can be sampled at even more than (d+1).sup.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.sub.L (s,t) and B.sub.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.sub.ij.sup.L and g.sub.ij.sup.R, 0.ltoreq.i,j.ltoreq.d, denote the control points for the left and right patches, respectively and g.sub.ij, 0.ltoreq.i,j.ltoreq.d+1 for the larger patch. It is assumed that control points g.sup.L.sub.d0 and g.sup.L.sub.dd are the same as g.sup.R.sub.00 and g.sup.R.sub.0d, respectively (or else, a pair of combinable patches is reoriented to satisfy this condition). Then g.sub.ij can be obtained in terms of g.sub.ij.sup.L and g.sub.ij.sup.R, as follows. Consider for example the case d=2. In this case, solving for g.sub.ij, 0.ltoreq.ij.ltoreq.3 (say, using MAPLE) is performed by using the following 16 equations:
B(0, 0)=B.sub.L (0, 0); B(0, 1/3)=B.sub.L (0, 1/3); B(0, 2/3)=B.sub.L (0, 2/3); B(0, 1)=B.sub.L (0, 1);
B(1/3, 0)=B.sub.L (2/3, 0); B(1/3,1/3)=B.sub.L (2/3, 1/3); B(1/3,2/3)=B.sub.L (2/3,2/3); B(1/3, 1)=B.sub.L (2/3, 1);
B(2/3, 0)=B.sub.R (1/3, 0); B(2/3, 1/3)=B.sub.R (1/3, 1/3); B(2/3, 2/3)=B.sub.R (1/3, 2/3); B(2/3, 1)=B.sub.R (1/3, 1);
B(1, 0)=B.sub.R (1, 0); B(1,1/3)=B.sub.R (1, 1/3); B(1, 2/3)=B.sub.R (1, 2/3); B(1, 1)=B.sub.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.sup.L.sub.21 +g.sup.R.sub.01)/2 in the expression for g.sub.11. Ideally such coordinates must be identical i.e., g.sup.L.sub.21 identical to g.sup.R.sub.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.sup.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.sup.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.sup.0 continuity. For C.sup.1 -continuity only a subset of these pairs are required to be considered; C.sup.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.sup.0 -continuity corresponding to the five edges of the dual graph (FIG. 1h). However, only 2 pairs of patches are required to satisfy C.sup.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.sup.0 -continuity for a given pair of bicubic patches is achieved by suitably perturbing edge control points g.sup.L.sub.31, g.sup.L.sub.32 of the left patch and edge control points g.sup.R.sub.01, g.sup.R.sub.02 of the right patch (assuming s-t axes are as shown in FIG. 4a), so that the two curves B.sub.L (1,t) and B.sub.R (0,t) get as close to each other as possible. Similarly, C.sup.1 -continuity is achieved by suitably perturbing surface control points g.sup.L.sub.21, g.sup.L.sub.22 of the left patch and g.sup.R.sub.11, g.sup.R.sub.12 of the right patch. In practice, first all optimizations for C.sup.0 -continuity are performed and then a similar procedure is repeated for C.sup.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.times.8 configurations by swapping the s- and t-axes themselves.) Conversion of a pair of patches into a fixed "canonical form" (i.e, discontinuity is across curves B.sub.L (1,t) and B.sub.R (0,t)) can be done by rotating the two patches counterclockwise a fixed number of times, given by rot.sub.L and rot.sub.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.sub.L (s,t) and B.sub.R (s,t) is converted into canonical form, the discontinuity is between curves B.sub.L (1,t) and B.sub.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.sub.L, b.sub.L, a.sub.R, and b.sub.R such that only the subcurves B.sub.L (1,t).vertline..sub.a.sbsb.L.sup.b.sbsp.L and B.sub.R (0,t).vertline..sub.a.sbsb.R.sup.b.sbsp.R are relevant.
One way to estimate these four parameters is to find for each endpoint of the curve B.sub.R (0,t) (i.e., B.sub.R (0,0) and B.sub.R (0,1)) the closest point on curve B.sub.L (1,t); and similarly, for each endpoint of B.sub.L (1,t) the closest point on curve B.sub.R (0,t). Parameters corresponding to the two closest points on B.sub.L (1,t) give a.sub.L and b.sub.L ; and similarly, the closest points on B.sub.R (0,t) for the two endpoints of B.sub.L (1,t) give a.sub.R and b.sub.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.sub.L (s,t) and B.sub.R (s,t) in canonical form and parameters aL, b.sub.L, a.sub.R, and b.sub.R, the present invention minimizes the area of the hole between the subcurves B.sub.L (1,t).vertline.b.sub.L and B.sub.R (0,t).vertline.b.sub.R. In subsequent discussion on C.sup.0 -continuity, the s-parameter is dropped since it remains a constant. The hole area can be computed as ##EQU1## where, ##EQU2## Here, g.sub.0, g.sub.1, g.sub.2, g.sub.3 are the four control points of the Bezier curve B(t) and ##EQU3## This can further be simplified to the form [t.sup.3 t.sup.2 t 1] D M [g.sub.0 g.sub.1 g.sub.2 g.sub.3 ].sup.T, where ##EQU4##
Note that the area of the hole is being estimated in "rectilinear" metric, in which distance between two points (x.sub.1,y.sub.1,z.sub.1) and (x.sub.2,y.sub.2,z.sub.2) is given by (.vertline.x.sub.1 -y.sub.2 .vertline.+.vertline.y.sub.1 -y.sub.2 .vertline.+.vertline.z.sub.1 -z.sub.2 .vertline.) 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.ltoreq.t.ltoreq.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.sub.L (t).vertline..sub.a.sbsb.L.sup.b.sbsp.L -B.sub.R (t).vertline..sub.a.sbsb.R.sup.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.sub.i '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.sub.1, r.sub.2, r.sub.3 ##EQU6## where G.sub.L =[g.sub.0.sup.L g.sub.1.sup.L g.sub.2.sup.L g.sub.3.sup.L ].sup.T, G.sub.R =g.sub.0.sup.R g.sub.1.sup.R g.sub.2.sup.R g.sub.3.sup.R, and the 1.times.4 matrix T' is provided in the table below for different numbers of roots.
__________________________________________________________________________# Roots 1 .times. 4 Matrix T'__________________________________________________________________________ ##STR1## ##STR2##2 ##STR3##3 ##STR4##__________________________________________________________________________
Now, denote control points g.sub.1.sup.L, g.sub.2.sup.L, g.sup.1.sup.R, and g.sub.2.sup.R by symbols W, X, Y, and Z, since these four control points will be perturbed for C.sup.0 -continuity. (Recall that these four control points correspond to g.sup.L.sub.31, g.sup.L.sub.32, g.sup.R.sub.01, and g.sup.R.sub.02, respectively in patches.) Then, ##EQU7##
First an estimate is formed for the largest allowable perturbation, .epsilon., 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 .epsilon. may be chosen to be 5% of this width. Minimization is performed in small steps depending on the value of .epsilon., since the coefficients, h.sub.i, 0.ltoreq.i.ltoreq.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.sub.i '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.sup.0 -continuity the function .intg..sub.0.sup.1 .vertline.(B.sub.L (t).vertline..sub.a.sbsb.L.sup.b.sbsp.L)-(B.sub.R (t).vertline..sub.a.sbsb.R.sup.b.sbsp.R .vertline.dt was minimized by perturbing patch-edge control points g.sup.L.sub.31, g.sup.L.sub.32, g.sup.R.sub.01, and g.sup.R.sub.02 ; here, the area
.intg..sub.0.sup.1 .vertline.(.delta.B.sub.L /.delta.s(t).vertline..sub.a.sbsb.L.sup.a.sbsp.L)-.delta.B.sub.R /.delta.s(t).vertline..sub.a.sbsb.R.sup.b.sbsp.R).vertline.dt
is minimized by perturbing patch-surface control points g.sup.L.sub.21, g.sup.L 22, g.sup.R.sub.11, and g.sup.R.sub.12. Note that the parameters a.sub.L, b.sub.L, a.sub.R, b.sub.R remain the same for both the cases.
The left tangent curve .delta.B.sub.L /.delta.s(1,t) after reparameterizing in the range t=a.sub.L to b.sub.L turns out to be of the form [t.sup.3 t.sup.2 t 1] E.sub.L M G'.sub.L, where ##EQU9##
Similarly the right tangent curve .delta.B.sub.R /.delta.s(1,t) after reparameng in the range t=a.sub.R to b.sub.R turns out to be of the form [t.sup.3 t.sup.2 t 1] E.sub.R M G'.sub.R, where ##EQU10##
On similar lines as C.sup.0 -continuity the roots of the function T E.sub.L M G'.sub.L -T E.sub.R M G'.sub.R are first estimated, then the integration is decomposed into different subranges, and the expression is rewritten after integration as T'(E.sub.L M G'.sub.L -E.sub.R M G'.sub.R). See the table above for the different values of the 1.times.4 matrix T'. (NOTE: In this case the coefficients of an equivalent cubic polynomial are computed as [c.sub.0 c.sub.1 c.sub.2 c.sub.3 ].sup.T =E.sub.L M G'.sub.L E.sub.R M G'.sub.R.)
In order to form a linear program for minimization, let W, X, Y, and Z denote g.sup.L.sub.21, g.sup.L 22, g.sup.R.sub.11, and g.sup.R.sub.12. Then, the hole-area in the tangential space can be written as ##EQU11## and expressed in the form h.sub.0 W+h.sub.1 X+h.sub.2 Y+h.sub.3 Z+h.sub.4. The value of .epsilon. 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.sub.-- 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.sub.0,c.sub.1,c.sub.2,c.sub.3 ; OUT: int nroots; float r.sub.1,r.sub.2,r.sub.3)
Returns the roots of the cubic polynomial c.sub.3 x.sup.3 +c.sub.2 x.sup.2 +c.sub.1 x+c.sub.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.sub.i '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.sub.0,X.sub.0,Y.sub.0,Z.sub.0,.epsilon.,c.sub.0,c.sub.1,c.sub.2,c.sub.3 ; OUT: float W',X',Y',Z')
Solves the 8-constraint, 4-variable, linear program using simplex and returns the optimal solution in W', X', Y', Z'.
rotatepatch(IN: int num.sub.rot, Boolean flag; IN-OUT: Patch P)
Returns a (4.times.4) patch after rotating the given (4.times.4) patch P by num.sub.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.
Claims
  • 1. A method for forming a compact representation of a physical object, comprising:
  • scanning a plurality of points on the physical object;
  • converting the plurality of points into a set of triangles with vertices and vertex normals, wherein said set of triangles describes the appearance of the object;
  • forming a first dual graph of the set of triangles, wherein nodes of the dual graph correspond to triangles in the set of triangles, and wherein edges of the dual graph correspond to junctions between triangles in the set of triangles;
  • removing from the first dual graph a first set of edges representing (i) sharp edges of the object, (ii) junctions between triangles which may be combined to form a larger triangle;
  • processing remaining edges of the first dual graph to determine a first maximum cardinality matching specifying a first set of disjoint pairs; and
  • combining said disjoint pairs of said first set of disjoint pairs to form a set of degree-1 patches.
  • 2. The method of claim 1, wherein said sharp edges are defined to be junctions across which vertex normals differ by more than a predetermined amount.
  • 3. The method of claim 1, wherein said maximum cardinality matching is determined algorithmically.
  • 4. The method of claim 1, further comprising the steps of:
  • elevating unpaired triangles to degree-1 patches;
  • forming a second dual graph of the set of degree-1 patches;
  • removing from the second dual graph a second 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;
  • processing remaining edges of the second dual graph to determine a second maximum cardinality matching specifying a second set of disjoint pairs; and
  • combining said disjoint pairs to form a set of degree-2 patches.
  • 5. The method of claim 4, further comprising the steps of:
  • elevating unpaired degree-1 patches to degree-2 patches;
  • forming a third dual graph of the set of degree-2 patches;
  • removing from the third dual graph a third 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;
  • processing remaining edges of the third dual graph to determine a third maximum cardinality matching specifying a third set of disjoint pairs;
  • combining said disjoint pairs to form a set of degree-3 patches; and
  • elevating unpaired degree-2 patches to degree-3 patches.
  • 6. The method of claim 5,further comprising the steps of:
  • forming a dual graph of the set of degree-3 patches;
  • 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;
  • processing remaining edges of the dual graph to determine a maximum cardinality matching specifying a set of disjoint pairs; and
  • combining said disjoint pairs to form a second set of degree-3 patches.
  • 7. The method of claim 5, further comprising the steps of:
  • calculating a hole area between a pair of adjacent patches, wherein said adjacent patches each possess associated patch-edge control points;
  • determining perturbation limits for patch-edge control points; and
  • reducing the hole area by perturbing said patch-edge control points within said perturbation limits.
  • 8. The method of claim 5, further comprising the steps of:
  • calculating a tangential hole area between a pair of adjacent patches, wherein said adjacent patches each possess associated patch-surface control points;
  • determining perturbation limits for patch-surface control points; and
  • reducing the tangential hole area by perturbing said patch-surface control points within said perturbation limits.
  • 9. A method for forming an improved compact representation of a physical object, wherein the method comprises:
  • scanning a plurality of points on the physical object;
  • converting the plurality of points into a set of triangles with vertices and vertex normals wherein said set of triangles describes the appearance of the object;
  • forming a first dual graph of the set of triangles, wherein nodes of the dual graph correspond to triangles in the set of triangles, and wherein edges of the dual graph correspond to junctions between triangles in the set of triangles;
  • removing from the first dual graph a first set of edges representing (i) sharp edges of the object, (ii) junctions between triangles which may be combined to form a larger triangle;
  • processing remaining edges of the first dual graph to determine a first maximum cardinality matching specifying a first set of disjoint pairs; and
  • combining said disjoint pairs of said first set of disjoint pairs to form a set of Bezier patches;
  • calculating a hole area between a pair of adjacent Bezier patches, wherein said patches each possess associated patch-edge control points;
  • determining perturbation limits for patch-edge control points; and
  • reducing the hole area by perturbing said patch-edge control points within said perturbation limits, wherein said reducing operates to improve the digitized appearance of the object.
  • 10. The method of claim 9, further comprising the steps of:
  • calculating a tangential hole area between a pair of adjacent Bezier patches, wherein said patches each possess associated patch-surface control points;
  • determining perturbation limits for patch-surface control points; and
  • reducing the tangential hole area by perturbing said patch-surface control points within said perturbation limits, wherein said tangential hole area reducing operates to improve the digitized appearance of the object.
  • 11. The method of claim 9, wherein said control point perturbations are determined by using the simplex method on a function for the hole area with said perturbation limits.
  • 12. A method for forming an improved compact representation of a physical object, wherein the method comprises:
  • scanning a plurality of points on the physical object;
  • converting the plurality of points into a set of triangles with vertices and vertex normals, wherein said set of triangles describes the appearance of the object;
  • forming a first dual graph of the set of triangles, wherein nodes of the dual graph correspond to triangles in the set of triangles, and wherein edges of the dual graph correspond to junctions between triangles in the set of triangles;
  • removing from the first dual graph a first set of edges representing (i) sharp edges of the object, (ii) junctions between triangles which may be combined to form a larger triangle;
  • processing remaining edges of the first dual graph to determine a first maximum cardinality matching specifying a first set of disjoint pairs; and
  • combining said disjoint pairs of said first set of disjoint pairs to form a set of Bezier patches having a second dual graph with edges representing junctions between adjacent patches;
  • calculating a hole area for each edge in the second dual graph;
  • sorting edges into non-increasing hole-area order; and
  • minimizing hole areas in sorted order for each edge having a hole area larger than a predetermined value, wherein said minimizing operates to improve the digitized appearance of the object.
  • 13. The method of claim 12, further comprising the step of repeating hole area calculation, sorting, and minimization.
  • 14. The method of claim 12, wherein the patches each have associated patch-edge control points, wherein the minimization step includes:
  • determining perturbation limits for patch-edge control points; and
  • reducing the hole area by perturbing said patch-edge control points within said perturbation limits, wherein said control point perturbations are determined by using the simplex method with said perturbation limits on a function for the hole area.
  • 15. The method of claim 14, further comprising:
  • removing from the second dual graph edges representing sharp junctions between adjacent patches;
  • calculating a tangential hole area for each remaining edge in the second dual graph;
  • sorting edges into non-increasing tangential-hole-area order; and
  • minimizing tangential hole areas in sorted order for each edge having a tangential hole area larger than a predetermined value.
  • 16. The method of claim 15, wherein the patches each have associated patch-surface control points, wherein the minimization step includes:
  • determining perturbation limits for patch-surface control points; and
  • reducing the hole area by perturbing said patch-surface control points within said perturbation limits, wherein said control point perturbations are determined by using the simplex method with said perturbation limits on a function for the tangential hole area.
US Referenced Citations (1)
Number Name Date Kind
5894308 Isaacs Apr 1999
Non-Patent Literature Citations (8)
Entry
Cohen et al., "Simplification Envelopes", Computer Graphics Proceedings, pp. 119-127, Aug. 1996.
Eck et al., Technical Report entitled, "Automatic Reconstruction of B-Spline Surfaces of Arbitrary Topological Type," pp. 1-17, (a) & (b).
Hoppe et al., "Surface Reconstruction from Unorganized Points," Computer Graphics, vol. 26, Jul. 2, 1992, pp. 71-78.
Shantz et al., "Shading Bicubic Patches," Computer Graphics, vol. 21, No. 4, Jul. 1987, pp. 189-195.
Krishnamurthy et al., "Fitting Smooth Surfaces to Dense Polygon Meshes," Department of Computer Science, Stanford University, Stanford, CA, 1996, pp. 1-12.
Lien et al., "Adaptive Forward Differencing for Rendering Curves and Surfaces," Computer Graphics, vol. 21, No. 4, Jul. 1987, pp. 111-117.
Peters, J., Designing Fair Curves and Surfaces, SIAM, 1994, pp. 273-293.
Halstead et al., "Reconstructing Curved Surfaces From Specular Reflection Patterns Using Spline Surface Fitting of Normals," University of California at Berkeley, 1996, pp. 1-7.