38
A Brief on Constraint Solving Christoph M. Hoffmann Department of Computer Science Purdue University West Lafayette, IN 47907-1398, USA Robert Joan-Arinyo Escola T` ecnica Superior d’Enginyeria Industrial Universitat Polit` ecnica de Catalunya Av. Diagonal 647, 8a, E–08028 Barcelona, Spain April 7, 2005 Abstract We survey the current state of the art in geometric constraint solv- ing. Both 2D and 3D constraint solving is considered, and different approaches are characterized. Keywords: Geometric constraints, constraint solving, parametric de- sign. 1 Introduction and Scope 2D geometric constraint solving is arguably a core technology of computer- aided design (CAD) and, by extension, of managing product design data. Since the introduction of parametric design by Pro/Engineer in the 1980s, every major CAD system has adopted geometric constraint solving into its design interface. Most prominently, 2D constraint solving has become an integral component of sketchers on which most systems base feature design. Beyond applications in CAD and, by extension, in manufacturing, geo- metric constraint solving is also applicable in virtual reality and is closely related in a technical sense to geometric theorem proving. For solution 1

A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

A Brief on Constraint Solving

Christoph M. HoffmannDepartment of Computer Science

Purdue UniversityWest Lafayette, IN 47907-1398, USA

Robert Joan-ArinyoEscola Tecnica Superior d’Enginyeria Industrial

Universitat Politecnica de CatalunyaAv. Diagonal 647, 8a, E–08028 Barcelona, Spain

April 7, 2005

Abstract

We survey the current state of the art in geometric constraint solv-ing. Both 2D and 3D constraint solving is considered, and differentapproaches are characterized.

Keywords: Geometric constraints, constraint solving, parametric de-sign.

1 Introduction and Scope

2D geometric constraint solving is arguably a core technology of computer-aided design (CAD) and, by extension, of managing product design data.Since the introduction of parametric design by Pro/Engineer in the 1980s,every major CAD system has adopted geometric constraint solving into itsdesign interface. Most prominently, 2D constraint solving has become anintegral component of sketchers on which most systems base feature design.

Beyond applications in CAD and, by extension, in manufacturing, geo-metric constraint solving is also applicable in virtual reality and is closelyrelated in a technical sense to geometric theorem proving. For solution

1

Page 2: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

techniques, geometric constraint solving also borrows heavily from symbolicalgebraic computation and matroid theory.

In this paper, we review basic techniques that are widely available forsolving 2D and 3D geometric constraint problems. We focus primarily onthe basics of 2D solving and touch lightly on spatial constraint solving andthe various ways in which geometric constraint solvers can be extended withrelations, external variables, and parameter value enclosures. These andother extensions and problem variants have been published in the literature.They are recommended to the interested reader as follow-on material forstudy.

2 Preliminaries

A geometric constraint problem can be characterized by means of a tuple(E, O, X, C) where

• E is the geometric space constituting a reference framework into whichthe problem is embedded. E is usually Euclidean.

• O is the set of specific geometric objects which define the problem.They are chosen from a fixed repertoire including points, lines, circlesand the like.

• X is a, possibly empty, set of variables whose values must be deter-mined. In general, variables represent quantities with geometric mean-ing: distances, angles and so on. When the quantities are without ageometric meaning, for example, when they quantify technological as-pects and functional capabilities, those variables are called external.

• C is the set of constraints. Constraints can be geometric or equational.Geometric constraints are relationships between geometric elementschosen from a predefined set, e.g., distance, angle, tangency, etc. Therelationship (the distance, the angle, ...) is represented by a tag. If thetag represents a fixed value, known in advance, then the constraint iscalled valuated. If the tag represents a value to be computed as part ofsolving the constraint problem, then the constraint is called symbolic,[32].

Equational constraints are equations some of whose variables are tagsof symbolic constraints. The set of equational constraints can be

2

Page 3: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

empty.

The geometric constraint solving problem can now be stated as follows:

Given a geometric constraint problem (E, O, X, C),

1. Are the geometric elements in O placed with respect to each other insuch a way that the constraints in C are satisfied? If the answer ispositive, then

2. given an assignment of values to the valuated constraints and externalvariables, is there an actual construction that satisfies the constraintsand equations?

When dealing with geometric constraint solving, the first issue thatneedsto be settled is the dimension of the embedding space E.

Spatial constraint solving, where E = R3, includeproblems in fields likemolecular modeling, robotics, and terrainmodeling. Here, both a good con-ceptualization and an effective solvingmethodology for thegeometric con-straint problem has proved to be difficult. Pioneering work hasbeen reportedby Hoffmann and Vermeer,[37, 38] and by Durand,[18].

2.1 The General Problem

Figure 1 depicts a general geometric constraint solving problem in R2. Prob-lem components are

• The set of geometric elements, O = {A, B, C, D, LAB, LAC , LBC}.

• The set of tags in the constraints, P = {d, h, α}.

• The set of geometric variables, V1 = {x, y}.

• The set of external variables, V2 = {v}.

• The set of geometric constraints with fixed tags, C1 = {dpp(A, B) =d, dpl(C, LAB) = h, ∠(LAB, LBC) = α}.

• The set of geometric constraints with variable tags, C2 = {dpp(A, C) =x, dpp(C, D) = y}.

• The set of equational constraints, C3 = {y = x · v, v = 0.5 cos(α)}.

3

Page 4: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

α

BA LAB

LAC

x

C

LBCD

y

h

d

y = x · v

v = 0.5 cos(α)

Figure 1: The general geometric constraint solving problem. Example in R2.

with X = V1 ∪ V2 and C = C1 ∪ C2 ∪ C3.

Presented in this way, the geometric constraint solving problem includesin general issues concerning how to deal with external variables. Here werefer the interested reader to the work by Hoffmann and Joan-Arinyo, [32],and Joan-Arinyo and Soto, [45].

2.2 The Basic Problem

The basic constraint problem only considers geometric elements and con-straints whose tags are assigned a value. It excludes external variables,constraints whose tags must be computed, and equational constraints. Sothe basic problem is stated in the following way.

Given a set O with n geometric elements and a set C with m geometricconstraints defined on them

1. Is there a placement of the n geometric elements such that the m

constraints are fulfilled? If the answer is positive,

2. given an assignment of values to the m constraints tags, is there anactual construction of the n geometric elements satisfying the con-straints?

Figure 2 depicts a piston-crankshaft mechanism, [17], a basic geometricconstraint solving problem. The left side shows the geometric problem,the right side shows the actual mechanism so abstracted. The mechanism

4

Page 5: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

������������

�������������������������

�������������������������

�����������������������������������

�������������������������

d1

d2

d5

p5

p1

d4

p2

l1p4

d3p3

Figure 2: Piston, crankshaft and connecting rod mechanism.

transforms the translational motion of point p5 along the straight line l1 intoa rotational motion of point p4, on a circular path with center p3 and radiusd3.

The piston-crankshaft mechanism can be abstracted as a geometric con-straint solving problem comprising five points pi, 1 ≤ i ≤ 5, and a straightline l1. The set of constraints is given in Figure 3 and includes point-pointdistances, dpp(), and coincidences, on().

In what follows we will focus on the basic geometric constraint solvingproblem.

2.3 Problem Categorization

The CAD/CAM community focuses on the design and manufacture of rigidobjects, that is, objects that are fully determined up to a global coordi-nate system. Similarly, we seek solutions to a constraint problem that aredetermined up to a global coordinate system, that is, where solutions arecongruent under the rigid-body transformations of translation and rotation.We call a configuration of geometric objects in Euclidean space rigid when allobjects are fixed with respect to each other up to translation and rotation.

An intuitive way to introduce rigidity comes from considering the numberof solutions that a geometric constraint problem has. There are three cat-egories: A problem is structurally under constrained if there are infinitelymany solutions that are not congruent under rigid transformation, struc-

5

Page 6: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

1. dpp(p1, p2) = d1 6. on(p1, l1)2. dpp(p2, p3) = d2 7. on(p2, l1)3. dpp(p3, p4) = d3 8. on(p3, l1)4. dpp(p4, p5) = d4 9. on(p5, l1)5. dpp(p1, p5) = d5

