a graph-constructive approach to solving systems of ... · pdf filea graph-constructive...

38
A Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and CHRISTOPH M. HOFFMANN Purdue University A graph-constructive approach to solving systems of geometric constraints capable of effi- ciently handling well-constrained, overconstrained, and underconstrained configurations is presented. The geometric constraint solver works in two phases: in the analysis phase the constraint graph is analyzed and a sequence of elementary construction steps is derived, and then in the construction phase the sequence of construction steps is actually carried out. The analysis phase of the algorithm is described in detail, its correctness is proved, and an efficient algorithm to realize it is presented. The scope of the graph analysis is then extended by utilizing semantic information in the form of angle derivations, and by extending the repertoire of the construction steps. Finally, the construction phase is briefly discussed. Categories and Subject Descriptors: H.5.2 [Information Interfaces and Presentation]: User Interfaces; I.1.3 [Algebraic Manipulation]: Languages and Systems; I.3.5 [Computer Graphics]: Computational Geometry and Object Modeling; J.6 [Computer Applications]: Computer-Aided, Engineering General Terms: Design Additional Key Words and Phrases: Complexity, constraint solving, geometric constraints, graph-based constraint solvers, underconstrained systems 1. INTRODUCTION The problem of solving systems of geometric constraints is central to numerous applications, such as computer-aided design and manufacturing This work was supported in part by ONR contract N00014-90-J-1599, and by NSF grants CDA 92-23502, ECD 88-03017, and CCR 95-05745. I. Fudos’ work was supported in part by a Purdue Research Foundation Fellowship. This and related reports are available via anony- mous ftp to ^ftp.cs.purdue.edu& under pub/cmh/Reports and subsidiaries. Authors’ addresses: I. Fudos, Department of Computer Science, University of Ioannina, 45110 Ioannina, Greece; email: ^[email protected]&; C. M. Hoffmann, Department of Computer Science, Purdue University, West Lafayette, IN 47907-1398; email: ^[email protected]&. Permission to make digital / hard copy of part or all of this work for personal or classroom use is granted without fee provided that the copies are not made or distributed for profit or commercial advantage, the copyright notice, the title of the publication, and its date appear, and notice is given that copying is by permission of the ACM, Inc. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or a fee. © 1997 ACM 0730-0301/97/0400 –0179 $03.50 ACM Transactions on Graphics, Vol. 16, No. 2, April 1997, Pages 179 –216.

Upload: ngobao

Post on 14-Mar-2018

220 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

A Graph-Constructive Approach to SolvingSystems of Geometric Constraints

IOANNIS FUDOSUniversity of IoanninaandCHRISTOPH M. HOFFMANNPurdue University

A graph-constructive approach to solving systems of geometric constraints capable of effi-ciently handling well-constrained, overconstrained, and underconstrained configurations ispresented. The geometric constraint solver works in two phases: in the analysis phase theconstraint graph is analyzed and a sequence of elementary construction steps is derived, andthen in the construction phase the sequence of construction steps is actually carried out. Theanalysis phase of the algorithm is described in detail, its correctness is proved, and anefficient algorithm to realize it is presented. The scope of the graph analysis is then extendedby utilizing semantic information in the form of angle derivations, and by extending therepertoire of the construction steps. Finally, the construction phase is briefly discussed.

Categories and Subject Descriptors: H.5.2 [Information Interfaces and Presentation]:User Interfaces; I.1.3 [Algebraic Manipulation]: Languages and Systems; I.3.5 [ComputerGraphics]: Computational Geometry and Object Modeling; J.6 [Computer Applications]:Computer-Aided, Engineering

General Terms: Design

Additional Key Words and Phrases: Complexity, constraint solving, geometric constraints,graph-based constraint solvers, underconstrained systems

1. INTRODUCTION

The problem of solving systems of geometric constraints is central tonumerous applications, such as computer-aided design and manufacturing

This work was supported in part by ONR contract N00014-90-J-1599, and by NSF grants CDA92-23502, ECD 88-03017, and CCR 95-05745. I. Fudos’ work was supported in part by aPurdue Research Foundation Fellowship. This and related reports are available via anony-mous ftp to ^ftp.cs.purdue.edu& under pub/cmh/Reports and subsidiaries.Authors’ addresses: I. Fudos, Department of Computer Science, University of Ioannina, 45110Ioannina, Greece; email: ^[email protected]&; C. M. Hoffmann, Department of Computer Science,Purdue University, West Lafayette, IN 47907-1398; email: ^[email protected]&.Permission to make digital / hard copy of part or all of this work for personal or classroom useis granted without fee provided that the copies are not made or distributed for profit orcommercial advantage, the copyright notice, the title of the publication, and its date appear,and notice is given that copying is by permission of the ACM, Inc. To copy otherwise, torepublish, to post on servers, or to redistribute to lists, requires prior specific permissionand / or a fee.© 1997 ACM 0730-0301/97/0400–0179 $03.50

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997, Pages 179–216.

Page 2: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

[Hoffmann and Juan 1993; Roller 1989], stereochemistry [Crippen andHavel 1988; Dress and Havel 1988], kinematic analysis of robots and othermechanisms [Kramer 1992], and robot motion planning.

In CAD/CAM applications the user draws a sketch and annotates it withgeometric constraints. Overconstrained and underconstrained configura-tions may occur, deliberately or erroneously. Figure 1 illustrates a casewhere one of the four 90° angles and one of the three distances (length ofAB, length of DE, and length of EC) are redundant. However, the configu-ration is not well-constrained since the length of b is not well specified orderivable.

For applications where large constraint systems are not uncommon, it isimportant to develop efficient algorithms for solving the specified con-straint systems with interactive speed [Owen 1993].

Rigorous characterizations of the correctness and scope of the constraintsolving methods are needed to decide the suitability of such methods toapplications.

Finally, techniques for navigating the solvers to meaningful and intuitivesolutions are necessary for providing useful solutions (see e.g., Hoffmann[1993]).

There are many attempts in the literature to provide a powerful yetefficient method for solving systems of geometric constraints that addressthe preceding requirements with varying success. Among them, we distin-guish three broad classes of geometric constraint solvers. For an extensivereview the reader is referred to Fudos [1995].

Fig. 1. A system of geometric constraints defining a rectangle that is consistently overcon-strained but is not well-determined since its height is not specified.

180 • I. Fudos and C. M. Hoffmann

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 3: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

In numerical constraint solvers1 the constraints are translated into asystem of algebraic equations and are solved using iterative methods. Tohandle the exponential number of solutions and the large number ofparameters iterative methods require sharp initial guesses. Most iterativemethods have difficulties handling overconstrained or underconstrainedinstances. A sophisticated use of the Newton-Raphson method was devel-oped in Light and Gossard [1982], where an improved way for finding theinverse Jacobian matrix is presented. In this work, when the Jacobianmatrix is singular, a modified version of Doolittle’s method is used. How-ever, such methods can only handle specific cases of ill-constrained config-urations.

Rule-constructive solvers2 use rewrite rules for the discovery and execu-tion of the construction steps. In this approach, complex constraints can beeasily handled, and extensions to the scope of the method are straightfor-ward to incorporate. A method is presented in Suzuki et al. [1990], wherehandling of overconstrained and underconstrained problems is given spe-cial consideration. Although rule-constructive solvers provide a good ap-proach for prototyping and experimentation, the extensive computationsinvolved in the exhaustive searching and matching make it inappropriatefor real world applications.

The graph-constructive method3 is based on an analysis of the constraintgraph and consists of two phases. During the first phase the graph ofconstraints is analyzed and a sequence of construction steps is derived.During the second phase these construction steps are followed to place thegeometry. The graph analysis provides the means for developing rigorousand efficient methods. Owen [1991] describes a quadratic algorithm forhandling well-constrained configurations. Ait-Aoudia et al. [1993] presentan algorithm for isolating well-constrained subsystems of algebraic equa-tions describing geometric constraints. Finally, Kramer [1992], using tech-niques from kinematics, attempts to determine a solution that satisfies thespecified constraints by analyzing the degrees of freedom.

In this article we extend our graph-constructive approach [Bouma et al.1995; Foudos and Hoffmann 1995] to solving systems of geometric con-straints based on an analysis of the constraint graph that derives asequence of elementary construction steps. More specifically,

—A graph-constructive method capable of handling over-, under-, andwell-constrained configurations is presented.

—Efficient algorithms to analyze the constraint graph are introduced andtheir worst-case time complexity is derived.

1Please see Sutherland [1963], Gosling [1983], Nelson [1985], Serrano and Gossard [1986], andLight and Gossard [1982].2Please see Bruderlin [1986], Aldefeld [1988], Suzuki et al. [1990], Sunde [1988], Yamaguchiand Kimura [1990], Verroust et al. [1992], and Juan-Arinyo and Soto [1995].3Please see Owen [1991], Kramer [1992], Ait-Aoudia et al. [1993], Bouma et al. [1995], andFudos and Hoffmann [1995].

Systems of Geometric Constraints • 181

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 4: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