Figure 3: A set of geometric constraints for the piston-crankshaft mecha-nism.

turally well-constrained, if there are finitely many solutions modulo rigidtransformation, and structurally over constrained if the deletion of one ormore constraints results in a well-constrained problem. A constraint prob-lem naturally corresponds to a set of (usually nonlinear) algebraic equations.

Defined in this way, the concept of rigidity appears to be simple butit is not quite in accord with the intuition about rigidity. The categoriesso defined only refer to the problem’s structure and do not account forother issues such as inconsistencies that could originate from specific valuesassigned to the constraints. Clearly a problem that is structurally well-constrained could actually be underconstrained for specific values of theconstraints.

For example, consider the structurally well constrained problem given inFigure 4, see Fudos and Hoffmann, [22]. Point P is properly placed wheneverα + β 6= 90◦ and the problem is well-constrained. But if α + β = 90◦, thenthe placement for point P is undetermined and, therefore, the problem is nolonger well constrained.

Different formal definitions of rigidity have been explored in the liter-ature. See, for example, the work by Henneberg, [26], and Laman, [58],or the more recent works by Graver et al. [24], Fudos and Hoffmann, [22],Hoffmann et al., [33], and Whitley, [86, 87].

3 General Properties of Solving Techniques

The properties a geometric constraint solver should have include

• Soundness: The solver always halts and, if a solution is found, itsatisfies all stipulated constraints.

6

Page 7: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

d2

d1

d2

d1

β

P

β

α

Figure 4: Left: General configuration. Right: Degenerate configuration forα + β = 90◦.

• Completeness: The solver solves all solvable problems and announcesthe unsolvability of all unsolvable problems.

• Competence: Since the known, efficient methods are not complete,property that is more attractive in practice is that the solver solvesall solvable problems in a subdomain of interest and, for unsolvableproblems in the subdomain, announces unsolvability. Note that a char-acterization of the subdomain may be difficult.

• Persistence: With the same set of (valuated) constraints the solveralways finds the same solution.

• Stability : Under small changes of assignments to the geometric con-straint tags, the solution found is nearby.

• Efficiency : Efficiency measures the computational cost, that is, whethersolutions are found rapidly.

• Robustness: A solver is robust if the solutions are not adversely af-fected by the finite precision of floating-point computations.

Additional desirable properties that enhance a solver’s performance are

• Intensionality : The solver finds solutions that the user is interestedin.

• Geometric sense: A solver has geometric sense whenever the solutionsit finds can be expressed as a sequence of geometric construction steps.

7

Page 8: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

• Dimension independence: The solver can be used for problems embed-ded in the space E = Rn, independently of n.

• Generality : The solver can deal with the general geometric constraintsolving problem including symbolic constraints and external variables.

For 2D solvers, there are good compromises that achieve these solvercharacteristics to a reasonable degree. However, it is difficult to obtainsolvers that exhibit persistence and stability fully, [53].

In general, solver competence is the antithesis of efficiency since con-straint solving is of doubly exponential complexity. Intensional problemsinclude root selection, orientation, and topological degeneracy for specificdimensional values. They may look simple but generally are associated withcomplex mathematical problems.

4 Major Approaches

Geometric constraint solving methods can be roughly classified as graph-based, logic-based, or algebraic. For 2D solvers, the graph-based approachhas become dominant in CAD. A problem closely related to geometric con-straint solving is Automated Theorem Proving.

4.1 Graph-Based Approach

In the graph-based approach, the constraint problem is translated into agraph (or hyper graph) whose vertices represent the geometric elementsand whose edges the constraints upon them; see Section 9. The solveranalyzes the graph and formulates a solution strategy whereby subproblemsare isolated and their solutions suitably combined. A subsequent phase thensolves all subproblems and combines them. The advantage of this type ofsolver is that the subproblems often are very small and fall into a few simplecategories. The disadvantage is that the graph analysis of a fully competentsolver is rather complicated.

The graph-based approach can be further subdivided into constructive,degree of freedom analysis, and propagation.

8

Page 9: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

4.1.1 Constructive Approach

The constructive approach generates the solution to a geometric constraintproblem as a symbolic sequence of basic construction steps. Each step isa rule taken form a predefined set of operations that position a subset ofthe geometric elements. For example, the operations may restrict to ruler-and-compass constructions. Clearly, this approach preserves the geometricsense of each operation involved in the solution. Note that the sequenceof construction steps allows to compactly represent a possibly exponentialnumber of solution instances. However, the constructive approach cannotsolve problems with symbolic constraints or external variables.

Depending on the technique used to analyze the problem, two differentcategories of constructive approaches can be distinguished: top-down andbottom-up.

The top-down technique recursively splits the problem until it has iso-lated simpler, basic problems whose solutions are known. In this category,Todd, [82], defines the r-tree concept and derives a geometric constraintsolving algorithm. Owen, [70], describes a more general method based onthe recursive decomposition of the constraints graph into triconnected com-ponents. Inspired by Owen’s work, Fudos reported a new decompositionmethod in [20, 22]. Efficient algorithms with a running time O(n2), wheren is the number of geometric elements, are known for the methods of Owen,[70], and Fudos, [20, 22].

In the bottom-up approach, the solution is built by suitably combiningrecursively solutions to subproblems already computed, starting from theconstraints in the given set, considering each constraint as a single element.

Constraints may be represented implicitly as a collection of sets of geo-metric elements where the elements of each set are placed with respect toa local framework. Sets are merged; e.g., by application of rewriting rulesuntil all the geometric elements are included in just one set. The advantageof this representation is that the sets of constraints capture the relation-ships between geometric elements compactly. Fudos et al., in the methoddescribed in [6, 20, 21, 22], use one type of sets of constraints, called cluster,and one generic rule that merges three clusters which pairwise share twoelements.

Lee et al., [61], describe a constructive method that associates with eachvertex in the graph a status which can be defined, half defined or not defined.

9

Page 10: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

Inference rules are used to modify the status of the vertices.

Efficient algorithms with a running time O(n2), where n is the number ofgeometric elements, are known for the methods listed above. However, theconstructive approach is not complete, therefore assessing the competenceof solvers in this category is an important issue. Verroust, [84, 85], partiallycharacterizes the set of relevant problems solved by the solver described.Joan-Arinyo et al., [46, 47], describe a formalization that unifies the methodsreported by Fudos, [21, 22], and Owen, [70]. In [46, 48], Joan-Arinyo et al.show that the sets of problems solved by Fudos’ and Owen’s approaches arethe same.

In [32] Hoffmann and Joan-Arinyo describe a technique that extendsconstructive methods with the capability of managing functional relation-ships between geometric and externals variables. Essentially, the techniquecombines two methods: one is a constructive constraint solving method, andthe other is a systems of equations analysis method. Joan-Arinyo and Soto-Riera, [45], further improved the technique and formalized it as a rewritingsystem.

Constructive methods work well in 2-space. Several attempts to extendthem to 3-space have been reported. See, for example, Bruderlin [7], Ver-roust [84], and Hoffmann and Vermeer [37, 38].

4.1.2 Degrees of Freedom Analysis

Degrees of Freedom Analysis assigns degrees of freedom to the geometricelements by labeling the vertices of the graph of the problem. Each edge ofthe graph is labeled with the number of degrees of freedom canceled by theassociated constraint. Then the method solves the problem by analyzingthe resulting labeled graph.

Kramer, [54, 55, 56], developed a method to solve specific problems fromthe kinematics of mechanisms. The method applies techniques borrowedfrom the process planning field to yield a symbolic solution. Since the set ofrules used to generate the plan preserves geometric sense, the entire methodalso preserves it. Kramer, [54], proves that his method is correct by showingthat the set of rules together with the labeled graph is a canonical rewritingsystem. The method runs in time O(nm), where n is the number of geomet-ric elements and m the number of constraints in the problem. Since m istypically O(n), the method has the same complexity as the constructive ap-

10

Page 11: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

proach. Bhansali et al., [3], describe a method that generates automaticallysegments of the symbolic solution in Kramer’s approach.

Salomons et al., [72], represent objects and constraints as a graph and ap-ply geometric and equational reasoning following the lines given by Kramer’smethod.