—The method is formally studied as a rewrite system of sets and itscorrectness is proved. Note that the behavior of the analysis for well-constrained problems has been reported before in Foudos and Hoffmann[1995].

—Extensions are presented that increase the scope of the core analysistechniques.

—The construction phase is briefly presented, its algorithmic complexity isstudied, and the problem of avoiding complex coordinates is discussed.

Section 2 provides an overview of our approach. Section 3 describes thereduction analysis for solving well-constrained and overconstrained config-urations. The decomposition analysis for handling underconstrained config-urations is presented in Section 4. Section 5 presents extensions thatincrease the scope of the core reduction analysis. Section 6 briefly describesthe construction phase, derives its complexity, and discusses the problem offinding a solution with real number coordinates. Finally, Section 7 offersconclusions.

2. OVERVIEW AND BACKGROUND

A geometric constraint problem is given by a set of points, lines, rays,circles with prescribed radii, line segments, and circular arcs, called thegeometric elements, along with required relationships of incidence, dis-tance, angle, parallelism, concentricity, tangency, and perpendicularitybetween any two geometric elements, called the constraints. As explainedin Fudos [1993], with an appropriate representation and some preprocess-ing we may restrict ourselves to points and lines, with pairwise distanceand angle constraints. The geometric constraint problem is then formulatedas follows.

Given a set V of n points and lines and a set E of pairwise constraintsamong them, find an intuitive solution that satisfies the given constraints. Apairwise constraint may be one of: point-line distance and line-line angle,nonzero point-point distance. More formally, E is a partial mapping E: V 3V 3 R.

The problem can be coded as a constraint graph G 5 (V, E), in which thegraph nodes are the geometric elements and the constraints are the graphedges. The edges of the graph are labeled with the values of the distanceand angle dimensions.

Example 1. Figure 2 shows a dimensioned sketch defining a constraintproblem involving 4 lines and 6 points. We have 8 implicit point-linedistances that are 0, 2 explicit point-line distances, 3 angles, and 4point-point distances. Figure 3 shows the corresponding constraint graph.

182 • I. Fudos and C. M. Hoffmann

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 5: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

2.1 A Graph-Constructive Method for Geometric Constraint Solving

Our constraint-solving method first forms a number of rigid bodies4 withthree degrees of freedom, called clusters. For simplicity we assume that amaximum number of clusters is formed, each cluster consisting of exactlytwo geometric elements between which there exists a constraint.

Three clusters can be combined into a single cluster if they pairwiseshare a single geometric element. Geometrically, the combination corre-sponds to placing the associated geometric objects with respect to eachother so that the given constraints can be satisfied.

The constraint-solving method works in the following conceptual phases.

—Phase 1 (analysis phase): The constraint graph is analyzed and a se-quence of constructions is stipulated. Each step in this sequence corre-sponds to positioning three rigid geometric bodies (clusters) that pairwiseshare a geometric element (point or line).

—Phase 2 (construction phase): The actual construction of the geometricelements is carried out, in the order determined by Phase 1, by solvingcertain standard sets of algebraic equations.

4A rigid body is a set of geometric elements whose position and orientation relative to eachother is known.

Fig. 2. A well-constrained sketch defining a constraint problem with 10 geometric elementsand 17 constraints.

Systems of Geometric Constraints • 183

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 6: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

To illustrate the process, consider three points A, B, and C betweenwhich distances have been prescribed, as shown in Figure 4, left. Theassociated constraint graph is shown on the right. In Phase 1 of theconstraint solving, we determine first that every pair of points can beconstructed separately, resulting in three clusters. Moreover, the threeclusters can be combined into a single cluster since they share pairwise ageometric element. The combination merges the three clusters into one. Assoon as a single cluster is obtained, Phase 1 considers the constraintproblem solvable.

Phase 1, the analysis phase, consists of two parts:

—the reduction analysis (Section 3) that produces a sequence of localcluster merges and handles well-constrained and overconstrained prob-lems, and

—the decomposition analysis (Section 4) that produces a sequence ofdecompositions (that correspond to a reverse sequence of cluster merges)and handles underconstrained cases. The outcome of the reduction anal-ysis is fed as input to the decomposition analysis.

Phase 2, the construction phase, is briefly discussed in Section 6.

2.2 Multiple Solutions and Root Identification

It is well known that a well-constrained geometric problem can have manyincongruent solutions. At each construction step we may have to choose oneof several solutions. Therefore, different choices may lead to incongruent

Fig. 3. The constraint graph of the previous sketch.

184 • I. Fudos and C. M. Hoffmann

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 7: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

geometric placements, each mathematically satisfying the given con-straints.

In order to select a solution at each step, a number of heuristics areapplied that make sense if the sketch with which the geometric problemhas been specified has the same topological order type as the intendedsolution. This is an application-specific issue that is further discussed inBouma et al. [1995].

We assume that the geometric problem has been specified by a user-prepared sketch. The point-line distances, and the angles between orientedlines are assumed to be signed quantities. The correct sign is determinedfrom the original input sketch. Observing the sign conventions, all con-struction steps have a unique solution except in certain cases, which aresolved as follows.

(1) The relative placement of three points in a construction step has thesame cyclic ordering in the plane as the ordering of the points in theoriginal drawing (Figure 5, left).

(2) The relative placement of two points and an oriented line is such thatthe inner product of the direction vector of the points and the line issign invariant between the original sketch and in the chosen solution(Figure 5, right).

The geometric construction first places three geometric elements in thismanner, and then applies a rigid-body transformation to align the threeclusters accordingly. In particular, placing clusters by the shared geometricelements does not involve a reflection. We later show that in well-con-strained configurations no matter in which order the clusters are combined,the same set of geometry triples is used to select the geometric solution,and that this implies congruence.

Note that the heuristics only imply the existence of a solution in ageneric sense. Specific dimensions of distance and angle could be such thatthe solution selected by the heuristics would require complex coordinates.If this possibility is to be systematically excluded, some strategy would berequired that searches the solution space in a canonical order. As the spaceof possible solutions may be exponential in the number of geometricelements, this is not an attractive prospect. In the case of ruler-construct-

Fig. 4. Constraint problem (left), and associated constraint graph (right).

Systems of Geometric Constraints • 185

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 8: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

ible configurations, there is a theorem by Hilbert stating that if onesolution has only real coordinates, then all of them must have realcoordinates [Hilbert 1956]. This means that for such configurations theheuristics will never fail to deliver a solution if one exists. The theoremdoes not generalize to ruler-and-compass constructible problems, and weknow of no results that make progress beyond Hilbert’s theorem. Theproblem of finding a real solution of a system of geometric constraints isfurther considered in Section 6.2.

2.3 Well-Constrained, Overconstrained and Underconstrained Problems

Each line5 or point on the Euclidean plane has two degrees of freedom.Each distance or angle corresponds to one equation. If we have no fixedgeometric elements (geometric elements whose absolute coordinates havebeen specified explicitly by the user), then we expect that

uE u 5 2 uV u 2 3, where uV u 5 n.

Recall that uVu is the number of geometric elements and that uEu is thenumber of constraints. Note that the solution will be a rigid body withthree remaining degrees of freedom because the constraints determine onlythe relative position of the geometric elements. We use this argument todefine a technical notion of well-constrained sketches in which no attemptis made to account for the possibility that for special dimension values anotherwise well-constrained problem may happen to be underconstrained.An example is shown in Figure 6. In the figure, the vertex P of thequadrilateral has a well-defined position when a 1 b Þ 90°. But for a 1 b 590° the position of P is not determined. This “semantic” notion of well-constrained problems is too specific for the constraint graph analysis becausethere the generic problem of constructing a solution is considered independentof dimension values.

Intuitively, a dimensioned sketch is considered to be well-constrained ifit has a finite number of solutions for nondegenerate configurations.Similarly, a dimensioned sketch is considered to be underconstrained if ithas an infinite number of solutions for nondegenerate configurations.

5Points and lines are projective duals, hence must have the same number of degrees offreedom.

Fig. 5. (left) Relative placement of three points; (right) relative placement of a line and twopoints.

186 • I. Fudos and C. M. Hoffmann

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 9: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

Finally, a dimensioned sketch is considered to be overconstrained if it hasno solutions for nondegenerate configurations.

The preceding intuitive notions can be made technically precise asfollows.

Definition 1. A graph with n nodes is structurally overconstrained ifthere is an induced subgraph with m # n nodes and more than 2m 2 3edges.

Definition 2. A graph is structurally underconstrained if it is not struc-turally overconstrained, and the number of edges is less than 2n 2 3.

Definition 3. A graph is structurally well-constrained if it is not struc-turally overconstrained, and the number of edges is equal to 2n 2 3.

Definition 4. A geometric constraint problem with a structurally over-,under- or well-constrained constraint graph is called a structurally over-,under- or well-constrained problem, respectively.

For an algorithm to test whether a graph is structurally well-con-strained, see, for example, Imai [1985] and Sugihara [1985]. Note that astructurally well-constrained graph can be overconstrained in a geometricsense, for example, if there are three lines with pairwise angle constraints.