In [39, 40], Hsu reports a method with two phases. First, a symbolicsolution is generated. Then, the actual construction is carried out. Themethod applies geometric reasoning and, if this fails, numerical computation.

Latham et al., [60], decompose the labeled graph in minimal connectedcomponents called balanced sets. If a balanced set corresponds to one of thepredefined specific geometric constructions, then it can be solved. Otherwisethe underlying equations are solved numerically. The method also deals withsymbolic constraints and identifies over- and under constrained problems.Assigning priorities to the constraints allows them to solve over constrainedproblems. A proof of correctness is also given.

Hoffmann et al., [33, 34, 35, 36], have developed a flow-based method fordecomposing graphs of geometric constraint problems. The method generi-cally iterates to obtain a decomposition of the underlying algebraic systeminto small subsystems called minimal dense subgraphs. The method fullygeneralizes degree-of-freedom calculations, the approaches based on match-ing specific subgraphs patterns, as well as the prior flow-based approaches.However, the decomposition rendered does not necessarily have geometricsense since minimal dense subgraphs can be of arbitrary complexity far ex-ceeding problems that yield to classical geometric construction.

4.1.3 Propagation Approach

Propagation methods represent the set of algebraic equations with a sym-metric graph whose vertices are variables and equations and whose edgesare labeled with the occurrences of the variables in the equations.

Propagation methods try to orient the edges in the graph in such a waythat each equation vertex is a sink for all the edges incident on it exceptone. If the process succeeds, then there is a general incremental solution.That is, the system of equation can be transformed into a triangular systemand solved using back substitution.

Among the techniques to orient a graph we find in the literature degreesof freedom propagation and propagation of known values, [19, 73, 83]. Prop-

11

Page 12: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

agation methods do not guarantee finding a solution whenever one exists.They fail when the orientation algorithm finds a loop. Propagation methodscan combined with numerical methods for equation solving to ameliorate cir-cularity, [5, 57, 77, 81]. Veltkamp and Arbab, [83], apply other techniquesto break loops created while orienting the graph.

Leler, [62], describes propagation methods in depth and proposes aug-mented rewriting terms, a tool which consists of a classical rewriting systemalong with an association of atomic-value and object-type. This tool hashad success in solving certain systems of nonlinear equations.

In [4], Borning et al., describe an local propagation algorithm that candeal with inequalities.

4.2 Logic-Based Approach

In the logic-based approach, the problem is translated into a set of asser-tions and axioms characterizing the constraints and the geometric objects.By employing reasoning steps, the assertions are transformed in ways thatexpose solution steps in a stereotypical way and special solvers then computecoordinate assignments.

Aldefeld, [1], Bruderlin, [8, 9, 10], Sohrt, [75, 76], Sohrt, et al.[75, 76], andYamaguchi et al., [90], use first order logic to derive geometric informationapplying a set of axioms from Hilbert’s geometry. Essentially these methodsyield geometric loci at which the elements must be.

Sunde, [80], and Verroust, [84, 85], consider two different types of setsof constraints: sets of points placed with respect to a local framework, andsets of straight line segments whose directions are fixed with respect toa local framework. The reasoning is basically performed by means of arewriting system on the sets of constraints. The problem is solved when allthe geometric elements belong to a unique set. Joan-Arinyo and Soto-Riera,[43, 44], extended these sets of constraints with a third type consisting ofsets containing one point and one straight line such that the perpendicularpoint-line distance is fixed.

4.3 Algebraic Methods

In the algebraic approach, the constraint problem is translated directly intoa set of nonlinear equations and is solved using any of the available methods

12

Page 13: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

for solving nonlinear equations. The main advantages of algebraic solversare their generality, dimension independence and the ability to deal withsymbolic constraints naturally.

In principle, an algebraic solver can be fully competent. However, al-gebraic solvers may have low efficiency or may have difficulty constructingsolutions reliably. When used to pre-process and study specific constraintsystems, however, algebraic techniques can be extremely useful and verypractical.

As a result of mapping the geometric domain problem into an equationalone, the geometric sense of the solutions rendered is lost. Moreover, wellconstrained problems are mapped to under constrained systems of equationsbecause constraints fix the placement for each geometric element with re-spect each other only modulo translation and rotation. Therefore a set ofadditional equations must be joined to cancel these remaining degrees offreedom.

Algebraic methods can be further classified according to the specifictechnique used to solve the system of equations, namely into numerical,symbolic, and analysis of systems of equations.

4.3.1 Numerical Methods

Numerical methods provide powerful tools to solve iteratively large systemsof equations. In general, a good approximation of the intended solutionshould be supplied to guarantee convergence. This means that if, as it iscustomary, the starting point is taken from the sketch defined by the user,then the sketch should be close to the intended solution. The numericalmethods may offer little control over the solution in which the user is inter-ested. To achieve robustness, numerical iterative methods must be carefullydesigned and implemented.

Borning, [5], Hillary and Braid, [28], and Sutherland, [81] use a relax-ation method. This method is an alternative to the propagation method.Basically, the method perturbs the values assigned to the variables and mini-mizes some measure of the global error. In general, convergence to a solutionis slow.

The method most widely used is the well-known Newton-Raphson, [49]iteration. It is used in the solvers described in [27, 63, 64, 69]. Newton-Raphson is a local method and converges much faster than relaxation. The

13

Page 14: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

method does not apply to consistently over constrained systems of equationsunless special provisions are made such as combining it with least-squarestechniques.

Homotopy or continuation, [2], is a family of methods with a growingpopularity. These methods are global and guarantee convergence. More-over, they are exhaustive and allow to determine all solutions of a constraintproblem. However, their efficiency is worse than that of Newton-Raphson.Lamure and Michelucci, [59], and Durand, [18], apply this method to geo-metric constraint solving.

Other, less conventional methods have also been proposed. For example,in [25], Hel-Or et al., introduced the relaxed parametric design method wherethe constraints are soft, that is, they do not have to be met exactly, theproblem is modeled as a static stochastic process, and the resulting systemof probabilistic equations is solved using the Kalman filter familiar fromcontrol theory. The Kalman filter was developed to efficiently compute linearestimators and when applied to nonlinear systems, it does not necessarilyfinds a solution even if one exists.

Kin et al., [50], reported on a numerical method based on extendedBoltzmann machines which are a sort of neural network whose goal is tominimize a given polynomial that measures the energy of the system.

4.3.2 Symbolic Methods

Symbolic algebraic methods compute a Grobner basis for the given system ofequations. Algorithms to compute these bases include those by Buchberger[12], and by Wu-Ritt [14, 89]. These methods, essentially, transform thesystem of polynomial equations into a triangular system whose solutionsare those of the given system. In effect, triangularization reduces solvinga simultaneous, nonlinear system to univariate root finding. Forward or abackward substitution must be used.

Buchanan et al., [11], describe a solver built on top of the Buchberger’salgorithm. In [51], Kondo reports a symbolic algebraic method. In [52],Kondo improves that work by generating a polynomial that summarizes thechanges undergone by the system of equations.

14

Page 15: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

4.3.3 Analysis of Systems of Equations

Methods based on the analysis of systems of equations determine whether asystem is under-, well- or over-constrained from the system structure. Thesemethods can be extended to decompose systems of equations into a set ofminimal graphs which can be solved independently, [68, 79]. They can beused as a pre-processing phase for any other method, reducing the numberof variables and equations that must be solved simultaneously.

Serrano, [74], applies analysis of systems of equations to select from a setof candidate constraints a well constrained, solvable subsets of equations.

4.4 Theorem Proving

Solving a geometric constraint problem can be seen as automatically prov-ing a geometric theorem. However, automatic geometric theorem provingrequires more general techniques and, therefore, methods which are muchmore complex than those required by geometric constraint solving.

Wu Wen Tsun pioneered the Wu-Ritt method, an algebraic-based geo-metric constraint solving method. In [88, 89], he uses it to prove geometrictheorems. The method automatically finds necessary conditions to obtainnon-degenerated solutions.

In [14], Chou applies Wu’s method to prove novel geometric theorems.Chou et al., in [15, 16], report on a work in automatic geometric theoremproving which allows to interpret, from a geometric point of view, the proofgenerated by computation.

5 The Constraint Graph

As has been said in Section 4, in the graph-based approach, solvers initiallytranslate the problem into a graph which is then analyzed. Next we detailthe graph structure and the role it plays.

5.1 The graph

In the constraint graph, the vertex set corresponds to the geometric elementsof the problem. Each vertex is attributed with a weight that is its degree of

15

Page 16: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

freedom, normally the number of independent coordinates needed to situatethe geometric element represented. In the case of points and unconstrainedlines in the plane this would be 2, in the case of circles (with no prescribedradius) it would be 3. If a line is constrained to be horizontal (or vertical),the weight would be 1.

The geometric constraints are represented by graph edges. They includedimensional constraints (angle, distance, etc.), and logical constraints (inci-dence, concentricity, etc.). It is customary that the sketcher infers incidence(and sometimes additional) constraints. They are also represented in thegraph. Furthermore, certain transformations may be applied that changethe constraint problem internally. For example, a circle with prescribed ra-dius may be replaced with its center point after suitably changing constraintson the circle to equivalent constraints on the center of the circle. Edgesare annotated by the number of degrees of freedom they remove, usuallythe number of independent equations. For instance, a distance constraintbetween two points would remove 1 degree of freedom, but an incidenceconstraint between two points would remove 2.

A global analysis of whether a problem is well-constrained can be doneby summing the vertex weights and subtracting the sum of the edge weights.See Laman [58]. The resulting number has been called the deficiency of theproblem. For coordinate-free problems (i.e., problems where the solutionis not in fixed position with respect to a global coordinate system), a wellconstrained 2D problem should result in a deficiency of 3; e.g., [20]. Whenthe problem is to be situated with respect to a fixed coordinate system, thena deficiency of zero would be required.

An induced subgraph can be solved if it corresponds to a well-constrainedsubproblem. Finding a minimal subgraph gives us a minimally complicatedproblem to solve. We call such a problem a cluster core. Once a subproblemhas been solved, we may enlarge the subproblem sequentially by geometricelements: If the element has weight k and is constrained with respect togeometric elements in the subproblem where the edge weights sum to k,then we may add the new element as a sequential extension of the cluster.

By analyzing the constraint graph in this way, it can be decomposedinto a set of clusters that can be solved separately. Several clusters can becombined when they overlap pairwise in a single geometric element. Here, weinfer constraints between the shared elements, from the solved subproblems.The shared elements can be placed with respect to each other and form askeleton on which to place the solved clusters. In 2-space solvers employing

16

Page 17: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

triangle decomposition, so combining three clusters is a natural step; [6, 20].Clusters can also be sometimes added individually in analogy to a sequentialextension.

Triangle decomposition employs only 2-element cluster cores and mergesthree clusters that pairwise share a geometric element. Such 2D solvers arevery attractive because they are reasonably competent in CAD applicationsand are conceptually very simple. They also require no more than solvingunivariate quadratic equations. The theory of such solvers is fairly wellunderstood with respect to intensionality; [21].

If the entire constraint graph is recursively decomposable into a singlecluster, then the planning phase succeeds and a solution of the constraintproblem is possible in principle. If the decomposition fails, then the solverwill announce that no solution can be found. This means that there is nosolution based on triangle decomposition, but it does not mean that there isno solution. Here we see the difference between a particular strategy and afully general constraint solver. There is a known algorithm that will succeedin polynomial time decomposing any graph that corresponds to a solvableconstraint problem, but it is more complex and the subsequent solver phasealso is more demanding, because there cannot be an a-priori restriction onthe size of minimal cluster cores; [33, 34].

5.2 Order of Decomposition

Typically the graph can be decomposed in several ways, raising the questionwhether a canonical decomposition order is required to find a solution if oneexists. There are theorems which prove that if a constraint graph can bedecomposed in one way, using triangle decomposition, then every sequenceof triangle decompositions fully decomposes the constraint graph. The proofis based on the Church-Rosser property of graph reduction by fusing solvablesubgraphs into single nodes; [21]. These theorems can be generalized, andthe order of decomposition is not critical for determining solvability, [36, 35,36].

6 Solver Phase

When the constraint graph has been analyzed and a solution plan formulatedsuccessfully, a second phase assigns coordinates and solves equations to do

17

Page 18: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

so. The basic step here is to place a pair of constrained geometric elementsinto a standard position and then to add sequentially to this cluster core. Sixbasic cases can be distinguished when the universe of geometric elements isrestricted to points and lines (and, by extension, to fixed-radius circles). Oneof these cases is indeterminate. The others may have up to four solutions.Based on heuristics, the solver selects one of these. Typically the selectedsolution has the same order type as the input sketch based on the hypothesisthat the sketch captures the intent of the user. The input sketch data iscommunicated by giving the initial coordinates of each element as sketchedby the user. This strategy of selecting the order type can fail when theuser varies dimensional values. It may be that under different dimensionalparameters a different order type is needed, and that the previous sketch nolonger is a good guide of design intent.

When merging three clusters, the solution can be reduced to the clustercore/sequential extension procedure by considering one cluster (A) the coreand deriving, from the other two clusters (B) and (C), a measured constraintbetween the shared elements in (A) and the (third) element shared between(B) and (C). In this way placing the third element with respect to (A)is simply a sequential extension. Once placed, rigid transformations arecomputed that place all other elements of (B) and of (C) with respect tothe cluster (A).

If the graph analysis determines that the problem is solvable in principle,based on a successful graph decomposition, must the solver phase necessarilyfind a solution? The answer to that is clearly no. Consider stipulating thelengths of the three sides of a triangle to be, respectively, 1, 1, and 3. Sincethe triangle inequality is violated, there cannot be a solution, even thoughgenerically there could exist one, for different side lengths.

7 Root Selection

Even sequential constraint problems have several solutions. Which one ofthe (perhaps exponentially) many solutions to select is the root-selection orchirality problem. The selection is usually made on basis of the user sketch,preserving where possible the order type of the solution. It is noteworthythat the strategy is invariant under decomposition order, in the case oftriangle decomposition. It can be shown that the same triples are queried fororder type when so constructing a solution, and that congruent solutions willbe determined no matter what order of decomposition is followed [20, 21].

18

Page 19: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

On initial design it is reasonable to expect that the input sketch andthe solution the user wants are of the same order type. However, as wesuggested before, this is not necessarily the case when exploring variationsof a sketch obtained by varying dimensional parameters and examples of thisphenomenon are easy to construct. A systematic exploration of the solutionsis possible using a tree in which each interior node represents a constructedsolution and the descending children are obtained from the different rootsof the system of equations solved at that point, [6]. This approach is notparticularly user-friendly, but it is fully general.

Automated techniques are not of promising generality. For example,consider stipulating that the constraint solution be a non self-intersectingpolygon. We can show that this requirement leads to NP-hard steps in thesolver, [20]. Other approaches that are based on user-interaction includedragging a single geometric element into a different position followed by arenewed run of the solver phase. This is the approach used by DCM, a com-mercial constraint solver. The effect is that some of the triples involving thedragged elements now have a different order type, so that a different solu-tion would be found. This can confuse the user when several triples shouldbe of different order type since the intermediate stages are not necessarilyintuitive or suggestive of progress, or even constructible.

Another variation, also requiring user interaction, is to present to theuser each solution step visually with each alternative shown so that a se-lection can be made. This is in effect the tree exploration (on demand)with a graphical method of asking for the intended branch. Clearly, allsuch root selection modifications should be done on demand only, and theywill require user sophistication and a conceptual understanding of the rootselection problem.

8 Variable-Radius Circle

When circular elements are used without a definite radius, we must extendthe graph analysis to working with vertices of weight 3. These circles havebeen called variable-radius. One of the uses of variable-radius circles is toconstruct geometrically constraint definitions of the kind where two lengthsshould be equal. More complex polynomial relationships can also be con-structed geometrically.

Including variable-radius circles impacts both the basic construction

19

Page 20: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

steps as well as cluster merging. The sequential construction steps are fairlysimple and involve, on the solver side, classical geometry of conic sections;[71].

Cluster merging entails, as additional construction step, merging threeclusters where one cluster is simply a variable-radius circle. The correspond-ing solver steps can be complicated. The arising algebraic equations can besimplified by spatial geometric constructions, in particular by cyclographicor Laguerre maps, [30, 31, 13] Typically, commercial solvers implement theseconstructions numerically, if at all.