The core reduction analysis handles structurally well-constrained andover-constrained problems. Section 3 presents this method in detail, to-gether with a correctness proof and an efficient algorithm to realize it.Section 4 presents the decomposition analysis that handles structurallyunderconstrained problems.

3. THE REDUCTION ANALYSIS

We are given a constraint graph G 5 (V, E) whose nodes V are geometricelements, and whose edges E are the geometric constraints. Without loss ofgenerality, the geometric elements consist only of points and lines, and theconstraints are only distance and angle.

We consider sets S whose elements are sets C that, in turn, have aselements nodes of G. Each set C represents a cluster. Intuitively, a cluster

Fig. 6. Degenerate configuration (right) for a 1 b 5 90°.

Systems of Geometric Constraints • 187

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 10: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

C consists of geometric elements whose position relative to each other hasalready been determined. A cluster thus can be considered a rigid geomet-ric structure that has three degrees of freedom, two translational and onerotational.

Initially, we form a set SG from G. For each edge e 5 (u, v) in G, there isa cluster Ce 5 {u, v}. The construction steps that solve the constraintproblem amount to one reduction step that merges three clusters whosepairwise intersection is a singleton. The reduction is denoted by 3. Theprocess of finding a sequence of reductions that derives a single set ofclusters, and thus determines a sequence of construction steps that posi-tions the geometric elements to satisfy the initial set of constraints, iscalled reduction analysis.

Example 2. To better illustrate the process of the reduction analysis,consider the constraint graph of Figure 3. After detecting a sequence ofcluster merges, we end up with three clusters, U, V, and W, as shown inFigure 7. The analysis concludes by merging the three clusters into one.

Fig. 7. Finding the clusters of the graph.

188 • I. Fudos and C. M. Hoffmann

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 11: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

3.1 Correctness

In Fudos and Hoffmann [1995], we considered clusters as sets and studiedtheir structure under reduction. Given the constraint graph G 5 (V, E), wedefine the set of clusters