The geometry of solving variable-radius problems using Laguerre mapscan be very elegant and leads in general to simpler algebraic systems becauseit is capable of differentiating among the possible solutions different orien-tations, thereby in effect factoring the system. It is not obvious whether anabstract algebraic equivalent can be formulated that factors the equationsdirectly. Several papers have been published that address variable-radiuscircle configurations and enumerate the possible configurations.

9 SolBCN. A Constructive Logic-Based Solver

To illustrate some of the concepts described so far, we briefly describe themain features of the constructive, logic-based solver SolBCN, [78].

The solver handles two-dimensional geometric configurations composedof points, segments, and fixed-radius arcs and circles. The constraints thatcan be defined on those objects include distance between two points, perpen-dicular distance between a point and a segment, angle between two segments,incidence, perpendicularity, parallelism, tangency and concentricity.

The solver is variational, i.e., the solver processes the constraints withoutthe need of arranging them in a predefined order. Furthermore, the solvercan deal with problems with circular constraints.

The basic method for solving geometric constraints is a constructiveapproach and exhibits properties of both rule- and graph-constructive ap-proaches, Bouma et al., [6]. In a first phase, the solver uses rewrite rules tobuild a sequence of construction steps which, in a second phase, are carriedout to generate a solution by placing the geometric objects according to thedimension values and constraints. We explain how the data is representedand which rules are available.

20

Page 21: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

9.1 Data Representation

All constraints mentioned can be represented by means of distance betweentwo points, distance between a point and a straight line segment and anglebetween two straight line segments. We use a notation derived from Ver-roust, [85]. The distance constraints between points are represented by aCD set, the point-segment distance constraints are represented by a CH

set, and the angle constraints between two segments are represented by aCA set. We define these sets more formally as follows.

A CD set is a set of points with mutually constrained distances. A frameof reference is attached to each CD set and the points in the set are placedwith respect to this frame. When a CD set contains just two points, wewill refer to it as an elementary CD set. It is worth noting that a sketch issolved when all the points in the sketch belong to the same CD set.

A CH set is a point and a segment constrained by the perpendiculardistance from the point to the segment. A CA set is a pair of orientedsegments which are mutually constrained by angle. In what follows, we willrefer generically to the CD, CA and CH sets as constraint sets.

9.2 Rules

We classify the rules into one of the following types: creation rules, mergingrules or construction rules.

Creation rules create elementary CD sets, CA sets and CH sets as aninterpretation of the problem sketched by the user. The sign of the distancesand angles are defined based on what the user has sketched. When a distanceconstraint between two points is given, a CD set is created. The position ofthe points in the associated frame of reference are (0, 0) and (d, 0). (Figure 5left.) When an angle constraint between two directed segments is processed,a CA set is created where one of the straight segments defines the positive x

axis. (Figure 5 middle.) Whenever a point, a segment and the perpendiculardistance from the point to the segment are given, a CH set is created.(Figure 5 right).

Merging rules include just one rule that computes the transitive closureof the angle constraint set. When a segment belongs to two different CA

sets, ca1 and ca2, a new CA set, ca3, is created which constrains the angleof two segments, one in ca1 and the other in ca2, both different from the

21

Page 22: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

y(p3, p2)

αx

p1 p2

hx

y

p3 p1

(p4, p1)

p

Figure 5: From left to right: Creation of elementary CD, CA and CH sets.

shared segment. See Figure 6.

Construction rules merge CD sets, CH sets, and CA sets into larger CD

sets. Merging is performed by building triangles and a few quadrilaterals.A complete description reported by Joan-Arinyo et al. can be found in [42].

9.3 Implementation

Figure 7 shows the architecture of SolBCN, [47]. The geometric constraintsolving problem is split into three main components: analyzer, index selectorand constructor. The analyzer symbolically determines whether the problemis or is not solvable. If it is solvable, the analyzer generates a sequence ofconstruction steps.

The selector solves the root selection problem by choosing a specificsolution instance; see also Section 7. The selection techniques implementedare user-sketch-based, and genetic algorithms. See Luzon [65] and Joan-Arinyo et al., [41]. The constructor carries out the actual construction of thegeometric object by applying the sequence of construction steps generatedby the solver with the actual parameter values.

There are several reasons for this architecture. First, the nature of thecomputations in each step is quite different. The analyzer requires symboliccomputation while the constructor only performs numerical computations.Second, determining whether the problem can be symbolically solved or notis performed in the analysis step and it does not depend on the actual pa-rameter values nor on the geometric computations. Next, when computingsolutions of different parameter values using this decoupling, only the sec-

22

Page 23: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

a

ca2c y

δ

β

x

ca3

b

c

y

γδ − (β − α)x

ca1y

x

α

a

γ

b

Figure 6: Merging two CA sets.

Abstractproblem

SELECTORANALYZER

Abstractplan

IndexAssignment

Parameterassigment

CONSTRUCT

Geometryassignment

Figure 7: SolBCN architecture.

23

Page 24: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

ond step needs to be recomputed. The analysis step, computationally themost expensive part, can be skipped. Finally, given a symbolically solvableproblem and a set of actual values for the parameters, the solution can beinstantiated if there are no quantitative inconsistencies in the parametervalues. The inconsistencies are detected while carrying out the geometriccomputations.

The analyzer is an expert system programmed in Prolog. Prolog waschosen because of its support for the symbolic computation in the analysisphase and because it is a rapid prototyping language. The constructoris a virtual machine that just executes the sequence of construction stepsgenerated by the analyzer.

10 Spatial Constraint Solving

In 2D sketching applications, a major application area of constraint solving,graph-based solvers have become dominant. The underlying reason is thatfor the constructs common in 2D sketching a small set of subgraphs suffices,and that the associated algebraic solution problems are rather simple. Inconstrast, spatial constraint solving does not appear to have a simple andsmall core that suffices for most practical applications.

When approached using graph decomposition, the problem of spatialconstraint solving is that simple subgraphs of, even up to 6 vertices, arenumerous and many of them correspond to associated algebraic problemsthat are rather difficult. Note that a subgraph with 6 vertices is the smallestsimultaneous spatial constraint problem involving only points and planes.

There is also the problem that no consensus has arisen of the charac-teristic spatial constraint problems of relevance to, say, CAD, so that thereis little guidance on how to select a subset from the subgraph patterns toarrive at a compact solver that is widely applicable. In this section we re-view some of these issues in the context of a graph decomposition solverarchitecture. We begin with the problem of solving the equations associatedwith a selection of spatial constraint problems.

10.1 Sequential Construction Problems

The simplest 3-space constraint problems require placing a single geometricelement (point, plane or line) with respect to a set of geometric elements

24

Page 25: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

whose position and orientation are known. We call such problems sequential,since the elements are placed one-by-one sequentially.

Many, but not all, sequential problems are easy to solve. For example,placing a point with respect to three known points requires the intersectionof three spheres. Elementary algebraic manipulation reduces this task tosolving a univariate quadratic equation. On the other hand, a difficult se-quential problem is placing a line such that it is at prescribed distance fromfour known points in 3-space. Geometrically, this is equivalent to findingcommon tangents to four given spheres.

A lower bound on the number of tangents to four spheres was establishedby Macdonald et al., [66], who exhibited four unit spheres that have 12 dis-tinct, common tangents. That this bound is sharp was proved by Hoffmannand Yuan in [29] by deriving a nonlinear system of equations whose solutionsgive all common tangents. It was shown that the geometric degree of thesystem is 12, thus establishing the missing upper bound. Note that solvingthis system is not trivial.

10.2 Algebraic and Geometric Solutions

In the algebraic approach to solving specific constraint problems, one for-mulates a system of algebraic equations. The system is then simplified usingalgebraic manipulation and geometric reasoning, and if the resulting systemis simple enough, its solutions can be computed with high reliability andaccuracy. For spatial constraint problems, it is not necessarily easy to findsuch simple systems, and so computing solutions may require sophisticatedalgorithms, e.g., [18]. As we have seen, sequential problems may alreadyrequire solving algebraic systems of degree 12.