SG 5 $$u, v%:~u, v! [ E%.

Cluster sets are rewritten using a reduction3. The reduction3 is formallydefined as follows.

Definition 5. Let S be a set of clusters C in which there are threeclusters C1, C2, C3 such that

C1 ù C2 5 $ g1%

C2 ù C3 5 $ g2%

C3 ù C1 5 $ g3%,

where g1, g2, g3 are distinct; then

C3 C9,

where

C95 ~C ø $S1 ø S2 ø S3%! 2 $S1,S2,S3%.

We proved first a weak notion of correctness: if the constraint graph isnot structurally overconstrained, then our method reduces the initial setSG to the same (irreducible) set, no matter in which order the reductionsteps are applied. That is, the set SG and the reduction 3 are a terminat-ing, confluent rewriting system (see e.g., Rosen [1973]).

Here confluent means that if a set A can be reduced to two different setsB1 and B2, then there are two reduction sequences, one reducing B1, theother B2 to the same set C.

Notice, however, that a well-constrained geometric problem has in gen-eral several incongruent solutions (see Section 2.2). In Fudos and Hoff-mann [1995], we proved therefore a stronger uniqueness theorem. If theconstraint graph is well-constrained and our algorithm reduces the initialset SG to a single cluster using, in the construction phase, the placementrules given in Section 2.2, then the solutions derived by different reductionsequences place a fixed set of triples of geometric elements in the samerelative position. This result implies that different reduction sequencesmust produce geometric solutions that are congruent.

3.2 An Efficient Reduction Algorithm

In this section we provide an algorithm that runs in time quadratic in thenumber of geometric elements and constraints and realizes correctly thereduction analysis.

Systems of Geometric Constraints • 189

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 12: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

Let G 5 (V, E) be the constraint graph. Let n 5 uVu and e 5 uEu. Thealgorithm has an O(n2) worst case time complexity for constraint graphsthat are not structurally overconstrained. We can also show that we cantest, in the same time bound, whether the graph is structurally overcon-strained (see Section 3.3). For the purposes of the algorithm we alsoconsider an undirected cluster graph H whose vertices are the edges andvertices of G. H has an edge (e, v) iff there is an edge e [ E and e is incidentto v in G. Note that H is bipartite.

The initial cluster graph H records clusters of size 2 in G. H is bipartite,with one set of vertices corresponding to clusters, initially the edges of G,the other corresponding to the geometric elements of the constraint prob-lem, the vertices of G. There is an edge in H if a vertex of G belongs to acluster.

In this section we assume that G is not structurally overconstrained,thus every subgraph Gs 5 (Vs, Es) of G satisfies uEsu # 2uVsu 2 3.

3.2.1 Overview. The algorithm for solving the constraint graph is asfollows.

(1) Construct initial clusters of size 2, each consisting of two adjacentvertices of G.

(2) Construct the cluster graph H.(3) Find all triangles in G.(4) Successively rewrite H by replacing a 6-cycle in H by a 4-node structure

as explained in the following. Record a cluster merging operation foreach such rewriting step.

(5) If H can be rewritten into a final graph that is a star with center acluster and periphery the vertices of G, then G is solvable by reduction;otherwise it is not solvable by reduction.

A 6-cycle in H corresponds to three clusters that pairwise share an element(a vertex of G). The rewriting step corresponds to a cluster merge. Let (u,U, v, V, w, W) be such a 6-cycle, where u, v, w [ G. We replace the threevertices U, V, and W with a new vertex X. Then X will be incident to allvertices to which U, V, and W are adjacent. That is, the nodes U, V, W arecombined into a single node. See also Figure 8.

A 4-cycle in H corresponds to two clusters that share two elements. If a4-cycle exists, the graph G is structurally overconstrained. Thus theshortest possible cycle in H has length 6.

3.2.2 Details. The main work of the algorithm is to find and reduce6-cycles. Finding triangles in Step 3 identifies all 6-cycles in H, and thealgorithm will find other 6-cycles that are formed by rewriting in Step 4.Those two steps must be implemented carefully, and we explain how theyare done.

Step 3. We assume that G is represented both by adjacency lists and bythe adjacency matrix. We find all triangles in G, using the method of Itaiand Rodeh [1978].

190 • I. Fudos and C. M. Hoffmann

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 13: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

Build a depth-first search tree (see e.g., Aho et al. [1974]). Three types oftriangles are possible, involving two, one, or no tree edges; see Figure 9.Triangles that involve one or two tree edges are found uniformly as follows:let (u, v) be a back edge. If there is an edge in G between father(u)) and v,we have a triangle with one or two tree edges, because in that case either(v, father(u)) is a tree edge or (father(u), v) is a back edge.

Next, we remove all tree edges, and repeat the preceding search for allconnected components of the remaining graph. This is repeated until thereare no more edges. Clearly, all triangles that do not have tree edges in thefirst depth-first search eventually become triangles involving tree edges inlater depth-first searches.

Step 4. A triangle in the constraint graph G corresponds to a 6-cycle inthe cluster graph H and vice versa. Having found all triangles in G, we nowknow all 6-cycles of H.

When rewriting a 6-cycle, new 6-cycles could be created. They are foundby a limited-depth breadth-first search that originates at the new vertex X;see also Figure 10. In Monien [1983] limited depth-first search has beenused to find cycles of minimum length. To find all such 6-cycles, begin abreadth-first search at X. Each vertex at level 3 that is reached twice in thebreadth-first search closes a 6-cycle. Note that the search is done only tolevel 3. By the results of Fudos and Hoffmann [1995], there is no need toconsider which of several 6-cycles should be treated. Thus we choose onesuch 6-cycle, rewrite it, mark this vertex as candidate, and continue withthe next candidate vertex.

3.2.3 Time Analysis. Steps 1 and 2 require O(e) steps in all. Since G isnot structurally overconstrained, this is linear in the number of vertices n.

Step 3 repeatedly performs depth-first search. It requires the adjacencymatrix of G which costs O(n2) if constructed with standard data structures.The first depth-first search now requires O(e) steps, because the testwhether (father(u), v) is a graph edge can be done in constant time usingthe adjacency matrix.

Let G1 be a connected component of G with m vertices. After a depth-firstsearch of G1, m 2 1 edges are removed from the adjacency lists. This is

Fig. 8. Rewriting a 6-cycle in the cluster graph.

Systems of Geometric Constraints • 191

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 14: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

more than half the edges in G1 because G is structurally not overcon-strained. Consequently, the next depth-first search examines less than halfthe number of edges. The total time for Step 3 is therefore O(e) which isO(n), excluding the time for the adjacency matrix construction.

In Step 4, each reduction of a 6-cycle takes time O(e): we go through allthe adjacency lists and replace each of the three vertices U, V, and W withvertex X. Every new 6-cycle must involve the new node X. We do abreadth-first search beginning at X to depth 3, looking for new 6-cycles.This takes again time O(e). Initially, H contains at most 2n 2 3 verticesrepresenting clusters. Each 6-cycle replacement reduces this number by 2,thus in Step 4 we may have at most n reductions. And since eachbreadth-first search corresponds to one reduction, Step 4 takes time O(ne) 5O(n2).

3.3 Structurally Overconstrained Problems

We first show that we can test, in the same time bound as before, whetherthe graph is structurally overconstrained.

With some extra checking, the algorithm of Section 3.2 can detect anoverconstrained subgraph in the same time bound. For Step 1 before doinga depth-first search in a connected component graph G1 5 (V1, E1) we checkwhether uE1u # 2uV1u 2 3; if yes we go on, otherwise we terminate the

Fig. 9. Three cases for a triangle in a depth-first search: (a) triangle containing two treeedges; (b) triangle containing one tree edge; (c) triangle without tree edges.

Fig. 10. Finding a 6-cycle by doing a breadth-first search.

192 • I. Fudos and C. M. Hoffmann

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 15: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

algorithm and return the graph G1. Since this step is performed on theinitial graph as well, we have ensured that the original graph has less than2n 2 3 edges. Step 2 takes again time O(n), and Step 3 takes time O(e),assuming that we check for structurally overconstrained subgraphs beforeapplying a depth-first search. For Step 4, we keep reducing until we meet a4-cycle; then we terminate the algorithm and return the 4-cycle; the timecomplexity is again O(n2). The returned graph is used for interactiveediting.

To handle consistently overconstrained problems we introduce a newreduction operation that merges two clusters sharing two or more geomet-ric elements. This corresponds to checking in the construction phasewhether the relative positioning of the shared geometric elements in thetwo clusters is consistent. If it is consistent, then the two rigid bodies aremerged into one. A cluster configuration derived from a structurallyoverconstrained problem is depicted in Figure 11. In this cluster configura-tion, C1, C2, and C3 are merged into a cluster C9, and C4, C5, and C6 into acluster C0. C9 and C0 have two common elements: p4 and p2. In the analysisphase we merge the two clusters and in the construction phase we firstcheck whether the distance between p4 and p2 in C9 matches the distancebetween p4 and p2 in C0. If so, we rotate and translate, for example, C9 tomatch C0. We can prove that by adding this new reduction, we get confluentrewrite systems for all cluster configurations (overconstrained or nonover-constrained). However, geometric congruence cannot be proved by thetechniques of Fudos and Hoffmann [1995], since different reduction choiceswill result in different sets of geometry triples.

We assume that in the initial constraint graph there may be no morethan one edge between any two vertices. Otherwise we can find suchmultiple edges in time linear to the total number of edges and reduce them.Then the only modification to the algorithm of Section 3.2 is to add to Step4, that if we meet a 4-cycle in a breadth-first search we reduce it as if itwere a 6-cycle and we continue. To derive the time bounds, note that thenumber of reductions is always linear in the number of nodes in H. Alsorecall that each iteration of Step 4 takes only O(e). Steps 1 and 2 take time

Fig. 11. A cluster configuration derived from a structurally overconstrained problem.

Systems of Geometric Constraints • 193

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 16: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

O(e). Step 3 becomes O(e=e) (see Itai and Rodeh [1978]), and Step 4becomes O(e2). This gives an overall O(e2) worst case time complexity forthe general case.

If the original graph has e 5 O(n), then Steps 1 and 2 take O(n) time,Step 3 takes O(n=n), and Step 4 takes time O(n2).

4. THE DECOMPOSITION ANALYSIS

The bottom-up reduction analysis of Section 3 works well with overcon-strained and well-constrained problems. However, it has difficulties whendealing with underconstrained problems because there appears to be noreliable way to locally add constraints deduced from the input sketch totransform an underconstrained problem to a well-constrained one.

Example 3. Figure 12 shows the constraint graph of an undercon-strained geometric problem that needs the addition of three constraints tobecome well-constrained and solvable by the reduction analysis describedin Section 3. The vertices of the graph represent points, and the edgesdistance constraints between them. Adding distance constraints between(v1, v3), (v7, v9), and (v13, v15) makes the problem well-constrained andsolvable. However, if we add a distance constraint for ( v16, v10) to trigger alocal cluster merging, then any addition of two more distance constraintswill make the problem nonsolvable. Thus the local reduction analysis isinsufficient for underconstrained problems. A global analysis is needed.

We now present a global, top-down decomposition analysis that performsespecially well for underconstrained problems. The decomposition analysisalso handles well-constrained problems efficiently, but does not do well onoverconstrained problems, nor does it make it easy to include the angletransformations described in Section 5.2. Note that a top-down decomposi-

Fig. 12. A structurally underconstrained graph where adding edges (clusters) to trigger localcluster merging does not always work.

194 • I. Fudos and C. M. Hoffmann

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 17: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

tion analysis was first proposed by Owen [1991]. His algorithm runs inquadratic time and uses the linear algorithm for finding triconnectedcomponents presented in Hopcroft and Tarjan [1973].

The decomposition analysis presented now analyzes the cluster configu-ration derived by the reduction analysis and is proved to handle allunderconstrained problems that can become well-constrained and solvableby reduction, by adding constraints. Our decomposition algorithm hasquadratic worst case time complexity and uses the classical linear depth-first search algorithms for finding split components and articulation nodes[Hopcroft and Tarjan 1973; Tarjan 1972].

4.1 A Conceptual Algorithm

Initially, all clusters found by the reduction analysis are considered to be ina set S. The set S is partitioned into two or three subsets Sk. Let S1 and S2be two such subsets. We require that there is at most one geometricelement shared by the clusters in the two sets. That is, let G1 5 {g u g [ C,C [ S1} be the geometric elements that are in clusters of the set S1, and letG2 5 {g u g [ C, C [ S2}. Then we require that uG1 ù G2u # 1. At eachdecomposition step, we so subdivide a set of clusters S into two or threedisjoint cluster sets. The elementary decomposition steps (decompositiontypes) are shown in Figure 13. In the figure, Si denotes a set of clusters,and Ci denotes an individual cluster.

A decomposition sequence is successful when every cluster of the originalset S is in a singleton set Sk. A successful decomposition sequence corre-sponds to a sequence of cluster merges during the construction phase.These cluster merge operations will be executed in reverse order of thedecomposition sequence. A decomposition step corresponds to one clustermerge in cases (a) and (b), and to two cluster merges in case (c). Adecomposition of type (a) is then a simple set partition (Figure 14(a)). Inthe case of a decomposition of type (b), a new cluster C1 is created for thepurposes of the construction phase, corresponding to adding a constraint(Figure 14(b)). A decomposition step of type (c) creates three additionalclusters (Figure 14(c)). The corresponding added constraints can be formu-lated from the relative position of the geometric elements in the inputsketch.

We avoid selecting a partition where all three shared geometric elementsare lines in case (a). In case (b), when the shared element is a line, wechoose to add a cluster C1 that does not consist of two lines. The restrictionavoids a corresponding merge of three clusters with lines as the sharedgeometric elements, for such a merge is geometrically undetermined. Asimilar restriction is placed on the clusters C1, C2, and C3 in decomposi-tions of type (c).

In the case where S1 and S2 are singleton sets whose clusters consist oflines only, a virtual point is added as shown in Figure 15.

The reduction analysis has no effect on the underconstrained graph ofFigure 12 because there are no triangles. The decomposition analysis,

Systems of Geometric Constraints • 195

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 18: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

however, can successfully solve the underconstrained problem and identifythree additional constraints that will make it solvable. For instance, theclusters formed initially (one for each edge) can be split into three sets thatshare geometric elements v1, v7, and v13.

Fig. 13. The three decomposition types.

196 • I. Fudos and C. M. Hoffmann

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 19: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

On the other hand, decomposition cannot handle problems that areconsistently overconstrained, such as the one shown in Figure 11. There isno decomposition of the clusters into two or three sets that pairwise shareat most one geometric element. However, the reduction analysis canefficiently (in terms of the overall time complexity) handle such geometricconstraint problems.

4.2 Correctness

Let # be a collection of sets S. Each set S consists of clusters C. We assumethat the cluster sets S of # are disjoint. Initially, # contains only one setwhose elements are the clusters derived by the reduction analysis.

The type (a) decomposition of Figure 13 is denoted 3D(a), and is formallydefined as follows:

Definition 6. Let # be a collection of sets of clusters in which there is a

Fig. 14. Adding clusters during the construction phase for each of the three decompositionsteps.

Systems of Geometric Constraints • 197

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 20: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

set of clusters S whose elements can be partitioned in three nonempty setsS1, S2, and S3 such that:

~øC[S1 C! ù ~øC[S2 C! 5 $ g1%

~øC[S2 C! ù ~øC[S3 C! 5 $ g2%

~øC[S3 C! ù ~øC[S1 C! 5 $ g3%,

where g1, g2, g3 are distinct and are not all lines; then

#3 D~a! #9,

where

#9 5 ~# ø $S1, S2, S3%! 2 $S%.

The type (b) decomposition of Figure 13, denoted 3D(b), is formallydefined as follows.

Definition 7. Let # be a collection of sets of clusters in which there is aset of clusters S whose elements can be partitioned in two nonempty sets S1and S2 such that:

~øC[S1 C! ù ~øC[S2 C! 5 $ g%;

then

#3 D~b! #9,

where

#95 ~# ø $S1, S2%! 2 $S%.

Fig. 15. Decompositions (b) and (c) for clusters containing only lines. A virtual point p isadded plus constraints to form the clusters Ck.

198 • I. Fudos and C. M. Hoffmann

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 21: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

Finally, the type (c) decomposition of Figure 13 which we denote by 3D(c)

is formally defined as follows.

Definition 8. Let # be a collection of sets of clusters in which there is aset of clusters S whose elements can be partitioned in two nonempty sets S1and S2 such that:

~øC[S1 C! ù ~øC[S2 C! 5 0;

then

#3 D~c! #9,

where

#95 ~C ø $S1, S2%! 2 $S%.

Definition 9. A decomposition 3D applied to a collection # is one of3D(a), 3D(b), or 3D(c).

We show that the rewrite system (#G,3D) has a unique normal form thatis obtained after finitely many steps. Note that this result does not implygeometric uniqueness since different choices of constraint additions mayresult from different decomposition sequences. However, it proves thesoundness of the decomposition method, meaning that the method willalways find a successful decomposition sequence, if such a sequence exists.

Definition 10. The collection #9 of cluster sets is derived from #, if #9can be obtained by applying a finite sequence t of decompositions to #. Wedenote this by

#3 pD #9.

Definition 11. A collection # of cluster sets to which 3D is not applica-ble is called nondecomposable. If # is nondecomposable and can be derivedfrom #9, then # is called a normal form of #9. A collection of cluster setswhose normal form contains only singleton cluster sets is called solvable.

We show that a collection of cluster sets has a unique normal form and isderived by a finite sequence of decomposition steps.

LEMMA 1. A normal form of a collection of cluster sets is derived by adecomposition sequence whose length is bounded by c 2 1 where c is thetotal number of clusters.

PROOF. (By induction on the number of clusters.) For c 5 1, # 5 {S} andS 5 {C}, which is already in normal form. Assume the lemma holds for allsets with fewer than c . 1 clusters, and let # be such that there are cclusters in all the element sets of #. If # has more than one element, theneach set S [ # has fewer than c elements. By the induction hypothesis, #can be brought into normal form in at most c 2 1 steps. Otherwise, # 5 {S}.If # is not in normal form already, then S can be decomposed in one step

Systems of Geometric Constraints • 199

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 22: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

into two or three sets Sk, each with fewer than c elements. By the inductionhypothesis, therefore, normal form is reached in at most 1 1 (c1 2 1) 1(c2 2 1) 5 c 2 1 steps or in at most 1 1 (c1 2 1) 1 (c2 2 1) 1 (c3 2 1) 5c 2 2 steps. e

THEOREM 1. The rewrite system (#, 3D) is confluent.

PROOF. Let # be a collection of cluster sets. Assume that two differentdecomposition steps, # 31

D #1 and # 32D #2, are applicable to #. We prove

that #1 3pD #9 and #2 3p

D #9. This proves local confluence which, however,suffices to show global confluence (see e.g., Dershowitz and Jouannaud[1994]).

If 31D and 32

D partition two different sets S1 and S2 of #, then #2 31D #9

and #1 32D #9. So we assume that 31

D and 32D partition the same set S of

clusters. Without loss of generality we assume that # 5 {S}.Assume that31

D and32D are both of type (a) and partition S into S11, S12,

S13 and into S21, S22, S23, respectively. Intuitively, the collection #9 is #9 5{S9ik}, where S9ik 5 S1i ù S2k, 1 # i, k # 3 and S9ik Þ 0.

We want to decompose S11 into the sets S911, S912, and S913, assuming thatall three sets are not empty. Since the decomposition 32

D requires that S21,S22, and S23 pairwise share one geometric element, the sets S911, S912, andS913 pairwise share at most one geometric element. Therefore, the decompo-sition of S11 can be done in one of four ways, depending on the number ofshared geometric elements:

(3) by a single step of type (a)(2) by two steps of type (b)(1) by one step of type (b) and one step of type (c)(0) by two steps of type (c).

If one or more of the S91k are empty, a similar case analysis establishesthe decomposition of S11. By symmetry, S12 and S13 are decomposed intothe sets S92k and S93k. Therefore,

#3 1D #13 p

D #9

If both reductions are of type (a). Again, by symmetry, we also have

#3 2D #23 p

D #9.

It is now routine to argue confluence in the cases where one, or both, of31

D and 32D are of type (b) or type (c). e

COROLLARY 1. (Normal Form Theorem). A collection # has a uniquenormal form under 3D that is obtained by finitely many decompositionsteps.

PROOF. Immediate from Theorem 1 and Lemma 1. e

200 • I. Fudos and C. M. Hoffmann

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 23: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

Note that two decomposition sequences need not result in congruentgeometric solutions, since different decompositions may determine differentchoices of constraint additions. An example is shown in Figure 16. The userspecifies the underconstrained problem in (a). Assume that the distancebetween Pt1 and Pt2 is 13.738, and between Pt5 and Pt6 is 17.000, in theinput sketch. Then, depending on the decomposition sequence, solutions (b)or (c) may be obtained. The decomposition sequence, which determines theinsertion of the additional constraints, is randomly selected among thefeasible ones. In CAD applications, the user may delete some of theinserted constraints and rerun the constraint solving algorithm.

4.3 An Efficient Algorithm

The conceptual decomposition method just described can be implemented torun in time quadratic in the number of clusters and geometric elements. Itcan also be combined with the reduction analysis of Section 3 because thedecomposition only requires abstract clusters that are sets of geometricelements whose relative position is known. Thus the set of clusters ob-tained by the reduction analysis is the initial set S of the decompositionanalysis.

Fig. 16. Getting two geometrically incongruent solutions, (b) and (c), from the same under-constrained draft (a).

Systems of Geometric Constraints • 201

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 24: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

For the implementation of decomposition we make use of the clustergraph HR 5 (VR, ER) derived by the reduction analysis. Recall that thisgraph is bipartite, and the partition is VR 5 VR

c ø VRg , where VR

c are theclusters and VR

g are the geometric elements. The graph edge (C, g) meansthat the geometric element g belongs to the cluster C.

We construct a graph GD 5 (VD, ED) from the graph GR 5 (VR, ER), where

VD 5 VRg ø $v1, v2, v3uv [ VR

c %

consists of the nodes of VRg plus three nodes vk for every node v in VR

c . Theedges of GD are

ED 5 $~u, v1!,~u, v2!,~u, v3! u~u, v! [ ER, u [ VRg , v [ VR

c %.

We use a depth-first search algorithm for finding the split components of abiconnected graph. We recall some terminology from Hopcroft and Tarjan[1973].

Let G be a connected undirected graph. Then a is an articulation node ofG iff there are two vertices u and v different from a such that a is on everypath connecting u and v. A graph with no articulation nodes is calledbiconnected. Let a and b be two vertices in a biconnected graph G. Theedges of G are divided into separation classes E1, E2, . . . , Ek. Two edges arein the same separation class E if there is a path using both edges and notcontaining a or b except, possibly, as endpoints.

If the two vertices a and b divide the edges into more than two separationclasses, then {a, b} is an articulation pair of G. Moreover, if {a, b} dividesthe edges into two separation classes, each containing more than one edge,then {a, b} is also an articulation pair. If G has no articulation pairs, then Gis triconnected.

Assume there is an articulation pair {a, b} that induces the separationclasses E1, E2, . . . , Ek. Let E9 5 øi51

m Ei and E0 5 øi5m11k Ei, such that uE9u,

uE0u $ 2, and let G9 5 (V(E9), E9 ø {(a, b)}) and G0 5 (V(E0), E0 ø {(a, b)}).Then the graphs G9 and G0 are called split graphs of G. In this case we saythat G has been split into G9 and G0. The added edge (a, b) is labeled todenote the split and is called a virtual bond. By merging G9 and G0 wemean the reconstruction of G from the two graphs.

Assume that we recursively split G and its split graphs until we obtaingraphs that cannot be split further. The set of these (triconnected) graphsis called a set of split components of G. The decomposition of a biconnectedgraph G into two split components is not unique because the partition ofthe separation classes is arbitrary. By merging the split componentspairwise we recover the original graph. We distinguish three types of splitcomponents: triple bonds (a two-vertex subgraph with three edges), trian-gles, and other triconnected graphs.

If we perform all merging operations between bonds and all mergingoperations between triangles, then the resulting graphs will be bonds andpolygons plus the nontrivial triconnected split components. It is a standard

202 • I. Fudos and C. M. Hoffmann

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 25: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

result that the decomposition of a graph G into triconnected components isunique [MacLane 1937].

The algorithm presented in this section is based on the following lemma.

LEMMA 2. A cluster configuration with a biconnected graph GD aspreviously defined, is type (a) decomposable if and only if every set of splitcomponents of the graph contains at least one triangle whose edges are allvirtual bonds, and whose vertices are not all lines.

PROOF. Assume that among the split components of GD there is atriangle (a, b, c) whose edges are virtual bonds, and whose vertices are notall lines. Then, since we have replicated each cluster node and all theadjacent edges, we are certain that no articulation node or articulation pairwill contain any cluster nodes. Thus all three articulation pairs (a, b), (b, c),and (c, a) correspond to geometric elements, and GD can be decomposed intothree sets of clusters, sharing pairwise a single geometric element. Thesesets can be found if we follow the labels of the virtual bonds (see Figure 18).

Now assume that the cluster configuration can be decomposed into threesets of clusters pairwise sharing exactly one geometric element. Let (a, b, c)be the shared geometric elements, and assume without loss of generalitythat vertex a corresponds to a point. We can find at least one decompositionof GD into split components containing the triangle: ({a, b, c}, {(a, b), (b, c),(c, a)}). We know, however (see, e.g., MacLane [1937]), that the decomposi-tion of any graph in triconnected components is unique. We also know fromHopcroft and Tarjan [1973] that merging split components that are trian-gles as much as possible will give us a number of polygons that aretriconnected components of the original graph. Since polygons occur astriconnected components only as a result of two or more triangles beingmerged (otherwise they would split), we conclude that every decompositionof GD into split components will contain a triangle graph where one vertexis a and the edges are virtual bonds (there are no edges between geometricelements and all articulation pairs consist of geometric elements). e

By the preceding lemma and by observing that a cluster node cannot bean articulation node, we can show that the following algorithm correctlyimplements the decomposition analysis described earlier.

(1) If the graph is not connected, then split it into connected components. Ifthe graph has l connected components, then there are l 2 1 decomposi-tions of type (c) that split the original graph. Apply Step 2 to each of theconnected components.

(2) If the graph is not biconnected, then split it into biconnected compo-nents. If the graph has k biconnected components, then k 2 1 decompo-sitions of type (b) split the graph into those components. Apply Step 3 toeach of the biconnected components.

(3) Find all split components of the graph. If there is no articulation pair,stop.

Systems of Geometric Constraints • 203

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 26: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

If among the split components there is a triangle whose edges arevirtual bonds and whose vertices are not all lines, then the overallgraph is type (a) decomposable and the separation triple consists of thevertices of the triangle. Find the three component graphs by followingthe virtual bonds. Then apply the algorithm recursively to the threecomponents.

When the algorithm terminates, every cluster represents a triconnectedcomponent of the constraint graph that cannot be split further.

Figure 17 shows an underconstrained cluster configuration that is miss-ing one constraint. The corresponding graphs for clusters C2 and C7 areshown on the right. A decomposition sequence of the set of clusters, is thefollowing.

$C1, C2, C3, C4, C5, C6, C7, C8%3 D~a!

$$C1%, $C2%, $C3, C4, C5, C6, C7, C8%%3 D~a!

$$C1%, $C2%, $C3%, $C4%, $C5, C6, C7, C8%%3 D~a!

$$C1%, $C2%, $C3%, $C4%, $C5%, $C6%, $C7C8%%3 D~b!

$$C1%, $C2%, $C3%, $C4%, $C5%, $C6%, $C7%, $C8%%.

Fig. 17. (left) A cluster configuration that is derived from an underconstrained system ofgeometric constraints; (right) the graphs representing a cluster with two and a cluster withthree geometric elements.

204 • I. Fudos and C. M. Hoffmann

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 27: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

The configuration is solvable, and the last decomposition is a type (b)decomposition and means that we have to add a cluster (constraint)between p5 and p7 or alternatively, between p5 and p4.

In Figure 18 we see a decomposition into split components of the graphGD for the cluster configuration of Figure 17. The edges inside the clustersare omitted and they are as in Figure 17 (left). The existence of thetriangle,

$$ p1, l2, l3%, $~ p1, l2!, ~l2, l3!, ~l3, p1!%%

means that there is a decomposition of the cluster in three sets thatpairwise share a single geometric element, and that one of them representsa point.

Fig. 18. A decomposition in split components of the graph that corresponds to the clusterconfiguration of the previous figure. The edges inside each cluster are omitted, only the virtualbonds are shown.

Systems of Geometric Constraints • 205

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 28: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

The first step of the algorithm takes time O(uEDu 1 uVDu) [Tarjan 1972].Finding the split components each time the second step is executed takestime O(uEDu 1 uVDu) [Hopcroft and Tarjan 1973]. The number of times thatwe need to decompose the components is bounded by uVDu, since each timewe decompose the graph, the number of cluster nodes at each component isreduced by one.

Thus the algorithm takes at most O((uEu 1 uVu)2) time. If we assume thatthe number of edges uEu 5 O(n), then the decomposition analysis of thealgorithm takes time O(n2).

5. EXTENDING THE SCOPE OF THE ANALYSIS PHASE

We present two extensions of the scope of the analysis phase. Bothextensions are incorporated in the reduction analysis, do not affect theoverall time complexity, and can be used also in conjunction with themethods of Section 3.3 for solving consistently overconstrained problems.

5.1 Extending the Repertoire of Reductions

The reduction analysis can be extended to include more complicatedreductions, as the one depicted in Figure 19 for which the constructions arepresented in Bouma et al. [1995]. We replace the depth-first search of Step3 of the reduction analysis algorithm (Section 3.2), for finding the trianglesin graph G, with a breadth-first search. The breadth-first search beginsfrom every cluster node of the bipartite graph H, to find a 4-cycle or a6-cycle. If neither can be found, we search for an 8-cycle with exactly 3incoming edges at the cluster-node of level 4; see also Figure 20. We modifyStep 4 of the reduction analysis algorithm analogously.

Fig. 19. A well-constrained cluster configuration that cannot be solved by the basic method.

206 • I. Fudos and C. M. Hoffmann

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 29: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

An 8-cycle with exactly 3 incoming edges corresponds to the clusterconfiguration of Figure 19. In Figure 20 we have started breadth-firstsearch from C1 and at level 4 we detect that the node corresponding tocluster C2 has exactly 3 incoming edges. Recall that all geometry nodesg1, . . . , g6 and cluster nodes C3, C4, and C5 have only one incoming edge,since there are no 6-cycles and no 4-cycles by assumption. However, havingmore than 3 incoming edges to a cluster node of level 4 means that we havean overconstrained configuration. In that case, we can either return theoverconstrained subgraph or treat it as a consistently overconstrainedconfiguration by taking into account only 3 incoming edges, merge the 5clusters into one, and check for consistency using the remaining clusters.Although Step 3 is now computationally more expensive, the overallworst-case time complexity remains O((uEu 1 uVu)2).

5.2 Incorporating Angle Derivations

By exploiting geometric theorems, we perform certain graph transforma-tions that may convert a constraint graph that is unsolvable by our basicmethod into an equivalent, solvable constraint graph.

A powerful graph transformation rule can be based on the followingsimple observation: if we have three lines l1, l2, and l3 and the angles a(l1,l2) and b(l2, l3), then the angle between g(l1, l3) must be p 2 (a 1 b). Thisimplies that we can substitute for any tree representing n lines and n 2 1angle constraints between them, by any spanning tree of the completegraph with those n nodes.

In Figure 21 (left) we see a constraint graph that is not solvable by ourbasic reduction analysis, but it becomes solvable if we replace edge (l1, l2)with edge (l1, l3) applying the graph transformation rule previously de-scribed. This rule can be generalized to apply in cases where there are noexplicit angles initially between lines, yet implicit angle constraints ariselater as a consequence of cluster merging. Figure 21 (right) shows anexample.

Fig. 20. Detecting the cluster configuration of the previous figure during the reductionanalysis, by a breadth-first search rooted at C1.

Systems of Geometric Constraints • 207

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 30: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

This graph transformation can be implemented efficiently as follows. Wepartition all nodes that correspond to line geometries into a number ofangle classes. Two vertices belong to the same angle class if and only if theangle between them is known. The binary relation known angle betweentwo lines is reflexive, transitive, and symmetric. We can find the angleclasses formed by the initial angle constraints in time O(uEu 1 uVu), main-taining with each line geometry a bidirectional pointer to its angle class,which is initially set to contain only the line itself. Then we traverse theoriginal constraint graph (e.g., by a depth-first search), and every time thatwe find an edge between two lines representing an angle constraint wemerge the two corresponding angle classes. All lines in the same clusterbelong to the same angle class; we say that the corresponding cluster nodebelongs to the angle class.

We now modify Step 3 of the reduction analysis to check, in addition,whether some angle class triggers a cluster merging. In the graph H, this isdone by checking which cluster nodes belonging to the angle class have apoint vertex in common. This can be done in time O((uEu 1 uVu)2). Whenclusters are merged, the associated angle classes are also merged, and thelinks to and from the clusters and the corresponding line vertices areupdated in time O(uEu 1 uVu). Finally, when we perform a breadth-firstsearch from a cluster vertex upon merging three clusters, we also checkwhether the associated angle class triggers any further cluster merging,also in time O(uEu 1 uVu). Thus the overall worst case time complexityremains O((uEu 1 uVu)2).

In Figure 21 (left), there is initially only one angle class {l1, l2, l3},whereas in Figure 21 (right) there are initially three angle classes {l1}, {l2},and {l3}. In Figure 22 (left) we have the cluster configuration of theconstraint problem of Figure 21 (left) after the first two cluster mergeshave occurred. We check to see whether the angle class triggers someadditional cluster merging and find that C2 and C5 have a common pointvertex p3. Thus clusters C2 and C5 can be merged.

In Figure 22 (right) we have the cluster configuration of the constraintproblem of Figure 21 (right) after four cluster merges. The two angleclasses and their links to the clusters are also shown. When clusters C5, C6,and C8 are merged, the corresponding angle classes are also merged. Nowthe problem becomes similar to the one in Figure 21 (left).

Fig. 21. Two constraint configurations that can be solved only if we utilize angle derivations.

208 • I. Fudos and C. M. Hoffmann

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 31: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

6. THE CONSTRUCTION PHASE OF THE ALGORITHM

The graph analysis produces a sequence of instructions to Phase 2 of theconstraint solver in which coordinates for the various geometric elementsare computed based on the repertoire of construction steps. The geometricconstruction involves cluster creation and cluster merging. During clustercreation, we place two geometric elements that have a constraint betweenthem with respect to each other. The construction is obvious, since it is adirect interpretation of the equations for distances and angles [Fudos andHoffmann 1995].

In the cluster merging phase we repeat the following: three clusters withthree pairwise common geometric elements g1, g2, and g3 are merged into asingle cluster, as shown in Figure 23. We place the three common geometricelements, noting that their relative positions are known [Fudos and Hoff-mann 1995]. Having positioned the shared geometric elements, we trans-late and rotate the three clusters so that the three geometric elements arein the required location. Note that cluster merging cannot be done whenthe shared geometric elements are three lines. The constructions for theextension of Section 5.1 are described in Bouma et al. [1995].

6.1 Complexity of the Construction Phase

Cluster formation takes time O(e), where e is the number of edges of theconstraint graph. The sequence of cluster merges, derived by the analysisphase, can be done in time O(e log e). This is seen as follows.

The rigid motion positioning a cluster, by moving every geometric ele-ment of the cluster, requires O(m) steps, where m is the number of

Fig. 22. Cluster configurations for the geometric constraint problems of the previous figuresafter some initial cluster merging has occurred. The corresponding information for the angleclasses is also shown.

Systems of Geometric Constraints • 209

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 32: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

geometric elements in the cluster. We consider the largest of the threeclusters fixed, and apply the required motion to the two smaller ones. If thelargest cluster has m elements, at most O(m) steps are required for themerge. Observe that with this heuristic, the size of the largest cluster is atleast 1/3 the size of the combined clusters. Thus, if a geometric element isin a cluster that is moved, then it becomes part of a new cluster at leasttwice as large. Consequently, a geometric element cannot be moved morethan log(r) times, where r is the sum of the cardinalities of the clusters andis bounded by 2e. Since the number of merge operations is O(e), theconstruction phase takes at most O(e log e) steps.

6.2 The Real Solution Problem

We have shown that we can check whether a given geometric constraintproblem is solvable by our method in a generic sense in time quadratic inthe number of geometric objects. However, computing a real solution for asolvable well-constrained problem is shown to be NP-hard in a strongcombinatorial sense. Although finding a real solution is central to geomet-ric constraint solving, the problem seems to have been neglected in theliterature and we are not aware of any results other than a theorem byHilbert for ruler-constructible configurations [Bouma et al. 1995; Hilbert1956]. The problem of selecting a certain root by overconstraining has beenshown to be hard [Fudos 1993]. The following example illustrates theproblem of finding a real solution for a constraint configuration.

Example 4. Given the five points A, B, C, D, E and the set of geometricconstraints:

A distance 3 from BC distance 4 from A C distance 5 from BD distance 5 from A D distance 4 from BE distance 2 from C E distance 2 from D,

Fig. 23. Cluster merge.

210 • I. Fudos and C. M. Hoffmann

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 33: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

find a placement of the points that satisfies the preceding geometricconstraints. The placement of the points is with respect to each other, sothe derived solution is invariant up to translation and rotation. Oneplacement sequence that satisfies the imposed constraints is the following.

(1) Position A and B with respect to each other.(2) Construct C from A and B as the intersection of two circles.(3) Construct D from A and B as the intersection of two circles.(4) Construct E from C and D as the intersection of two circles.

Step (1) has only one solution, and for Steps (2) through (4) there are twosolutions each. Thus we have eight distinct solutions in the complex space.There are four ways in which the points A, B, C, and D may be placed; seeFigure 24. Solutions (c) and (d) do not extend to a real solution for E, sincethe circles of Step (4) do not intersect. Solutions (a) and (b) each extend totwo real solutions for E, resulting in a total of four real solutions of theconstraint problem.

6.2.1 NP-Hardness. We reduce the following version of 3SAT to thegeometric real solution problem.

One-in-three monotone 3SAT (1IN3-M3SAT) [Garey and Johnson 1979;Schaefer 1978]: Given a set U of variables, a collection C of clauses over U,such that each clause c [ C has three literals, none of them negated. Is

Fig. 24. Four discrete solutions for placing the four points A, B, C, and D with respect toeach other.

Systems of Geometric Constraints • 211

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 34: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

there a truth assignment for U, such that each clause in C has exactly onetrue literal?

We prove that for each instance of 1IN3-M3SAT we can construct, inpolynomial time, a solvable geometric constraint problem that has a realsolution iff the corresponding instance of 1IN3-M3SAT is satisfiable.

Let {x1, x2, . . . , xk} be the set of literals used in C. Let L be the line x 5 1and L be the line x 5 2. For each literal xi, i 5 1, . . . , k, we construct apoint pi on the x-axis at distance 1 from L; see also Figure 25. For eachpoint pi we can choose independently one of two solutions, namely, (0, 0) or(2, 0), which will correspond to the variable xi being assigned false or true,respectively.

For the clause c 5 (xa, xb, xc), we introduce the points p9a, p9b, p9c, pab, pbc,

Fig. 25. Constructing an instance of the real solution problem.

212 • I. Fudos and C. M. Hoffmann

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 35: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

pca and the lines la, lb, lc. The following constraints are imposed.

pi on x-axis pi distance 1 from L

pa distance 0 from la la angle 0 with the y-axispb distance 0 from lb lb angle 0 with the y-axispc distance 0 from lc lc angle 0 with the y-axisp9a distance 2 from O~0,0! p9a distance 0 from la

p9b distance 2 from O~0,0! p9b distance 0 from lb

p9c distance 2 from O~0,0! p9c distance 0 from lc

pab distance 3 from p9a pab distance 2 from p9bpbc distance 3 from p9b pbc distance 2 from p9cpca distance 3 from p9c pca distance 2 from p9a.

Thus the lines lu are parallel to the y-axis through p9u. The points p9u are atdistance 2 or 0 from the points pu. Note that to each point pu therecorrespond several p9u, one for each occurrence of xu in a clause of C.

LEMMA 3. There is a truth assignment for U with exactly one true literalin each clause iff the system of geometric constraints previously describedhas a real solution.

PROOF f: Assume that there is a truth assignment for U with exactly onetrue literal in each clause. We set pm 5 (2, 0) whenever xm 5 true, and thevalue pn 5 (0, 0) whenever xn 5 false for a solution of U. Since a solution ofU requires that exactly one literal in each clause c 5 (xa, xb, xc) is true,exactly one of the points pa, pb, or pc is at (2, 0), say, pb. Then lb coincideswith L and la and lc coincide with the y-axis. Consequently, p9b has a uniquesolution: (2, 0), and for each of the points p9a and p9c there are two solutions,namely, (0, 2) or (0, 22). If we choose the value (0, 2) for p9a and the value(0, 22) for p9c we see that the points pab, pbc, and pca are real. Thus thegeometric constraint problem has a real solution.

d: Clearly, every point pi must be at the origin or at (2, 0), and thesepositions can be interpreted as a truth assignment to the variables xi of theformula. Assume that (2, 0) is interpreted as true, and there is no truthassignment for U with exactly one true literal in each clause. Let c 5(xa, xb, xc) be a clause that does not have exactly one true literal. Wedistinguish these cases:

(i) xa 5 xb 5 xc 5 true, or xa 5 xb 5 xc 5 false: Then the lines la, lb, and lccoincide; hence so must at least two of the points p9a, p9b, or p9c, say, p9aand p9b. But then we cannot place pab with real coordinates.

(ii) xa 5 xb 5 true: Then the lines la and lb coincide with L; hence p9a 5 p9b 5(2, 0). Again, pab cannot have real coordinates.

Now assume that (0, 0) is interpreted as true. By the preceding argument,there is a real solution of the constraint problem only if every clause of U

Systems of Geometric Constraints • 213

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 36: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

has exactly two true literals. But then the complement assignment solvesU. Hence there cannot be a real solution of the constraint problem. e

PROPOSITION 1. The problem of finding a real solution of a system ofgeometric constraints solvable by a constructive method is NP-hard.

The problem may not even be in NP, since it involves real arithmetic.However, it naturally falls in DNPR (see, e.g., Blum et al. [1989] andCucker and Matamala [1997]), where the guess is polynomial to the size ofthe input but the checking procedure needs infinite precision to give ananswer in polynomial time.

6.2.2 Discussion. We have proved that the problem of finding a realsolution for a system of geometric constraints that is solvable by ourconstructive method is NP-hard in a strong combinatorial sense. From thenature of the proof we conclude that several specializations of this problemare also NP-hard. In particular, all subproblems derived by imposing anycombination of these restrictions are also NP-hard:

—the set of geometric objects consists only of lines and points;—the set of geometric constraints consists only of distances and angles;—the domain of the value of the geometric constraints is {0, 1, 2}; and—the geometric problem is well-constrained.

Furthermore, if we restrict the geometric objects to be points only and thegeometric constraints to be distances only, then we can prove that theproblem remains NP-hard.

When the geometric problem is underconstrained, we have argued in thisarticle that additional constraints should be added to make the problemwell-constrained and solvable. It remains to be investigated whether theaddition of constraints can facilitate finding real solutions.

7. REMARKS

We have presented a quadratic algorithm that solves a system of geometricconstraints using a graph constructive approach. The bottom-up analysisalgorithm of Bouma et al. [1995] has been augmented with a top-downdecomposition algorithm and so not only solves consistently overcon-strained problems but underconstrained problems as well. Both over- andunderconstrained problems occur in practice and it is important to handlethem.

It should be possible to speed up the analysis to take only O(n log(n))time for constraint graphs with O(n) edges. Such an improvement would beimportant in applications where large constraint problems are not uncom-mon.

REFERENCES

AHO, A. V., HOPCROFT, J. E., AND ULLMAN, J. D. 1974. The Design and Analysis of ComputerAlgorithms. Addison-Wesley, Reading, MA.

214 • I. Fudos and C. M. Hoffmann

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 37: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

AIT-AOUDIA, S., JEGOU, R., AND MICHELUCCI, D. 1993. Reduction of constraint systems. InProceedings of Compugraphics, (Alvor, Portugal), 83–92.

ALDEFELD, B. 1988. Variation of geometries based on a geometric-reasoning method. Com-put. Aided Des. 20, 3 (April), 117–126.

BLUM, L., SCHUB, M., AND SMALE, S. 1989. On a theory of computation and complexity overthe real numbers: NP-Completeness, recursive functions and universal machines. Bull. Am.Math. Soc. (New Series) 21, 1–46.

BOUMA, W., FUDOS, I., HOFFMANN, C. M., CAI, J., AND PAIGE, R. 1995. A geometric constraintsolver. Comput. Aided Des. 27, 6 (June), 487–501. Also available through http://www.cs.pur-due.edu/people/fudos.

BRUDERLIN, B. 1986. Constructing three-dimensional geometric objects defined by con-straints. In Workshop on Interactive 3D Graphics, (Oct. 23–24), ACM, New York, 111–129.

CRIPPEN, G. M. AND HAVEL, T. F. 1988. Distance Geometry and Molecular Conformation.Research Studies Press, Wiley, New York.

CUCKER, F. AND MATAMALA, M. 1997. On digital nondeterminism. Preprint.DERSHOWITZ, N. AND JOUANNAUD, J.-P. 1994. Rewrite systems. In Handbook of Theoretical

Computer Science, J. van Leeuwen, Ed., MIT Press, Cambridge, MA.DRESS, A. W. M. AND HAVEL, T. F. 1988. Shortest-path problems and molecular conforma-

tion. Discrete Appl. Math. 19, 3 (March), 129–144.FUDOS, I. AND HOFFMANN, C. M. 1995. Correctness proof of a geometric constraint solver.

Int. J. Comput. Geom. Appl. Also available through http://www.cs.purdue.edu/people/fudos.FUDOS, I. 1993. Editable representations for 2D geometric design. Master’s Thesis, Dept. of

Computer Sciences, Purdue Univ., Dec. Available through http://www.cs.purdue.edu/people/fudos.

FUDOS, I. 1995. Constraint solving for computer aided design. Ph.D. Thesis, Dept. ofComputer Sciences, Purdue Univ., Aug.

GAREY, M. R. AND JOHNSON, D. S. 1979. Computers and Intractability. W. H. Freeman, NewYork.

GOSLING, J. 1983. Algebraic constraints. Tech. Rep. CMU-CS-83-132, CMU.HILBERT, D. 1956. Grundlagen der Geometrie. B. G. Teubner, Stuttgart.HOFFMANN, C. M. 1993. On the semantics of generative geometry representations. In

Proceedings of the 19th ASME Design Automation Conference, Vol. 2, 411–420.HOFFMANN, C. M. AND JUAN, R. 1993. EREP: An editable high-level representation for

geometric design and analysis. In Geometric and Product Modeling, P. Wilson, M. Wozny,and M. Pratt, Eds., North Holland, Amsterdam.

HOPCROFT, J. E. AND TARJAN, R. E. 1973. Dividing a graph into triconnected components.SIAM J. Comput. 2, 3, 135–158.

IMAI, H. 1985. On combinatorial structures of line drawings of polyhedra. Discrete Appl.Math. 10, 79.

ITAI, A. AND RODEH, M. 1978. Finding a minimum circuit in a graph. SIAM J. Comput. 7, 4,413–423.

JUAN-ARINYO, R. AND SOTO, A. 1995. A rule-constructive geometric constraint solver. Tech.Rep. LSI-95-25-R, Univ. Politecnica de Catalunya.

KRAMER, G. A. 1992. Solving Geometric Constraints Systems: A Case Study in Kinematics.MIT Press, Cambridge, MA.

LIGHT, R. AND GOSSARD, D. 1982. Modification of geometric models through variationalgeometry. Comput. Aided Des. 14, 4 (July), 209–214.

MACLANE, S. 1937. A structural characterization of planar combinatorial graphs. DukeMath. J. 3, 460–472.

MONIEN, B. 1983. The complexity of determining a shortest cycle of even length. Computing31, 355–369.

NELSON, G. 1985. Juno, a constraint-based graphics system. In SIGGRAPH, (San Francisco,July 22–26), ACM, New York, 235–243.

OWEN, J. C. 1991. Algebraic solution for geometry from dimensional constraints. In ACMSymposium Foundations of Solid Modeling, (Austin, TX), ACM, New York, 397–407.

Systems of Geometric Constraints • 215

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.

Page 38: A Graph-Constructive Approach to Solving Systems of ... · PDF fileA Graph-Constructive Approach to Solving Systems of Geometric Constraints IOANNIS FUDOS University of Ioannina and

OWEN, J. C. 1993. Constraints on simple geometry in two and three dimensions. In ThirdSIAM Conference on Geometric Design, (Nov.). Int. J. Comput. Geom. Appl. (to appear).

ROLLER, D. 1989. Dimension-driven geometry in CAD: A survey. In Theory and Practice ofGeometric Modeling, Springer Verlag, New York, 509–523.

ROSEN, B. 1973. Tree-manipulating systems and Church-Rosser theorems. J. ACM 20,160–187.

SCHAEFER, T. J. 1978. The complexity of satisfiability problems. In Proceedings of the 10thAnnual ACM Symposium on Theory of Computing (New York), ACM, New York, 216–226.

SERRANO, D. AND GOSSARD, D. 1986. Combining mathematical models and geometric modelsin CAE systems. In Proceedings of ASME Computers in Engineering Conference, (Chicago,July), ASME, 277–284.

SUGIHARA, K. 1985. Detection of structural inconsistencies in systems of equations withdegrees of freedom and its applications. Discrete Appl. Math. 10, 297–312.

SUNDE, G. 1988. Specification of shape by dimensions and other geometric constraints. InGeometric Modeling for CAD Applications, M. J. Wozny, H. W. McLaughlin, and J. L.Encarnacao, Eds., North Holland, Amsterdam, 199–213.

SUTHERLAND, I. 1963. Sketchpad, a man-machine graphical communication system. InProceedings of the Spring Joint Computer Conference, IFIPS, 329–345.

SUZUKI, H., ANDO, H., AND KIMURA, F. 1990. Variation of geometries based on a geometric-reasoning method. Comput. Graph. 14, 2, 211–224.

TARJAN, R. E. 1972. Depth-first search and linear graph algorithms. SIAM J. Comput. 1,146–159.

VERROUST, A., SCHONEK, F., AND ROLLER, D. 1992. Rule-oriented method for parameterizedcomputer-aided design. Comput. Aided Des. 24, 3 (Oct.), 531–540.

YAMAGUCHI, Y. AND KIMURA, F. 1990. A constraint modeling system for variational geome-try. In Geometric Modeling for Product Engineering, M. J. Wozny, J. U. Turner, and K.Preiss, Eds., Elsevier Science (North Holland), Amsterdam, 221–233.

Received January 1996; accepted November 1996

216 • I. Fudos and C. M. Hoffmann

ACM Transactions on Graphics, Vol. 16, No. 2, April 1997.