A geometric aspproach to finding the solutions of a nonlinear equationsystem is the locus method, [23]. Instead of relying only on root findingtechniques, a geometric idea is introduced:

Drop one constraint from the problem, say a dimensional con-straint c, resulting in an underconstrained problem. Evaluate theunderconstrained configuration and measure the actual value ofthe dimension. Different configurations lead to different values,resulting in a curve that can be traced. This curve is the locusof c. Intersect the locus of c with the nominal constraint value,usually a straight line. The resulting intersection configurations

25

Page 26: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

Figure 8: Octahedral graph.

are solutions to the original system.

The method can be extended to computing the locus of more than one cutconstraint, resulting in geometric manifolds of higher dimensions. Cuttingtwo constraints we would obtain a surface that would be intersected withtwo planes, cutting three constraints a spatial manifold is obtained, and soon. We will illustrate the idea for octahedral problems.

10.3 Octahedral Problems

Consider a constraint graph with six vertices and with edges arranged asshown in Figure 8. We call such a graph octahedral on account of the factthat the topology is that of the vertices and edges of a regular octahedron.The vertices represent points or planes in 3-space, and the edges thereforea distance between two points, a distance between a point and a plane,and/or an angle between two planes. There are seven major configurationsaccording to the number of planes in the problem. Two of them, namelyconfigurations with 5 or 6 planes, are structurally under determined. Theother five configurations can be solved algebraically; [37].

An elegant approach to formulating the equation system is due to Michelucci,[67]1 who employs the Cayley-Menger determinant as follows.

1The URL is no longer valid.

26

Page 27: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

Figure 9: Octahedral graph. In red, dependent distances.

The determinant expresses the distances between the five points:

0 1 1 1 1 1

1 0 d12 d13 d14 d15

1 d12 0 d23 d24 d25

1 d13 d23 0 d34 d35

1 d14 d24 d34 0 d45

1 d15 d25 d35 d45 0

= 0

where the dik = ‖pi − pk‖2 is the squared distance between the points pi

and pk. Choosing two sets of five points in the configuration, we can expressthe squared distances indicated in red in Figure 9 as function of the givendistances. This results in two bivariate equations of degree 4 each in thetwo unknown distances, indicating at most 16 distinct solutions. That thebound of 16 solutions is sharp was shown earlier by Hoffmann and Vermeerin [37]. Suitable extensions of the Cayley-Menger determinant can be usedfor the remaining cases comprising both points and planes.

A solution of the two quartic equations can be obtained by the locusmethod, for example. Each quartic equation taken separately yields a planecurve. Tracing these curves can then give initial values for an iterativenumerical method that isolates the up to 16 roots of the system.

The locus method can also be used to plot directly the value of a cutconstraint, and we explain the approach assuming only points in the con-figuration. Consider Figure 10. Select the three blue vertices and cut thered constraint. The three blue vertices can be positioned using the blue

27

Page 28: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

G G

G

B B

B

Figure 10: Octahedral problem. The locus method.

constraints only, in the xy-plane for example.

Each of the green vertices, together with the adjacent blue vertices, canbe thought of as a rigid triangle that pivots about a blue edge, and so thegreen vertices move each on a circle whose plane is perpendicular to thexy-plane. Select one green vertex and parameterize its position on the circleon which it moves, say by θ. For a given θ value, we can now computethe position of the remaining two green vertices using the black constraints,intersecting a circle and a sphere. Once these vertices have been placed, wecan compute the distance d between the two vertices adjacent to the cut, redconstraint, so plotting a curve in the θd-plane. Intersecting the curve withthe line d = d0, where d0 is the distance stipulated by the red constraint,we obtain all solutions to the original problem.

10.4 Line Configurations

In the discussion of sequential problems before, we have seen that sequentialline problems in 3-space may yield algebraic equation systems of considerablecomplexity. In addition, there is a large number of individual problemsinvolving only a small number of geometric elements. We illustrate thecombinatorial explosion of cases involving constraint graphs with 6 or fewervertices representing points, lines and planes.

Note that between two planes, between to points, and between a pointand a plane we can have at most one constraint, namely of angle, of distance,and of distance, respectively. Hoffmann and Vermeer show in [37] that the

28

Page 29: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

G

B B

G

Figure 11: The four lines problem.

octahedron problem is the simplest, nonsequential problem involving onlypoints and planes. As shown in that paper, there are exactly seven distinctmajor2 configurations, two of them underconstrained.

We can have at most a single constraint between a point and a line (dis-tance), and a single constraint between a plane and a line (angle). However,between two lines we can have up to two constraints (distance and angle).As Gao et al. show in [23], there are two distinct nonsequential constraintproblems with four lines, shown in Figure 11.

The blue lines represent two constraints, of angle and distance, and theblack line represents a distance constraint. The two configurations differ inthe red constraint a distance constraint in one and an angle constraint inthe other configuration.

in [23], Gao et al. also establish that there are 17 distinct configurationswith 5 geometric elements, including lines, but more than 680 configurationswith 6 geometric elements. These numbers show that a solver, based ondecomposing a spatial constraint problem into a (recursive) set of smallsubproblems must have a very large repertoire of subproblem patterns, evenwhen allowing only up to six geometric elements. Moreover, the algebraicstructure of the many configurations involving lines remain unexplored.

2Some of the major configurations have several sub configurations. For instance, in a

problem with two planes, the planes could have an angle constraint between them, or no

constraint them, leading to two sub configurations for this case.

29

Page 30: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

Acknowledgements

We wish to acknowledge our collaborators over the years, especially WilliamBouma, Jiazen Cai, Xiangping Chen, Ching-Shoei Chiang, Cassiano Du-rand, Ioannis Fudos, Xiaoshan Gao, Ku-Jin Kim, Ramanathan Kavasseri,Andrew Lomosov, Robert Paige, Meera Sitharam, Antoni Soto, Pamela Ver-meer, Sebastia Vila, Weiqiang Yang, and Bo Yuan. Much of the materialreviewed has been to their credit.

R. Joan-Arinyo has been supported by The Ministerio de Educaciony Ciencia and by FEDER under grant TIN2004-06326-C03-01. Hoffmann’swork has been supported in part by NSF grants DMS-013098, DCNS-0216131,DHER-0227828, DSC-0325227, DCMS-0443148, and by an IBM facultyscholar award.

References

[1] B. Aldefeld. Variation of geometric based on a geometric-reasoningmethod. Computer-Aided Design, 20(3):117–126, April 1988.

[2] Eugene L. Allgower and Kurt Georg. Continuation and path following.Acta Numerica, 7:1–64, 1993.

[3] S. Bhansali, G.A. Kramer, and T.J. Hoar. A principled approach to-wards symbolic geometric constraint satisfaction. Journal of ArtificialIntelligence Research, 4:419–443, 1996.

[4] A. Borning, R. Anderson, and B. Freeman-Benson. Indigo: A localpropagation algorithm for inequality constraints. In UIST’96, pages129–136, Seattle, Washington, USA, November 6-8 1996. ACM.

[5] A.H. Borning. The programming language aspects of ThingLab, a con-strained oriented simulation laboratory. ACM Trans. on Prog. Lang.and Systems, 3(4):353–387, October 1981.

[6] W. Bouma, I. Fudos, C. Hoffmann, J. Cai, and R. Paige. Geometricconstraint solver. Computer Aided Design, 27(6):487–501, June 1995.

[7] B.D. Bruderlin. Constructing three-dimensional geometric objects de-fined by constraints. In Workshop on Interactive 3D Graphics, pages111–129. ACM, October 23–24 1986.

30

Page 31: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

[8] B.D. Bruderlin. Rule-Based Geometric Modelling. PhD thesis, Institutfur Informatik der ETH Zurich, 1988.

[9] B.D. Bruderlin. Symbolic computer geometry for computer aided ge-ometric design. In Advances in Design and Manufacturing Systems,Tempe, AZ, Jan. 8-12 1990. Proceedings NSF Conference.

[10] B.D. Bruderlin. Using geometric rewrite rules for solving geometricproblems symbolically. In Theoretical Computer Science 116, pages291–303. Elsevier Science Publishers B.V., 1993.

[11] S.A. Buchanan and A. de Penington. Constraint definition system: acomputer-algebra based approach to solving geometric-constraint prob-lems. Computer-Aided Design, 25(12):741–750, December 1993.

[12] B. Buchberger. Multidimensional Systems Theory, chapter GrobnerBases: An Algorithmic Method in Polynomial Ideal Theory, pages 184–232. D. Reidel Publishing Theory, 1985.

[13] C.-S. Chiang and R. Joan-Arinyo. Revisiting variable-radius circles inconstructive geometric constraint solving. Comp. Aided Geom. Design,221:371–399, 2004.

[14] S.-C. Chou. An introduction to Wu’s method for mechanical theoremproving in geometry. Journal of Automated Reasoning, 4:237–267, 1988.

[15] S.-C. Chou, X.-S. Gao, and J.-Z. Zhang. Automated generation ofreadable proofs with geometric invariants: Multiple and shortest proofgeneration. Journal of Automated Reasoning, 7:325–347, 1996.

[16] S.-C. Chou, X.-S. Gao, and J.-Z. Zhang. Automated generation ofreadable proofs with geometric invariants: Theorem proving with fullangles. Journal of Automated Reasoning, 7:349–370, 1996.

[17] H.M. Cundy and A.P. Rollet. Mathematical Models. Oxford UniversityPress, 1961. Second edition.

[18] C. Durand. Symbolic and Numerical Techniques for Constraint Solving.PhD thesis, Computer Science, Purdue University, December 1998.

[19] B. Freeman-Benson, J. Maloney, and A. Borning. An incremental con-straint solver. Communications of the ACM, 33(1):54–63, 1990.

[20] I. Fudos. Constraint Solving for Computer Aided Design. PhD thesis,Purdue University, Department of Computer Sciences, 1995.

31

Page 32: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

[21] I. Fudos and C.M. Hoffmann. Correctness proof of a geometric con-straint solver. International Journal of Computational Geometry andApplications, 6(4):405–420, 1996.

[22] I. Fudos and C.M. Hoffmann. A graph-constructive approach to solv-ing systems of geometric constraints. ACM Transactions on Graphics,16(2):179–216, April 1997.

[23] X.-S. Gao, C. Hoffmann, and W.-Q. Yang. Solving spatial basic geomet-ric constraint configurations with locus intersection. In Solid ModelingSM’02, Saarbrucken, Germany, 2002.

[24] J. Graver, B. Servatius, and H. Servatius. Combinatorial Rigidity.American Mathematical Society, 1993.

[25] Y. Hel-Or, A. Rapoport, and M.Werman. Relaxed parametric designwith probabilistic constraints. In J. Rossignac, J. Turner, and G. Allen,editors, Second Symposium on Solid Modeling and Applications, pages261–270, Montreal, Canada, May 19-21 1993. ACM Press.

[26] L. Henneberg. Graphische statik. In F. Klein and C. Muller, editors, En-cyklopadie der Mathematischen Wissenschaften, pages Heft 3, Art. 5. B.G. Teubner, Leipzig, 1903. http://www-gdz.sub.uni-goettingen.de/cgi-bin/digbib.cgi? PPN360617042.

[27] A. Heydon and G. Nelson. The Juno-2 constraint-based drawing edi-tor. Research Report 131a, Digital Systems Research Center, December1994.

[28] R.C. Hillyard and I.C. Braid. Characterizing non-ideal shapes in termsof dimensions and tolerances. In ACM Computer Graphics, pages 234–238, 1978.

[29] C. Hoffmann and B. Yuan. There are 12 common tangents to fourspheres. http://www.cs.purdue.edu /homes/cmh/distribution/ Sphere-Tangents.htm, 2000.

[30] C.M. Hoffmann and C.-S. Chiang. Variable-radius circles of clustermerging in geometric constraints. Part II: Rotational clusters. Com-puter Aided Design, 34:799–805, October 2002.

[31] C.M. Hoffmann and C.-X. Chiang. Variable-radius circles of clustermerging in geometric constraints. Part I: Translational clusters. Com-puter Aided Design, 34:787–797, October 2002.

32

Page 33: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

[32] C.M. Hoffmann and R. Joan-Arinyo. Symbolic constraints in construc-tive geometric constraint solving. Journal of Symbolic Computation,23:287–300, 1997.

[33] C.M. Hoffmann, A. Lomonosov, and M. Sitharam. Finding solvablesubsets of constraint graphs. In Principles and Practice of ConstraintProgramming, pages 463–477, Schloss Hagenberg, Austria, October 29- November 1 1977.

[34] C.M. Hoffmann, A. Lomonosov, and M. Sitharam. Geometric constraintdecomposition. In B. Bruderlin and D. Roller, editors, Geometric Con-straint Solving and Applications, pages 171–195. Springer, Berlin, 1998.

[35] C.M. Hoffmann, A. Lomonosov, and M. Sitharam. Decompostion Plansfor Geometric Constraint Problems, Part II: New Algorithms. Journalof Symbolic Computation, 31:409–427, 2001.

[36] C.M. Hoffmann, A. Lomonosov, and M. Sitharam. Decompostion Plansfor Geometric Constraint Systems, Part I: Performance Measurementsfor CAD. Journal of Symbolic Computation, 31:367–408, 2001.

[37] C.M. Hoffmann and P.J. Vermeer. Geometric constraint solving in R2

and R3. In D.-Z. Du and F. Hwang, editors, Computing in EuclideanGeometry, pages 266–298. World Scientific Publishing, 1995.

[38] C.M. Hoffmann and P.J. Vermeer. A spatial constraint problem. In J.P.Merlet and B. Ravani, editors, Computational Kinematics’95, pages 83–92. Kluwer Academic Publ., 1995.

[39] C.-Y. Hsu. Graph-Based Approach for Solving Geometric ConstraintProblems. PhD thesis, Department of Computer Science. The Univer-sity of Utah, June 1996.

[40] C.-Y. Hsu and B.D. Bruderlin. A hybrid constraint solver using exactand iterative geometric constructions. In D. Roller and P. Brunet,editors, CAD Systems Development: Tools and Methods, pages 265–279, Berlin, 1997. Springer-Verlag.

[41] R. Joan-Arinyo, M.V. Luzon, and A. Soto. Genetic algorithms for rootmultiselection in constructive geometric constraint solving. Computer& Graphics, 27(1):51–60, 2003.

33

Page 34: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

[42] R. Joan-Arinyo and A. Soto. A set of rules for a constructive geomet-ric constraint solver. Technical Report LSI-95-19-R, Department LiSI,Universitat Politecnica de Catalunya, 1995.

[43] R. Joan-Arinyo and A. Soto. A correct rule-based geometric constraintsolver. Computer & Graphics, 21(5):599–609, 1997.

[44] R. Joan-Arinyo and A. Soto. A ruler-and-compass geometric constraintsolver. In M.J. Pratt, R.D. Sriram, and M.J. Wozny, editors, ProductModeling for Computer Integrated Design and Manufacture, pages 384– 393. Chapman and Hall, London, 1997.

[45] R. Joan-Arinyo and A. Soto-Riera. Combining constructive and equa-tional geometric constraint solving techniques. ACM Transactions onGraphics, 18(1):35–55, January 1999.

[46] R. Joan-Arinyo, A. Soto-Riera, S. Vila-Marta, and J. Vilaplana. Onthe domain of constructive geometric constraint solving techniques. InR. Duricovic and S. Czanner, editors, Spring Conference on ComputerGraphics, pages 49–54, Budmerice, Slovakia, April 25-28 2001. IEEEComputer Society, Los Alamitos, CA.

[47] R. Joan-Arinyo, A. Soto-Riera, S. Vila-Marta, and J. Vilaplana. Declar-ative characterization of a general architecture for constructive geomet-ric constraint solvers. In D. Plemenos, editor, The Fifth InternationalConference on Computer Graphics and Artificial Intelligence, pages 63–76, Limoges, France, 14-15 May 2002. Universite de Limoges.

[48] R. Joan-Arinyo, A. Soto-Riera, S. Vila-Marta, and J. Vilaplana. Revis-iting decomposition analysis of geometric constraint graphs. In K. Leeand N. Patrikalaikis, editors, Seventh Symposium on Solid Modelingand Applications, pages 105–115, Saarbrucken, Germany, June 19-212002. ACM Press.

[49] L. W. Johnson and R. D. Riess. Numerical analysis. Addison-Wesley,1982. Second edition.

[50] N. Kin, Y. Takai, and T.L. Kunii. A connectionist approach to ge-ometrical constraint-solving. In B. Falcidieno and T. Kunii, editors,Modeling in Computer Graphics. Springer Verlag, 1993.

[51] K. Kondo. PIGMOD : Parametric and interactive geometric modellerfor mechanical design. Computer Aided Design, 22(10):633–644, De-cember 1990.

34

Page 35: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

[52] K. Kondo. Algebraic method for manipulation of dimensional rela-tionships in geometric models. Computer Aided Design, 24(3):141–147,March 1992.

[53] U. Kortenkamp. Foundations of Dynamic Geometry. PhD thesis, ETHZurich, 1999.

[54] G. Kramer. Solving Geometric Constraints Systems. MIT Press, 1992.

[55] G.A. Kramer. Using degrees of freedom analysis to solve geometric con-straint systems. In J. Rossignac and J. Turner, editors, Symposium onSolid Modeling Foundations and CAD/CAM Applications, pages 371–378, Austin, TX, June 5-7 1991. ACM Press.

[56] G.A. Kramer. A geometric constraint engine. Artificial Intelligence,58(1-3):327–360, 1992.

[57] G. Kwaiter, V. Gaildrat, and R. Caubet. Interactive constraint systemfor solid modeling objects. In C. Hoffmann and W. Bronsvoort, editors,Fourth Symposium on Solid Modeling and Applications, pages 265–270.ACM SIGGRAPH, May 1997.

[58] G. Laman. On graphs and rigidity of plane skeletal structures. Journalof Engineering Mathematics, 4(4):331–340, October 1970.

[59] H. Lamure and D. Michelucci. Solving geometric constraints by homo-topy. In C. Hoffmann and J. Rossignac, editors, Third Symposium onSolid Modeling and Applications, pages 263–269, Salt Lake City, UtahUSA, May 17-19 1995. ACM Press.

[60] R.S. Latham and A.E. Middleditch. Connectivity analysis: a tool forprocessing geometric constraints. Computer Aided Design, 28(11):917–928, November 1996.

[61] J.Y. Lee and K. Kim. Geometric reasoning for knowledge-based para-metric design using graph representations. Computer-Aided Design,28(10):831–841, 1996.

[62] W. Leler. Constraint Programming Languages: Their Specification andGeneration. Addison Wesley, 1988.

[63] R. Light and D. Gossard. Modification of geometric models throughvariational geometry. Computer Aided Design, 14:209–214, July 1982.

35

Page 36: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

[64] V.C. Lin, D.C. Gossard, and R.A. Light. Variational geometry incomputer-aided design. ACM Computer Graphics, 15(3):171–177, Au-gust 1981.

[65] M.V. Luzon. Resolucion de Restricciones Geometricas. Seleccion de laSolucion Deseada. PhD thesis, Dept. Informatica, Universidad de Vigo,December 2001. (Written in Spanish).

[66] I. Macdonald, J. Pach, and T. Theobald. Common tangents to fourunit balls. Discr. Comp. Geometry, 26:1–17, 2001.

[67] D. Michelucci. Using Cayley-Menger determinants.http://www.emse.fr/ micheluc/MENGER/. approx. from 2000;URL no longer valid.

[68] K. Murota. Systems Analysis by Graphs and Matroids. Algorithms andCombinatorics 3. Springer-Verlag, 1987.

[69] G. Nelson. Juno, a constraint-based graphics system. SIGGRAPH,pages 235–243, San Francisco, July 22–26 1985.

[70] J.C. Owen. Algebraic solution for geometry from dimensional con-straints. In R. Rossignac and J. Turner, editors, Symposium on SolidModeling Foundations and CAD/CAM Applications, pages 397–407,Austin, TX, June 5-7 1991. ACM Press.

[71] K. Ramanathan. Variable radius circle computations in geometric con-straint solving. Master’s thesis, Department of Computer Science. Pur-due University, 1996.

[72] O.W. Salomons, F. van Slooten, F.J.A.M van Houten, and H.J.J. Kals.Conceptual graphs in constraint based re-design. In C. Hoffmann andJ. Rossignac, editors, Third Symposium on Solid Modeling and Appli-cations, pages 55–64, Salt Lake City, Utah USA, May 17-19 1995. ACMPress.

[73] M. Sannella. The SkyBlue constraint solver. Technical Report 92-07-02,University of Washington, Dep of Computer Science and Engineering,1993.

[74] D. Serrano. Automatic dimensioning in design for manufacturing. InJ. Rossignac and J. Turner, editors, Symposium on Solid ModelingFoundations and CAD/CAM Applications, pages 379–386, Austin, TX,June 5-7 1991. ACM Press.

36

Page 37: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

[75] W. Sohrt. Interaction with constraints in three-dimensional modeling.Master’s thesis, Dept of Computer Science, The University of Utah,March 1991.

[76] W. Sohrt and B.D. Bruderlin. Interaction with constraints in 3D model-ing. International Journal of Computational Geometry & Applications,1(4):405–425, 1991.

[77] L. Solano and P. Brunet. Constructive constraint-based model for para-metric CAD systems. Computer Aided Design, 26(8):614–621, August1994.

[78] A. Soto. Satisfaccio de restriccions geometriques en 2D. PhD thesis,Universitat Politecnica de Catalunya, Dept. Llenguatges i Sistemes In-formatics, 1998. (Written in Catalan).

[79] N. Sridhar, R. Agrawal, and G.L. Kinzel. Algorithms for the struc-tural diagnosis and decomposition of sparse, underconstrained designsystems. Computer-Aided Design, 28(4):237–249, 1996.

[80] G. Sunde. A CAD system with declarative specification of shape. Eu-rographics Workshop on Intelligent CAD Systems, pages 90–105, April1987.

[81] I. Sutherland. Sketchpad, a man-machine graphical communicationsystem. In Proc. of the Spring Joint Comp. Conference, pages 329–345.IFIPS, 1963.

[82] P. Todd. A k-tree generalization that characterizes consistency of di-mensioned engineering drawings. SIAM J. Disc. Math, 2(2):255–261,1989.

[83] R.C. Veltkamp and F. Arbab. Geometric constraint propagation withquantum labels. In B. Falcidieno, I. Herman, and C. Pienovi, editors,Eurographics Workshop on Computer Graphics and Mathematics, pages211–228. Springer, 1992.

[84] A. Verroust. Etude de Problemes Lies a la Definition, la Visualisa-tion et l’Animation d’Objects Complexes en Informatique Graphique.PhD thesis, Universite de Paris-Sud, Centre d’Orsay, 1990. (Written inFrench).

37

Page 38: A Brief on Constraint Solvingrobert/ThailandFull.pdfstraint solving problem comprising flve points pi, 1 • i • 5, and a straight line l1. The set of constraints is given in Figure

[85] A. Verroust, F. Schonek, and D. Roller. Rule-oriented methodfor parameterized computer-aided design. Computer Aided Design,24(10):531–540, October 1992.

[86] W. Whiteley. Applications of the geometry of rigid structures. In HenryCrapo, editor, Computer Aided Geometric Reasoning, pages 219–254.INRIA, 1987.

[87] W. Whiteley. Rigidity and scene analysis. In J.E. Goodman andJ. O’Rourke, editors, Handbook for discrete and computational geome-try, pages 893–916. CRC Press LLC, 1998.

[88] W.-T. Wu. Basic principles of mechanical theorem proving in geome-tries. J. of Systems Sciences and Mathematical Sciences, 4:207–235,1986.

[89] W.-T. Wu. Mechanical theorem proving in geometries. In B. Buch-berger and G. E. Collins, editors, Texts and monographs in symboliccomputations. Springer-Verlag, 1994.

[90] Y. Yamaguchi and F. Kimura. A constraint modeling system for vari-ational geometry. In J.U. Turner M.J. Wozny and K. Preiss, editors,Geometric Modeling for Product Engineering, pages 221–233. ElsevierNorth Holland, 1990.

38