UFDC Home  myUFDC Home  Help 



Full Text  
COMBINATORIAL DECOMPOSITION, AL('" i'RAIC CO P:L:i i I OF Cl: 3 APPLICATIONS IN BIOLOGY GENERIC INDEP "D)ENCE AND i tllC CONI', tAINTS i Y AND ENGINE; ;: ING YOUNG ZHOU A DI '1 STATION N PF i TED TO THE GRADUATE SCHOOL OF THE UNIVi i:.'iTY OF FLORIDA IN PARTIAL FULFILLMENT OF TTI R '.UIREMENTS FOR Til DEGREE OF DOCTOR OF PHILOSOPHY UNIVERSITY OF FLORIDA 1 I i. cate this work to family. AC: i OWLEDC'" 'TS i :i to all for their 1 1 and guidance. TABLE OF CONTENTS page ACKNOWLEDGMENTS ................... ...... iv LIST OF FIGURES ................... ......... viii ABSTRACT ....................... ........... xi CHAPTER 1 INTRODUCTION ................... ........... 1 1.1 Constraint Graphs and Degrees of Freedom .............. 2 1.2 Formal Definition of DRplans and Essential Properties ....... 6 1.2.1 Overconstraints ........ ................ 6 1.2.2 Optimality ......... .................. 7 1.2.3 Completeness ..... ................. 8 1.2.4 Complexity ............... ..... 8 2 PROBLEMS .......... . ............. 9 2.1 Geometric Constraints System Within Feature Hierarchies . 9 2.2 Tractable Combinatorial 3D rigidity characterization . . 9 2.3 A 2D Rigidity Classification Conjecture . . . 10 2.4 Solution Space N ,i.; iii i for Geometric Constraint Systems .... 11 2.5 Combinatorial Optimization of Algebraic Complexity . ... 11 2.6 Optimization of Wellformed Systems of Incidences . ... 12 2.7 Enumeration of Patr,vv~ for Macromolecular Structures ...... 13 3 GEOMETRIC SYSTEM WITHIN FEATURE HIERARCHIES .... 14 3.1 Formal Problem Statement .................. .. 19 3.2 The Frontier Vertex Algorithm (FA) DRPlanner . . .. 23 3.2.1 Distributing Edges ..... .......... ... 24 3.2.2 Simplifying ('ClI. i .................. .. 25 3.2.3 Datastructures. .................. ... .. .. 26 3.2.4 Distributing Vertices and (C!I . . ...... .. 27 3.2.5 Combining Clusters . . ..... ... 28 3.3 Incorporating an Input Feature Decomposition into FA DRplan .28 3.3.1 More Detailed Requirements on the Method . ... 28 3.3.2 Distributing Groups or Features ............... .. 30 3.3.3 Proof of Correctness and Complexity . . ..... 34 3.3.4 Preserving Properties of the Old FA DRplanner ...... ..36 4 COMBINATORIAL 3D RIGIDITY CHARACTERIZATION ...... 41 4.1 Determining Dof Rigidity: The Frontier Vertex Algorithm (FA) .41 4.1.1 The Frontier Vertex DRplan (FA DRplan) . . 43 4.1.2 The Frontier Vertex Algorithm (FA DRplanner) ...... ..44 4.2 ModuleRigidity: (C!i '.terization and Algorithm . ... 50 5 CONJECTURE OF ANGLE CONSTRAINT SYSTEM . ... 56 5.1 Definitions ......... . . ... ..56 5.2 One Combinatorial C('! i '.terization .. ............ 58 5.3 Observations .................. ........... .. 62 5.4 Conjectures .................. ............ .. 65 6 SOLUTION SPACE NAVIGATION ............ ... .. .. 69 6.1 Companion Methods Requirements ................. .. 69 6.1.1 DRPlanner ..... . . ..... ......... 70 6.1.2 Combinatorial ClusterSystem Optimizer (CCO) ...... ..75 6.1.3 Algebraic Solver .................. ..... .. 76 6.1.4 Graphical User Interface (GUI) ............... .. 76 6.2 N i ,i, i ig the Solution Space ................ .. .. 77 6.2.1 The Basic ESM Method ... . . .. 77 6.2.2 ESM's Communication with User and Integration . 89 6.3 Conclusions . . . . . .... ... 93 7 COMBINATORIAL OPTIMIZATION OF ALGEBRAIC COMPLEXITY 96 7.1 An Instructive Example .................. ... .. 96 7.1.1 The Unoptimized Polynomial System . . 98 7.1.2 Using Quaternions .................. .... .. 99 7.1.3 An Optimized Alternative .................. .. 101 7.1.4 Interpretation ............... ... .. .... 102 7.2 Optimizing Algebraic Complexity using Cluster Topology ...... 102 7.2.1 Reduction of Algebraic Complexity through Optimization 106 7.2.2 Removing Assumptions Made in Section 1.2 ........ 106 7.3 Solutions to an Optimized System of Cluster Constraints ...... 107 8 OPTIMAL, WELLFORMED RECOMBINATION . . .... 112 8.1 Introduction ............... . . ...... 112 8.2 Background: Constraint Systems and C(li i ........... .. 113 8.2.1 The Optimal Recombination Algorithm . . .... 116 8.2.2 The Wellformed Recombination Algorithm . ... 117 8.2.3 Seam Graphs .................. ..... .. 119 8.3 The New Hybrid Algorithm ................ . 123 8.4 Conclusion. ................ .......... 128 9 ENUMERATION OF PATHWAYS FOR MACROMOLECULAR .... 129 9.1 Introduction ................... .......... 129 9.2 Obtaining Pathway Probabilities by Combinatorial Enumeration 134 9.3 Implementation Results .................. .. .. .. 136 9.4 Another Probability Measure ............... . 139 REFERENCES .................. .............. .. .. 140 BIOGRAPHICAL SKETCH .................. ......... 146 LIST OF FIGURES Figure page 11 One 2D constraint system example ............ .. .. .. 3 12 Simple 3D example drawn on 2D canvas with points and its DRplan 3 13 One 3D example drawn on 2D canvas with solution. . . ... 3 14 Geometric constraint system in 3D with ,'i, ii , type . . 4 15 Constraint graph G1 and DRplan in 2D. ................ 7 31 Small 2D constraint graph that is not triangle decomposable. ...... .15 32 Constraint system Si and underlying feature hierarchy Pi. . ... 18 33 Feature hierarchy and directed .,. i'. i' graph. .. . ..... 18 34 Constraint system and constraint graph showing multiple views. ...... ..19 35 Partial decompositions for 3D constraint system (Figure 13). . 20 36 Two DRplans of 3D example with input features. ............ .20 37 Triangledecomposable 2D counterexample of ('Cli, !lRosser property. .22 38 Constraint graph G with edge weight distribution. ........... ..25 39 Frontier Algorithm's simplification of graph giving DRplan (Figure 15). 26 310 Consistency between the DRplans of 2 groups of graph (Figure 36). .. 30 311 Child ('ClI. 1 do not overlap (Case 1). .. ... ....... .. 33 312 Input groups overlap on frontier vertices (Case 2). ............ ..34 313 The overlapped part includes nonfrontier vertices (Case 3). ...... ..35 41 Finding W first will prevent dof misclassification with 2D and 3D example. 47 42 Ensuring Cluster Minimality. .................. ..... 48 43 Prevent accumulation of clusters .................. ..... 49 44 Examples where modulerigidity beats dof rigidity. ........... .54 45 Classic Hinge example: not modulerigid, but dof rigid . .... 55 51 Geometric angle constraint system and the angle graph. . ... 57 52 The new point pn+ is at the circle or at the radial ........... ..59 53 Two new angles: 61 and 62 .................. ....... 59 54 One new angle 61 and one old angle 62 ................. 60 55 Two old angles do not share a pair of points containing p,n+ ...... ..61 56 Two old angles share a pair of points containing p,n+ ......... .61 57 Generically independent system that is not gradually constructible. 62 58 Implicit angle cycle is not the only type of dependency. . .... 62 61 Standard geometric constraint solver architecture. ............ ..75 62 Solutions of the cluster formed by the 3 circles (Figure 11). ...... ..79 63 Complete solution of root cluster (Figure 11) after choosing subsolutions. 80 64 The structure of the cluster. .................. ..... 80 65 N iiv;, .i in; by bottomup traversal of G79 in DRplan (Figure 14). 83 66 N ,.1i, ling by bottomup traversal of G82 in DRplan (Figure 14). 83 67 Complete solution of constraint system (Figure 14). ......... ..84 71 The child clusters of hex_tet and the weighted overlap graph. . 97 72 Constraint graph and weighted overlap graph of problem pent_plat .. 104 73 Five spanning trees of the covering sets of the example (Figure 72). .. 104 74 Unique solution to problem hex_tet .............. 108 75 Diagramatic view of the four solutions to problem (ii). . ... 108 76 Diagramatic view of the ten solutions to problem (iii). . ... 109 77 Three of the eight solutions to the pent_plat problem (iv). ..... ..110 78 Diagramatic view of 8 solutions to the pent_plat problem (iv). . 110 81 Schematic representation of a 3D geometric constraint system. . 114 82 Overlap graph and the minimal spanning tree of the example (Figure 81). 116 83 C'!. ...ig wellformed incidences for the system (Figure 81) is nontrivial. 118 84 Seam graph (Figure 82) and its seam tree. ..... . . ..... 119 85 Wellformed set of incidences obtained from the seam tree (Figure 84). 119 86 Seam graph, seam trees and seam cycle. ................ 121 87 Wellformed incidences may not be optimized. ............. ..122 88 Spanning tree of its weighted overlap graph and the seam graph. . 125 91 Example monomer primitives and constraints. ............ ..132 92 The simulated assembly of a T 1 viral shell. ............... ..133 93 Facenumbers and vertex numbers. ................. ..... 135 94 The highest pathway type and the widest pathway type in 2000 trials. 137 95 Pathi,,v of 2 largest isomorphism classes in 2000 trials. . ... 138 Abstract of Dissertation Presented to the Graduate School of the University of I iarida in Partial lP H :::. :: of the Requirements for the D. : of Doctor of F'.!. .. CO iii :)ORIAL DLCO PO lO iON, ('! .iC i .i) : D .C'E AND ALGEBRAIC COMPLi i1Y OF GEOMETRIC CONSTRAL SYST APPLICAi iO L BIOLOGY AND I (:: i H! * By Yong December C 0 ..: Meera : 'am ".. : D :'t.ment : C< :.. uter and Information Science and Engineering S. dissertation contributes to 7 problems in geometric constraints solving and ..i1 F' : We study the .: .1 1 ::: of enabling general D and 3D variational constraint : ..... '... to be used in .. 'unction with a feature '" ..... representation, where some of the features may use procedural or other nonconstraint based representations. NWe give a combinatorial approximate characterization of such gr : !: which we cal module. ..'.' which can be determined I a i' :.. : .1 time algorithm. 1i new method has been implemented in the S110 i :i arnd has i :: : :1 properties and : : : al i: 1 :' .:..ose a combinatorial characterization ... lecture of _) r: of angle constraint system. \'.. give the formal statement of generically independence. XWe arc ': :r to prove it use induction on the number ( points. TI.:. of four cases have been proved. We also study the welldo(cumented .. !.1'. of .. '1.."y navigating the potentially exponentially many roots or realizations of wellconstrained, variational geometric constraint systems. We give a scalable method called the i or Equation and Solution .: that can be used both for automatic searches and visual, userdriven searches for desired realizations. ;'., also show that, especially for 3D geometric constraint systems, a further optimization of the algebraic complexity of the :1 : .., is both possible, and often necessary to solve the wellconstrained :selected by the DRplan. XWe give an efficient algorithm to optimize the algebraic complexity of the wellformed system that is constructed 1. the algorit hm given " Sithiaram. we implement a randomized .: :::: to (. :::ipute one measure of the probability of the p, '1: and prospect to incorporate another probability measure, that will be obtained combinat ::: :i  extending Hendricksons 1: x)rem on ::i: :: circuits and unique graph realization into this algorithm. CHAPTER 1 INTRODUCTION Geometric constraint systems have been studied in the context of variational constraint solving in CAD for nearly 2 decades [1, 2, 3, 4]. A geometric constraint system consists of a finite set of primitive geometric objects such as points, lines, planes, conics and so on and a finite set of geometric constraints between them such as distance, angle, incidence and so on. The constraints can usually be written as algebraic equations and inequalities whose variables are the coordinates of the participating geometric objects. For example, a distance constraint of d between two points (xl, iy) and (x2, Y2) in 2D is written as (x2 _ X1)2 + (Y2 y)2 = d2. In this case the distance d is the parameter associated with the constraint. Most of the constraint solvers so far deal with 2D constraint systems. With the exception of work related to the FRONTIER geometric constraint solver [1, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], to the best of our knowledge, work on standalone 3D geometric constraint solvers is relatively sparse [16, 17]. A solution or realization of a geometric constraint system is the (set of) real zero(es) of the corresponding algebraic system. In other words, the solution is a class of valid instantiations of (the position, orientation and any other parameters of) the geometric elements such that all constraints are satisfied. Here, it is understood that such a solution is in a particular geometry, for example the Euclidean plane, the sphere, or Euclidean 3 dimensional space. A constraint system can be classified as overconstrained, wellconstrained, or underconstrained. Wellconstrained systems have a finite, albeit potentially very large number of rigid solutions; that is, solutions that cannot be infinitesimally flexed to give another nearby solution: the solution space (modulo rigid body transformations such as rotations and translations) consists of isolated points which are zerodimensional. Underconstrained systems have infinitely many solutions; their solution space is not zerodimensional. Overconstrained systems do not have a solution unless they are cor ;i. l:/,/ overconstrained. In that case, they could be embedded within overall underconstrained systems. Systems that are not underconstrained are called rigid systems. 1.1 Constraint Graphs and Degrees of Freedom DRplans, formally defined in the next section, provide the formal basis of our feature hierarchy incorporation algorithm. Geometric constraint graph representations of a constraint system are typically used to develop DRplans. Specifically these graphs are used for combinatorial analysis of algebraic properties of the system (such as wellconstrainedness, rigidity and so on,), that hold generi , ./l/; that is, for all generic values for the constraint parameters (for example, for almost all distance values, in the case of distance constraint systems). A geometric constraint graph G = (V, E, w) corresponding to geometric constraint system is a weighted graph with vertex set (representing geometric objects) V and edge set (representing constraints) E; w(v) is the weight of vertex v and w(e) is the weight of edge e, corresponding to the number of degrees of freedom available to an object represented by v and number of degrees of freedom (dofs) removed by a constraint represented by e respectively. For example, Figures 11, 12 and 15 show 2D and 3D constraint systems and their respective dof constraint graphs. More 3D constraint systems whose graphs have vertices of weight 3 (points) and edges of weight 1,3 can be found in Figures 13 14. . ^ I  , K;U K. ; Figure 11: One 2D constraint system example. G.:.uplY Figure 12: Simple 3D example drawn on 2D canvas with points and its DRplan p6 .p4 p2 a Am ak f' I s~ I I p3 p5 Figure 13: One 3D example drawn on I r , I', S1 FL. 1c ' . kl 2D canvas with solution. % hEi :rE.r i1 I t : .. ... , ,, ....m . SI I i I 7 1 . Il : ',, ..,. I LI  " 1llll 1 I " I l .l 1 ] Figure 14: Geometric constraint system in 3D with ''i i i i type Note that the constraint graph could be a /', i,'il'l' each hyperedge involving any number of vertices. A subgraph A C G that satisfies ww(e) D > w(v) (1 eCA vGA is called dense, where D is a dimensiondependent constant, to be described below. Function d(A) = eA w(e) EVA w(v) is called I. .:/;/ of a graph A. The constant D is typically ( d+) where d is the dimension. The constant D captures the degrees of freedom of a rigid body in d dimensions. For 2D contexts and Euclidean geometry, we expect D = 3 and for spatial contexts D = 6, in general. If we expect the rigid body to be fixed with respect to a global coordinate system, then D = 0. A trivial subgraph is single vertex (in 2D) and a vertex or edge (in 3D). Next we give purely combinatorial properties related to density that are used to detect generic algebraic properties. A dense, nontrivial graph with density strictly greater than D is called dofoverconstrained. A graph that is dense A., 1 I. I  . i t I : :: [11 l' '.[.1'~ I ' 5 and all of whose subgraphs (including itself) have density at most D is called dofwellconstrained. A graph G is called dofwelloverconstrained if it satisfies the following: G is dense, G has at least one overconstrained subgraph, and has the property that on replacing all overconstrained subgraphs by dofwellconstrained subgraphs (in any manner), G remains dense. Intuitively, this definition is used to prevent some overconstrained subgraphs with high density from skewing the classification of the entire graph. In particular, an extreme example could be a graph that has 2 subgraphs that are severely overconstrained, but with no constraints between them. By this definition, such a graph would not be welloverconstrained and would be correctly classified as underconstrained. A graph that is wellconstrained or welloverconstrained is called dofcluster. A nontrivial dense graph is minimal if it has no nontrvial dense proper subgraph. All minimal dense subgraphs are dofclusters but the converse is not the case. A graph that is not a dofcluster is said to be underconstrained. If a dense graph is not minimal, it could in fact be an underconstrained graph: as pointed out, the density of the graph could be the result of embedding a subgraph of density greater than D. Next we discuss how the graph theoretic properties degree of freedom (dof) il.!.: relate to corresponding properties of the corresponding constraint system. In 2 dimensions, according to Laman's theorem [18], if all geometric objects are points and all constraints are distance constraints between these points then any minimal dense cluster represents a generically rigid system. In general, however, while generically rigid system ahv ~ gives a cluster, the converse is not ah, i the case. In fact, there are wellconstrained, dense clusters whose corresponding systems are not generically rigid and are in fact generically not rigid due to the presence of generic constraint dependence. One example (Figure 14) with 3D points and distance constraints illustrates the socalled ..i. i1 i problem [19], which generalizes to the socalled hmli_" problem [20, 21]. To date, there is no known, tractable, combinatorial characterization of generic rigidity of systems for 3 or higher dimensions even when only points and distances are involved [19, 22], although several conjectures exist. There are no known general combinatorial characterizations of 2D rigidity, when other constraints besides distances (such as angles) are involved. For constraint systems with angle and incidence constraints but no distances, such a characterization is given [23]. For 3D points and distances, the notion of modulerigid clusters [12] (an extension of dofrigid clusters defined above) deals with all aspects of the bananas and hinge problems, and so on, it correctly characterizes generic rigidity in all known cases. Currently, no counterexamples are known of modulerigid constraint graphs that are not generically rigid. 1.2 Formal Definition of DRplans and Essential Properties Here we formally define and give essential properties of DRplans and DRplanners. This section is important since we require our feature incorporation algorithm to preserve these properties. Please refer to Hoffmann et al. and Lomonosov [6, 24] for a detailed discussion of these properties. Formally, a dofDRplan of a constraint graph G is a directed ., i, 1i graph (dag) whose nodes represent dofclusters in G, and edges represent containment. The leaves or sinks of the dag are all the vertices (primitive dofclusters) of G. The roots or sources are a complete set of the maximal dofclusters of G. For well or welloverconstrained graphs, the DRplans have a single source. There could be Ir I.: DRplans for G (Figures 15, 11, 12, 13, 14). 1.2.1 Overconstraints First, each dofcluster C in the DRplan should be accompanied by a tractable representation of a complete list of reducible overconstraint sets directly associated with C. That is, sets of constraints that do not lie entirely within any child cluster of C and can be removed without affecting the dofrigidity of C. The DRplanner Co 18 C21 ....... ,.. C O ,16 g .21 15 1 3 6 C4 13 /20h '.0 13'3 10 1 0 1/\ / C1 .5 11 C 122 3 4 1151 92019 2 I 4 1 Figure 15: Constraint graph G1 and DRplan in 2D. should additionally admit an efficient method of removing overconstraints by making the appropriate changes to the DRplan. 1.2.2 Optimality The size of a cluster in a DRplan is its fanin or number of its children (it represents the size of the corresponding subsystem, once its children are solved). Since the algebraicnumeric solvers take time exponential in the size of the subsystems they solve, and the number of solutions is also typically exponential, minimizing the size of a DRplan is essential to the ESM method presented here. An optimal DRplan is one that minimizes the maximum fanin. The problem of finding the optimal DRplan of even a 2D distance constraint graph is NPhard [9, 24], and approximability results are shown only in special cases. Nonapproximability results are not known. One measure used in lieu of absolute optimality is based on the fact that most DRplanners make adhoc choices during computation (Zw the order in which vertices are considered) and we can ask how well (close to optimal) the best computation path of such a DRplanner would perform (on the worst case input). We call this the bestchoice approximation factor of the DRplanner. A more satisfactory measure of optimality is based on the following alternative property. A tractable DRplan for systematic navigation should ensure that each cluster C should be accompanied by a a small set of its children Ci that form an optimal covering set of maximal clusters properly contained in C. A covering set of clusters is one whose union contains all geometric elements within C. The size of C is 1 y the size of this optimal covering set. Ti: .'". here refers not to the size of the covering set, but to l .n suitable combinatorial measure of the algebraic complexity of the active constraint ; : for solving C, given the solutions of the child clusters in t he covering set. leads to the notion (.' completeness (<. DRplans, given below. 1.2.3 Completeness Any method that chooses an, ir'. 1 ... ~, set for a cluster C requires as input a generalized complete d, : n' n of C into mnaximal proper subclusters, formally defined as follows. Ti. decomposition <." : cluster C falls into one of 2 .. A T I cluster C has exactly 2 child clusters, which intersect on a nontrivial :1 .1: and their union covers all the geometric elements in C. A Type 2 cluster C has a set of child clusters C(,, with the following .....ty. Ti.. union of C's covers all the geometric elements in C;  pair c > intersect on at most a trivial su'. and . C, is a proper mraximal subcluster of C. that is, there is no proper subcluster of C that strictly contains (CQ. Completeness is also needed for detecting implicit constraint <1a ...1' :es and for more accurate, modulerigid E Rplanners. 1.2.4 Complexity Another basic property of a E:. i : : is its width i.e. number of clusters in the DRplan to be small, preferably linear in the size of G: this reflects the complexity of the planning process and : i : the complexity of the sol process that is based on the DF 1 : Clearly, this property competes with completeness. Other desirable properties of DRplanners not mentioned above include : : .: correction of underconstrained systems, and .: : ::: to efficient updates of geometric primitives or constraints. CHAPTER 2 PROBLEMS 2.1 Geometric Constraints System Within Feature Hierarchies One application of geometric constraints system is mechanical computer aided design. However, a bottleneck in using geometric constraints system is that designers use another representation based on the conceptual hierarchy of features in a part or assembly. In C'! lpter 3, we study the problem of enabling general 2D and 3D variational constraint representation to be used in conjunction with the feature hierarchy representation, where some of the features may use procedural or other nonconstraint based representations. We trace the challenge to a requirement on constraint decomposition algorithms or decompositionrecombination (DR) planners used by most variational constraint solvers, formalize the feature hierarchy incorporation problem for DRplanners, clarify its relationship to other problems, and provide an efficient algorithmic solution. The new algorithms have been implemented in the general, 2D and 3D opensource geometric constraint solver FRONTIER. 2.2 Tractable Combinatorial 3D rigidity characterization One big open problem is the question of rigidity of 3D constraint systems even when only distances are involved. The problem is that most combinatorial characterizations of rigidity will miss hidden dependencies between constraints and will be wrongly classify many classical nonrigid systems as rigid. In C'! lpter 4, we give a polynomial time characterization called module, .:,i.:.:/;' that is not fooled by any known such counterexample of nonrigid systems. We show that this property is natural and robust in a formal sense. Rigidity implies modulerigidity, and modulerigidity significantly improves upon the generalized Laman degreeoffreedom or density count. Specifically, graphs containing 'II, i I or "Ii;,. [19] are not modulerigid, while the generalized Laman count would claim rigidity. The algorithm that follows from our characterization of modulerigidity gives a complete decomposition of non modulerigid graphs into its maximal modulerigid subgraphs. To put the result in perspective, it should be noted that, prior to the recent algorithm of [9] there was no known polynomial time algorithm for obtaining all maximal subgraphs of an input constraint graph that satisfy the generalized Laman count, specifically when overconstraints or redundant constraints are present. The new method has been implemented in the FRONTIER [10, 11, 15], [2] opensource 3D geometric constraint solver and has many useful properties and practical applications [13, 14, 25, 26, 27]. Specifically, the method is used for constructing a socalled decompositionrecombination (DR) plan for 3D geometric constraint systems, which is crucial to defeat the exponential complexity of solving the (sparse) polynomial system obtained from the entire geometric constraint system. The DRplan guides the algebraicnumeric solver by ensuring that only small subsystems are ever solved. The new, approximate characterization of 3D rigidity permits FRONTIER to deal with a far larger class of 3D constraint systems (a class adequate for most applications) than any other current geometric constraint solver. 2.3 A 2D Rigidity Classification Conjecture Laman's theorem shows one combinatorial characterization of 2D distance constraint system [18]. When other constraints are involved, for example, i .,. there is no combinatorial characterization. In C'i plter 5, we give a combinatorial characterization conjecture of 2D rigidity of angle constraint system. First, we give the formal statement of generically independence. We observe that for an given angle constraint system G in 2D with k dof, there is at least one point involved in at most 7 angles. We divide it into 4 cases based on there exists at least one point with 0, 1, 2 or more angles involved. We are trying to prove it use induction on the number of points. The first three cases have been proved. 2.4 Solution Space Navigation for Geometric Constraint Systems In ('!i lpter 6, we study the welldocumented problem of systematically navigating the potentially exponentially many roots or realizations of wellconstrained, variational geometric constraint systems. We give a scalable method called the ESM or Equation and Solution Manager that can be used both for automatic searches and visual, userdriven searches for desired realizations. The method incrementally assembles the desired solution of the entire system and avoids combinatorial explosion, by offering the user a visual walkthrough of the solutions to recursively constructed subsystems and by permitting the user to make gradual, adaptive solution choices. We isolate requirements on companion methods that permit (a) incorporation of many existing approaches to solution space steering or navigation into the ESM; and (b) integration of the ESM into a standard geometric constraint solver architecture. We address the latter challenge and explain how the integration is achieved. And we clarify these requirements essential and desirable for efficient, meaningful solution space navigation. Also, we sketch the ESM implementation as part of an opensource, 2D and 3D geometric constraint solver FRONTIER developed by our group. 2.5 Combinatorial Optimization of Algebraic Complexity In ('! Ilpter 7 we show that, Most 1i ii, Ir geometric constraint solvers use a combinatorial or graph algorithm to generate a decompositionrecombination (DR) plan. A DR plan recursively decomposes the system of polynomial equations into small, generically rigid subsystems that are more likely to be solved by algebraicnumeric solvers. Especially for 3D geometric constraint systems, a further optimization of the algebraic complexity of these subsystems is both possible, and often necessary to solve the wellconstrained systems selected by the DRplan. In C'! lpter 7, to attack this apparently undocumented challenge, we use principles of rigid body transformation and quaternion forms and we combinatorially optimize a function over the minimum spanning trees of a graph generated from DRplan information. This approach follows an interesting connection between the algebraic complexity of a wellconstrained system and the topology of its maximal wellconstrained proper subsystems. The optimization has two secondary advantages: for navigating the solution space of the constraint system and for mapping solution paths in the configuration spaces of the subsystems. We compare the reduction in algebraic complexity of the ,1 ii', in' after optimization with that of the unoptimized , 1 iiI i, and illustrate the practical benefit with natural examples that could only be solved after optimization. 2.6 Optimization of Wellformed Systems of Incidences For tractability, many modern geometric constraint solvers recursively decompose an input geometric constraint system into standard collections of smaller, generically rigid subsystems or clusters. These are recursively solved and their solutions or realizations are recombined to give the solution or realization of the input constraint system. The recombination of a standard collection of solved clusters typically reduces to positioning and orienting the rigid realizations of the clusters with respect to each other, subject to incidence constraints representing primitive, shared objects between the clusters and distance constraints. The paper [28] shows that even for generically wellconstrained systems in 3D, finding a wellconstrained system of incidence constraints for recombining its cluster decomposition is a significant hurdle faced by geometric constraint solvers. In general, we would like a wellformed system of incidences that preserves the classification of the original, undecomposed system as a well, under or overconstrained system. The author formally states and gives an efficient, greedy algorithm to find such a wellformed system. 2.7 Enumeration of Pathways for Macromolecular Structures We consider the problem of explicitly enumerating and counting the assembly path i, by which an icosahedral viral shell forms from identical constituent protein monomers. This poorly understood assembly process is a remarkable example of symmetric macromolecular selfassembly occurring in nature and possesses many features that are desirable while engineering selfassembly at the nanoscale. Sitharam and Mckenna [25, 29] give the new model of that employs a static geometric constraint graph to represent the driving (weak) forces that cause a viral shell to assemble and hold it together. The model was developed to answer focused questions about the structural properties of the most probable types of successful assembly pathvi Specifically, the model reduces the study of pathway types and their probabilities to the study of the orbits of the automorphism group of the underlying geometric constraint graph, acting on the set of pathvi The authors give a randomized algorithm to compute one measure of the probability of these pathi,v by faithfully sampling them. In C'!i lpter 9, we give the implementation of the algorithm and propose to incorporate another probability measure, that will be obtained combinatorially by extending Hendricksons Theorem [30] on rigidity circuits and unique graph realization into this algorithm. This involves both the theory of geometric constraints system and implementation of the new algorithm. CHAPTER 3 GEOMETRIC SYSTEM WITHIN FEATURE HIERARCHIES Designers find it intuitive to use a spatial feature hierarchy representation, which includes: a procedural history or an almost linear sequence of attachments, extrusions, sweeps; or CSG Boolean operations such as intersections; or parametric constraints, while additionally permitting Brep and other representations of some features. We use the FEMEX and other standard definitions of feature hierarchy, [31, 32] and are concerned primarily with the conceptual design stage. While designers additionally appreciate the expressiveness of variational constraints, tod(v's CAD systems largely restrict variational constraint representations to 2D cross sections. This persists despite the general consensus that advocates a judicious use of 3D variational constraints for the intuitive expression and maintenance of certain complex and cyclic relationships that often occur between features, parts or subassemblies. To rectify this situation, it would be desirable if a feature hierarchy could simultaneously incorporate 2D and 3D variational constraints. In this chapter, we denote such representations as mixed representations (Figure 32). Previous work on such mixed representations can be classified into two broad types. The first type [33, 34], dictates a unified representation language which is an amalgamation of variational constraints with other representation languages such as CSG and Brep. The second type [35] wrestles with a heterogeneous approach, using many servers, one for each representation language, so that the appropriate one can be called when required. Both approaches, while highly general in scope, have their drawbacks. Figure 31: Small 2D constraint graph that is not triangle decomposable. Our approach in this chapter has a narrower focus: how to freely enable a variational constraint solver to deal with feature interactions at any level of a feature hierarchy, permitting the features to be independently manipulated. Recursively, these features could themselves be represented using other representations, or in a similar, mixed manner, using constraints to relate the subfeatures. This is a natural representation, since regardless of the way in which the features at any given level are represented, constraints between features at that level could be specified between primitive geometric objects or handles belonging to the features (Figure 32). One main challenge to achieving this type of representation is the following competing pair of requirements on variational constraint solvers. Effectively representing the interaction of independent features, especially in 3D, would require the use of fairly general, cyclic constraint systems, which are often (consistently) overconstrained. To deal with and resolve such constraint systems the efficient generation of a closetooptimal decomposition and recombination (DR) plan (formally defined in Section 1.2) of general 2D or 3D constraint graphs is needed. These may not be amenable to decomposition into triangular or other fixed patterns which many DRplanners use (Figure 31). DRplans are widely used in geometric constraint solving and are crucial in order to deal with the tractability bottleneck in constraint solving: minimizing the size of simultaneous polynomial equation systems, thereby controlling the dependence on exponential time algebraicnumeric solvers which are practically crippled when dealing with even moderately sized systems. Effective DRplans are used also for navigating the solution space of the constraint system [13], optimizing the algebraic complexity of subsystems sent to an algebraicnumeric solver [14], for dealing with explicit inconsistencies (overconstrained systems) [8], implicit or geometric redundancies and constraint dependence [12, 23], ambiguities (underconstrained systems) and for efficient updates and online solving [2, 11]. In order for variational constraints to be used in conjunction with a feature hierarchy representation, the DRplans of geometric constraint systems should now be made to incorporate an input, feature decomposition representing the underlying feature, part or subassembly hierarchy. This is a partial order, typically represented as a Directed Acyclic Graph or dag (Figures 32, 33, 34). Again, this incorporation of an arbitrary input, conceptual design decomposition into the DRplan is only possible if the DRplanning process is sufficiently general. In particular, the incorporation should be insensitive to the order in which the elements in the constraint graph are considered during the DRplanning process, the socalled C('!r, !IRosser property. However this property while necessary, is not sufficient as explained in Section 1.2. Hoffmann et al. [6] first formalized the concept of a DRplan as well as several performance measures of DRplanners some of which are relevant to this. It additionally gives a table of comparisons which shows that many of the previous DRplanners for example [3, 36, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], (or any obvious modifications of them) would inherently fail to incorporate even treelike input design decompositions or feature hierarchies. We explain in Section 3.1 what the difficulty is in the case of DRplanners that depend on decomposition based on fixed patterns. Incorporation of input decompositions is crucial also in order to capture design intent, or assembly order and allow independent and local manipulation of features, parts, subassemblies or subsystems within their local coordinate systems. It is also crucial for facilitating solution space navigation [13] in a manner that reflects a conceptual design intent. In addition, it is crucial for providing the user with a feature repertoire, the ability to paste into a sketch already resolved features and constraint subsystems that are specified in another representation or allowing certain features or easier subsystems to be solved using other, simpler, methods such as trianglebased decomposition or parametric constraint solving. Sometimes the user would prefer to specify a priority at the vertices of the dag which dictates the order of resolution of the features, parts, subassemblies or subsystems. This occurs also when one features can only be defined or generated based on another, as in procedural or history based representations. Also, note that parametric constraint solving can in fact be achieved as a special case, where the order is a complete, total order. More generally, this can be used in the CAD database maintenance of multiple product views [46, 47], for example the design view and a downstream application client's view may be somewhat different constraint systems and the two feature hierarchies may not even be refinements of one another, but intertwined (Figure 34). Furthermore, each view could contain different referencing shape elements that are not part of the net shape and therefore, not part of the other views. This is particularly the case when these referencing shape elements are actually generated during the operations of a historybased procedural representation. internal mixed procedural CSG BREP ( ) f13 hg 179 eln3 external Procedural History Based Parametric Constraints 2D Variational Constraints and Sweeps fo o e to 0 c d f f b Figure 3 2: Constraint system S and .1 :1 feature hierarchy Pi . G1 3 G1 G2 G3 G4 G5 Figure 33: Feature hiera !: and: i 1' : gr : !: X / \B 3 3 _ A BQ Q\ 3 2 y y X 2y Figure 34: Constraint system and constraint graph showing multiple views. 3.1 Formal Problem Statement We now describe the algorithmic problem of feature incorporation in a DRplan as an inputoutput specification. Input: A 2D or 3D geometric constraint system (Section 1.1), S. A partial feature decomposition of the constraint system given as a directed .,. i, i graph (dag) P obtained from one or more feature, part or subassembly hierarchies or design views. A feature or subassembly is a node of P with its immediate subfeatures represented as its children (Figures 35, 33, 36). Desired Output: A DRplan for the input constraint system whose nodes include those features in the input partial feature decomposition that are dofclusters. For features that are not dofclusters, a complete set of maximal dofclusters within them should appear as nodes in the DRplan. Other output Requirements: Once the output DRplan has been obtained, updates to the input feature hierarchy should be achieved efficiently without having to redo the entire DRplan. The desirable properties of DRplans and DRplanners given in Section 1.2 must be preserved by the feature incorporation algorithm and its output DRplan. Some of these properties require straightforward redefinition for feature ,:. .. Figure 35: Partial decompositions for 3D constraint system (Figure 3). i' '~ I.... . ,,I .{' K f i Sbr de r h With subassembl S. L t i 41 U_ l ;:, ~ ~~~ ..  '' 'i I  t r. ,0. .. I S. ,.. ~ ... :, i t. (  I I II tb Figure 3 5: Partial decompositions for 3D constraint system (Figure 1 3). a b c d e f g h With subassemblies Figure 3 6: Two DRplans of 3D example with input features. incorporating DRplans, since often no DRplan even exists that incorporates a given input feature decomposition and preserves these properties as such. For example, it may not be possible to preserve optimality since certain features may simply require clusters with large fanin; similarly it may not be possible to preserve complexity and small width, since the number of given features may force a large width. However, we would like to ensure that our algorithm generate DRplans that preserve these properties as much as possible, given the restriction that these DRplans are forced to incorporate a given input feature decomposition. The ability of a DRplanner to incorporate any input feature decomposition into a DRplan of a constraint graph G implies that the DRplanner can find the clusters of the graph in any order that is consistent with containment. This is called the Ch i,, Rosser property of the DRplanner [6, 41, 42]. A formal definition is the following. Assume that a DRplanner P constructs its output DRplan (a dag) for a constraint graph G bottom up, that is, if a cluster C contains cluster D, and both appear in the dag output, then D has been found and inserted into the DRplan before C. Except for this restriction, the DRplanner is allowed to find and insert any cluster of G into the output dag at any stage. The DRplanner P has the ('!li, i !iRosser property if any dag that it outputs is a valid DRplan for the input graph G. The C'!lii !I Rosser property is weaker and does not imply the feature incorporation property, especially when the DRplanner in question does not perform a generalized analysis, but works only on graphs that have a restricted type of DRplan. For example, consider a DRplanner that requires the graph G to be decomposable into clusters that have a specific structure or topological 1ii [41, 42], and only finds such clusters. The DRplanner could have a ('!i, i1 !iRosser h f e 9 c ..d . S0000 0 a b a b c d e f g h Figure 37: Triangledecomposable 2D counterexample of ('!,ii !iRosser property. property in that it would successfully find a DRplan regardless of the order in which such clusters are found and processed. However, by simply picking a feature which is a cluster that in G that does not have that pattern, the DRplanner would not be able to incorporate that feature in its DRplan and hence would not possess the feature incorporation property. Note that in the specific case of Fuddos and Hoffmann [41, 42], it can be shown that a graph is wellconstrained and I' i: ,fl5 decoin.p. li!., if and only if all clusters in it are triangledecomposable (although this proof does not appear in the papers of Fudos and Hoffmann [41, 42]). So in this case the 0C'!Li, !liRosser property implies the feature incorporation property; however in this case both properties do not hold for overconstrained graphs (Figure 37); and as pointed out above, the presence of consistent overconstraints may be crucial in order to effectively mix featurebased and constraintbased representations. Finally, even if a DRplanner has the C'!,ii. !IRosser property and is in fact shown to be amenable to feature incorporation, the actual algorithmic problem still remains: of effo. , /1i incorporating a given input feature decomposition into a DRplan while minimally altering its other desirable properties. This is the problem that we address here. 3.2 The Frontier Vertex Algorithm (FA) DRPlanner Here we sketch the essential algorithmic details of the dofrigid Frontier vertex (FA) DRplanner which are absolutely necessary to describe our feature incorporation algorithm. The dofrigid FA DRplanner satisfies the properties discussed in the Section 1.2. The basic idea of this DRplanner and its performance was presented by Hoffmann et al. [6]; a complete formal description along with analysis of correctness and (cubic) complexity and proof of the completeness property are given by Lomonosov and Sitharam [2, 9, 24]. A pseudocode is provided by Sitharam [11] and the documented code can be found on her CISE and GNU websites [15]. A method of combinatorially obtaining an optimal, stable algebraic system for solving C, that is, for obtaining optimal covering sets is given by Sitharam et al. and Sitharam and Zhou [14, 48]. The method for obtaining all possible sets of reducible constraints for overconstrained clusters of dofrigid Frontier vertex DRplans, both for 2D and 3D, and modifying the DRplan once they have been removed, is presented by Hoffmann et al. [8]. Other desirable properties such as systematic correction of underconstraints, and amenability to efficient updates of geometric primitives or constraints are given by Sitharam [2, 11]. The input is the constraint graph G and the output is a DRplan of quadratic width, satisfying the completeness property, with constant bestchoice approximation factor. Repeat pick a cluster C from clusterqueue CQ Distributecluster(C) in cluster graph CG if new cluster C' is found (containing C) then Complete (C'G) recursivee procedure builds complete sub DRplan for cluster graph restricted to C', that is, input constraint graph restricted to C', starting from those subclusters of C' that are already present in DRplan; modifies DRplan, inserting C' and new found subclusters of C' into it.] insert C' at the end of CQ Combine CQ iterativee procedure that modifies both DRplan and CQ until no further combining is possible) update CG by (frontier vertex) Simplify(clusters in CQ) remove C from CQ Until CQ is empty if DRplan has more than 1 root, then Complete(CG) We describe the methods: DistributeC'Ii. r, Simplify, and Combine to the extent necessary to describe and analyze our feature incorporation algorithm. DistributeCI, 'I. r in turn relies on 3 methods based on network flow for locating dofrigid clusters: DistributeVertex, DistributeEdge and PushOutside. It is not necessary to describe Complete since it is unaffected by the feature incorporation algorithm. For these, the reader is referred to Lomonosov and Sitharam [9, 24]. Briefly: and Complete recursively calls itself as well as Distributecluster, Combine and Simplify and requires care since completeness competes with the small width property of DRplans as mentioned in Section 1.2. 3.2.1 Distributing Edges The dense subgraph isolation algorithm is used repeatedly to find dofrigid clusters. It was first given by Hoffmann et al. [1, 5] as a modified incremental network maximum flow algorithm. We assume standard working knowledge of network flow. The key routine is the distribution of an edge in the constraint graph G. For each edge, we try to distribute the weight w(e) + D + 1 to one or both of its endpoints as flow without exceeding their weights, referred to as "distributing the edge e." and called the DistributeEdge routine. This is best illustrated on a corresponding bipartite graph G*: vertices in one of its parts represent edges in G and vertices in the second part represent vertices in G; edges in G* represent incidence in G. As illustrated by Figure 38, we may need to redistribute (find an augmenting path). a 2 e 1 e2 a 33 2 Figure 38: Constraint graph G with edge weight distribution. If we are able to distribute all edges, then the graph is not dense. If no dense subgraph exists, then the flow based algorithm will terminate in O(n(m + n)) steps and announce this fact. If there is a dense subgraph, then there is an edge whose weight plus D + 1 cannot be distributed (edges are distributed in some order, for example by considering vertices in some order and distributing all edges connecting a new vertex to all the vertices considered so far). The search for the augmenting path while distributing this edge marks the required dense graph. If the found subgraph is not overconstrained, then it is in fact minimal. If it is overconstrained, Hoffmann et al. [1, 5] give an efficient algorithm to find a minimal cluster inside it. 3.2.2 Simplifying Clusters We now describe the method Simplify. This frontier vertex simplification was given by Hoffmann et al. [6, 7]. The found cluster C interacts with the rest of the constraint graph through its frontier vertices; that is, the vertices of the cluster that are .,.i i,'ent to vertices not in the cluster. The vertices of C that are not frontier, called the internal vertices, are contracted into a single core vertex. This core is connected to each frontier vertex v of the simplified cluster T(C) by an edge whose weight is the sum of the weights of the original edges connecting internal vertices to v. Here, the weights of the frontier vertices and of the edges connecting them remain unchanged. The weight of the core vertex is chosen so that the density of the simplified cluster is D, where D is the geometrydependent constant. This is important for proving many properties of the FA DRplan: even if C is overconstrained, T(C)'s overall weight is that of a wellconstrained graph, (unless C is rotationally symmetric in which case, it lacks one dof). e 22 3 . _10. 0 19 8 "" i17 o 615 12 13 h 2 i4 1 5.15 h h 0' 2 0 , Figure 39: Frontier Algorithm's simplification of graph giving DRplan (Figure 15). Technically, T(C) may not be wellconstrained in the precise sense: it may contain an overconstrained subgraph consisting only of frontier vertices and edges, but its overall dof count is that of a wellconstrained graph. Figure 3 9 illustrates this iterative simplification process ending in the final DRplan (Figure 1 5). The flows on the internal edges and the core vertex are inherited from the old flows on the internal edges and internal vertices. The undistributed weights on the internal edges simply disappear. The undistributed weights on the frontier edges are distributed (within the cluster) as much as possible. However, undistributed weights on the frontier edges (edges between frontier vertices) may still remain if the frontier portion of the cluster is severely overconstrained. 3.2.3 Datastructures Four datastructures are maintained. The cluster datastructure for a cluster C contains data on the simplification of the cluster (frontier vertices, edges and so on.), the original graph vertices and edges corresponding to C, and pointers to the roots of the current sub DRplan rooted at C (may or may not be complete subDRplan depending on the stage of the algorithm). The DRplan datastructure just contains pointers to the clusters that are currently the toplevel clusters in the DRplan. The flow or cluster pI'r'l, CG contains the current simplified graph where the found clusters have been simplified using the frontier vertex simplification. It also contains all the current flow information on the edges. a cluster queue, CQ which is the toplevel clusters of the DRplan that have not been considered so far, in the order that they were found. We start with the original graph which serves as the cluster or flow graph initially, where the clusters are singleton vertices, The DRplan consists of the leaf or sink nodes which are all the vertices. The cluster queue consists of all the vertices in an arbitrary order. 3.2.4 Distributing Vertices and Clusters The method Distribute Vertex distributes all edges (calls DistributeEdge) connecting the current vertex to all the vertices considered so far. When one of the edges cannot be distributed a minimal dense cluster C is isolated, as described in Section 3.2.1. Now we describe the method DistributeC I'i r. Assume all the vertices in the cluster queue have been distributed (either they were included in a higher level cluster in the DRplan, or they failed to cause the formation of a cluster and continue to be a top level node of the DRplan, but have disappeared from the cluster queue). Assume further that the DRplan is not entire, that is, its top level clusters are not maximal. The next level of clusters are found by distributing the (completed) clusters currently in the cluster queue. This is done by filling up the !h .!I C" or the available degrees of freedom of a cluster C being distributed by D units of flow. Then the PushOutSide method successively considers each edge incident on the cluster with 1 endpoint outside the cluster. It distributes any undistributed weight on these edges + 1 extra weight unit on each of these edges. It is shown by Lomonosov and Sitharam [9, 24] that if C is contained inside a larger cluster, then at least one such cluster will be found by this method once all the clusters currently in the cluster queue have been distributed. 3.2.5 Combining Clusters Next, we emphasize the parts of the algorithm that ensure a crucial property of the output DRplan that the feature incorporation algorithm must deal with, namely small width, while maintaining complete decomposition of clusters (two types) defined in Section 1.2. The FA DRplanner controls the width of the FA DRplan to ensure FA achieves a quadratic bound on DRplan width by maintaining the following invariant of the clusterqueue whenever DistributeCluster is called, every pair of clusters in the cluster queue and cluster graph intersect on at most a trivial subgraph (that is, a subgraph which on resolving incidence constraints either represents to a single point in 2D or a variable or fixed length line segment in 3D). FA does this by repeatedly performing the Combine operation each time a new cluster is isolated. The operation is to iteratively combine N U D1 with any clusters D2, D3,... based on a nontrivial overlap. In this case, N U D1 U D2, N U D1 U D2 U D3 and so on enter the DRplan as a staircase, or chain, but only the single cluster N U D1 U D2 U D3 U..... enters the cluster graph and cluster queue after removing D1, D2, D3 .... 3.3 Incorporating an Input Feature Decomposition into FA DRplan We develop a new algorithm that solves the algorithmic problem of Section 3.1. That is, it permits the FA DRplanner (sketched in Section 3.2 [9, 24]) to incorporate into its output DRplan an input feature decomposition or conceptual, design decomposition. 3.3.1 More Detailed Requirements on the Method A recursive method called DistributeGroup drives the new FA DRplanner It is called on the root node of the input feature decomposition, which, by convention, represents the entire graph. Let GI, G2,.., G, be the children of some parent feature G in the input decomposition. Now that the FA DRplanner's structure has been described, we can give a more detailed set of requirements on the feature incorporation algorithm based on the formal problem requirements of Section 3.1. First of all, we need to ensure that each feature Gi itself appears in the output DRplan provided it is a valid cluster. If it is not a cluster, then a complete maximal decomposition of it is obtained. This implies that a separate DRplan for each Gi needs to be obtained and all of these DRplans should appear within the DRplan for G. Secondly, while we cannot maintain the same width W as an FA DRplan that is not required to incorporate any features (for the same constraint graph), we would like to have a width significantly smaller than O(WF), where F is the number of features in the input feature hierarchy. Instead of specifying the desired complexity, we simply require the "best possible." that is, we require that consistency between the DRplans of the different Gi's needs to be established, in case they have shared objects. In particular, in the 3D constraint system (Figure 310), assume Gi's DRplan has been obtained and has an intermediate cluster bcd. When the DRplan for G2 is obtained, the same cluster should appear. Thirdly, for efficiency, we would like the new DRplanner while working on some Gi to use as much of the flow, cluster and DRplan information that it already obtained while working on some earlier Gk, so that the entire complexity is proportional to the width or number of clusters in the final DRplan. Thus the key issues are: how are the flow or cluster graph (Section 3.2) and the output DRplan efficiently maintained and modified as each Gi is worked on, so that the above requirements are satisfied. a b c d e h g f Figure 310: Consistency between the DRplans of 2 groups of graph (Figure 36). Finally, note that since the input decomposition may be a dag, and not a tree, some children may have more than one p rentt" However, DistributeGroup must be performed only once on any given group G; When another parent of G calls DistributeGroup (G) at a later point in time, the stored results for the flow or cluster graph and DRplan for G should be returned. 3.3.2 Distributing Groups or Features We discuss 3 distinct cases that need to be dealt with differently at the crucial steps of the algorithm. Case 1: the children of G are I,,nlll;i pairwise disjoint, i.e, do not overlap each other Case 2: Gi's overlap with Gk(1 < k < i 1) consists entirely of frontier vertices of the top level clusters in the merged DRplan of the Gk '. Case 3: for at least one of the G's(1 < k < i 1), G 's overlap with Gk includes vertices (of the o, .::,r,, ,jIi,1I) that map to the core of one of the clusters of Gk. The method DistributeGroup(G). consists of 4 steps. First, for each child group Gi of G, it performs the following 3 steps. For clarity of exposition, we prefer to not give a pseudocode for DistributeGroup(G), but rather explain successively each of the 4 steps for all three of the cases. When we refer to the "old" DRplanner, we mean the pseudocode of Section 3.2; and the v." refers to the old FA DRplanner augmented by the DistributeGroup driver. A detailed pseudocode of the entire FA DRplanner including the feature incorporation algorithm are provided by Sitharam [11]. The old FA DRplanner of Section 3.2 is called on Gi and starts a new DRplan for Gi (which will eventually get merged with the DRplans of the other children of G after Step 3 below). Then the new DRplanner uses different options for the flow or cluster graphs for the three cases. Case 1: Use the current flow or cluster graph by freezing all the edges and vertices outside of Gi; Case 2: Use the current flow or cluster graph, modify the flow on carefully selected edges and vertices outside of Gi, marking them and freezing them; that is for each edge e with one endpoint in Gi and another endpoint outside Gi, if there is any flow f on this edge towards Gi, then remove it and instead add f to the undistributed flow capacity on this edge e. Mark this edge e as having undistributed flow. Case 3: Create a new local copy of a flow graph for Gi alone (which will eventually be used to update the current flow graph in Step 3 below). The DRplanner continues with a recursive call to DistributeGroup(Gi) during which it ensures that DistributeEdge is run on the undistributed flow on all marked edges within Gi. An edge e is unmarked only if distribution is successful on all undistributed units on e. The DRplanner merges the DRPlan of Gi with the DRPlans of Gi through Gi1. This includes merging copies of clusters that could have been independently found by the DistributeGroup method on 2 different groups. It additionally includes putting clusters together to form larger clusters, based on amount of overlap; augmenting current flow graph (merged flow graphs so far) using the local flow or cluster graph for Gi. This latter part includes not only combining clusters but also modifying flows. More specifically, the following merging operations are performed. First, if a cluster in the DRplans for GC, G2,..., G_i appears again in the DRplan for Gi, the two copies are linked to prevent replication of effort during the solving stage. While the distinct groups of the input decomposition that are present in the subDRplan of each cluster copy will have to be solved, the cluster itself and any cluster in its subDRplan that is not a subset of a group in the input decomposition, will only have to be solved once. Note that merging the cluster copies (by taking the union of their parents and union of their children) will violate the socalled cluster minimality property of a good DRplan (mentioned in Section 3.1), since a proper subset of the children would already form the cluster. Next, the DRplanner looks at the top level clusters of the merged DRplan for G1, G2,..., Gi_1 and the top level clusters of the DRplan for Gi. If any pair of these v C and D intersect nontrivially, on more than 2 points in 2D and 3 points in 3D, then create a parent cluster C U D of C and D, in the DRplan; (this is the same as the Combine operation on clusters performed by the basic FA Section 3.2), and making the corresponding simplification in the flow or cluster graph, described below. Cases 1 and 2: Because the local flow graph is inherited from the flow graph for G, no additional modification is needed; Case 3: removes all flow from the noncluster edges that are in the overlapped part between Gi and that part of G that has been completed so far i.e: G1,..., Gi_1 and marks their entire weight as undistributed. These edges will be redistributed when the clusters that contain them are distributed. Once the DRplans of all the Gi's have been combined, the DRplanner proceeds as described in Section 3.2 on the resulting flow or cluster graph of G, performing DistributeClI, r on the clusters in them, potentially isolating and e 0 1 h 10 h G2 g a dg I II a eGG a Gd1 a G2 1 h /h G\a b c d a a b e d g IV III II Figure 311: Child C'liI i do not overlap (Case 1). simplifying new clusters that contain the Gi's, modifying the cluster queue and the DRplan, until the DRplan for G is completed. We now describe how the above algorithm works on 3 examples that represent the 3 cases. For the 3D example of points and distance constraints in Case 1 Part I shows (Figure 311) the flow graph and the cluster queue (Section 3.2) after the DRplan for G1 has been constructed. When the old DRplanner starts to distribute G2, it creates a new cluster queue for G2 and inherits the flow graph in Step 1. After the old DRplanner in finished with G2, in Step 2, the DRplan of G2 and the flow or cluster graph are shown in Part II. Then the new DRplanner tries to combine them in Step 3 and the results are shown in Part III of the figure. The final DRplan of G which is obtained after Step 4 is shown in Part IV. For the 3D example of points and distance constraints in Case 2 (Figure 312), Part I shows the flow graph and cluster queue after the DRplan for G1 has been completed. When the DRplanner starts to distribute G2, it creates a new cluster queue for G2 and inherits the flow graph in Step 1. It also removes the flows on the edge ce and eg and marks them. After the old DRplanner is finished with G2 in Step 2, the DRplan of G2 and the flow graph are shown in Part II. Since G1 )Gi G *G2 G2 Gg G2 G3 b G3 b e d g c e d g f h I II G ga G2 G1 G G GI G3 b c e d g f h a b c e d g f h III IV Figure 312: Input groups overlap on frontier vertices (Case 2). and G2 overlap on 3 points, the new DRplanner combines them in Step 3 and the results are shown in Part III. The final DRplan of G which is obtained after Step 4 is shown in Part IV. For the 3D example of points and distance constraints in Case 3 Part I shows (Figure 313) the flow graph and cluster queue after the DRplan for G1 has been constructed. When the old DRplanner starts to distribute G2, it creates a new cluster queue for G2 and the flow graph in Step 1. After the old DRplanner is finished with G2 in Step 2, the DRplan of G2 and the flow graph are shown in Part II. Since GC and G2 overlap on 4 points, the DRplanner combines them in Step 3 and the results are shown in Part III. The final DRplan of G which is obtained after Step 4 is shown in Part IV. 3.3.3 Proof of Correctness and Complexity We show how the 3 requirements of Section 3.3.1 are met. From Steps 1 and 2, we know that for each decomposition Gi, the algorithm creates a new DRplan. This ensures, by the properties of the old FA DRplanner given in Section 3.2, that each feature Gi appears in the output DRplan provided e G2G2 GI 1 G2 G G3 G G3 b G1\ 1\ b\ b c d e g f \ a bcd e b I II G Gi C X; \ a G2 ( G2 G3 Gi GI G3 d h a b c d e g f a b c d e g f h III IV Figure 3 13: Ti'. < .1 .led part includes nonfrontier vertices (Case 3). it is a valid cluster, and otherwise a complete decomposition into maximal clusters is obtained. In SI 3, the DRplanner checks their .: of the level clusters of DP ; G and those of the combined Di plan for (CG, (G2,... , Gi and combine them if possible. Because this process is executed for each Gi : its DRplan is established, the algorithm combines the DRplans for all the G,'s to give the DRplan for G. Thus P ei"ement 1 is met. In S' 3, the new algorithm links two copies of the same cluster in different i's. T there is cr one copy of this cluster in the DRplan < G. So, the consistency between the DRplans is ensured, i r .:. Requirement 2. S ivy, the i w i::. : : in the 3 cases is either used as such, copied and restored, or is ( .. i.. iup as undistributed units which will be re,: i uted in Step 2 ?. the old Dl .... i .. guarantees that flow ...i..... :n remains accurate throughout, given correctness ( old DP :. .:.: :. o, notice that lor any given edge, the number of times it is redistributed is no more than the number of groups or features in the feature hierarchy that share that edge. i : ensures that . additional time ient (beyond that of the original DRplanner) is proportional to the number of features in the input feature hierarchy; thereby ensuring Requirement 3. 3.3.4 Preserving Properties of the Old FA DRplanner Incorporation of features into the DRplan leaves entirely unchanged many desirable properties of the the output DRplan mentioned in Section 1.2, simply because the old DRplanner is called by the DistributeGroups driver at each stage to actually construct the DRplan. These include properties such as detection and characterization of over and under constrainedness [6, 8], completeness [9, 24], systematic correction of underconstrainedness by giving socalled completion constraints amenability to efficient updates (addition or deletion or modification) of geometric primitives or constraints [2, 11], or navigation of the solution space [13]. Next, we briefly discuss some desirable properties of the FA DRplan that are affected by the feature incorporation algorithm as well as properties that are only relevant in the presence of features. Let n is the number of vertices of the input constraint graph and k is the number of features in the input feature decomposition. Using the argument given in the proof of correctness and complexity, and the complexity of the old DRplanner, the following hold. If all the features are either dij 1iil or contain one another (Case 1). new algorithm's time complexity is O(n3), width O(n2) (the complexity of the old DRplanner). If the features intersect on trivial subgraphs or contain one another (Case 2), the complexity is O(n3 + k), width O(n2 + k). Finally if the features could intersect on nontrivial subgraphs, the best bound on complexity is O(n3k), width O(n2k) (we omit a finer, but significantly more cumbersome complexity expression in terms of sizes of the intersections and so on.) These are the best complexities one can expect. The first factor is the complexity of the underlying old FA DRplanner and in typical cases, the second factor is insignificant. Concerning optimality, the FA DRplanner's best choice approximation factor is unaffected by the new augmentation. The proof is the same as for the old DRplanner [6]. Among all DRplans that incorporate the given input feature decomposition, the FA DRplanner augmented by the feature incorporation algorithm can find one whose maximum fanin cluster has a fanin that is at most a constant factor larger than the optimum. Also, as mentioned earlier, the feature incorporation does not affect he completeness property, so the algorithms [14, 48] can still be used to find an optimal covering set. Another property of FA DRplans that is superficially affected by the presence of features is the systematic correction of overconstraints, that is, the method presented [8]. Clearly feature incorporation does not affect the ability to detect overconstraints and isolate of a complete set of overconstraints that can be removed without making the entire graph underconstrained. However, correction of overconstraints typically results in removing some clusters in the DRplan, since they become underconstrained, although the entire graph remains wellconstrained. In the presence of features, it is reasonable to require that no feature that was previously a cluster is made underconstrained by the correction, that is, the set of socalled reducible overconstraints is smaller. However, the overconstraint correction method [8] explicitly provides a list of reducible overconstraints dir. i./; associated with each cluster in the DRplan. Hence, the required modification is straightforward: the new set of reducible overconstraints that preserve features is the union of all the reducible sets of overconstraints directly associated with each cluster feature in the DRplan, together with the union of all the reducible sets of overconstraints for clusters that are not descendants of .niv cluster feature in the DRplan. Finally, a property listed under the output requirements of the feature incorporation problem in Section 3.1 is the ability to update the input feature decomposition and correspondingly efficiently update the DRplan. Removal of a feature is straightforward. If the feature is a cluster it simply entails the removal of the corresponding node C from the DRplan, and all of its descendants that are inessential children of their other parents who are not descendants of C (Section 3.2). If the feature is not a cluster, then all of its maximal proper clusters are present as nodes in the DRplan and these are treated like C above. The DRplanner does not need to be involved in this simple edit of the DRplan. Addition of a feature is more involved. There are two cases. In the case where the feature is not contained within an existing cluster of the DRplan (it could be contained in the single root if the graph is wellconstrained), then the addition of the feature is straightforward since it will enter the upper most level of the DRplan. It is simply treated by the Distributegroups method as though it is a (last) child of the root of the input feature decomposition. If the feature contains new geometric elements and constraints, these are processed using the update method for FA DRplans, given by Sitharam [2, 11]. In case the new feature F is contained within one or more of the existing clusters Ci in the DRplan, it is first assumed to be a cluster and inserted in the DRplan as a child of the Ci and as a parent of all the maximal clusters Di that are contained in F and are present in the subDRplan rooted at any of the Q's. Since F lies inside an already processed cluster, no flow information is available. A cluster or flow graph of F is created by using the frontier vertex simplifications of these maximal clusters. These frontier vertices are connected using edges from the original graph. A cluster queue with these clusters is created and these clusters are treated as the top level of the DRplan for F constructed so far. that is, Steps 3 and 4 of the DistributeGroup method on F are executed, taking the subDRplan rooted at F as the input feature decomposition and assuming that DistributeGroup has already been called on the children of F in this feature decomposition. During Step 4, since none of the edges in the flow or cluster graph constructed for F have been distributed, Pushoutside and other methods cannot assume that the edges in the cluster graph for F have been distributed, DistributeEdge is run again on these edges. A detailed pseudocode that includes the new feature incorporation algorithm is provided by Sitharam [11]. Documented opensource code can be downloaded from Sitharam's website [15] (use postDecember2003 versions for 3D) To use the feature incorporation option after opening the main sketcher window, and after pulling up (or drawing) a sketch: press 'ctrl' key and left click the objects which should be in the same feature. You will see the color of all selected objects is changed. Tip: you can use left mouse button to draw a rectangle to select objects quickly, then use 'ctrl' + left click to modify selected set ('ctrl' + left click on a selected object would unselect it.) Click 'Design' menu, then click 'Make new tree' to create each feature hierarchy (independent feature hierarchies for the same constraint graph provided by different ,, i ' or multiple views, are combined to form a single composite feature hierarchy, internally). Then click 'Make new group' to create the feature. For each features, you could simply select the primitive objects in them and click 'Make new group'. You can check the features by clicking the 'group' tab in rightbottom of the window. Note. Recall that the dofrigid FA DR planner (Section 1.2) considered here does not deal with implicit constraint dependence. However, the more general, modulerigid FA DRplanner [12] deals with all known types of constraint dependence such as bananas and hinges. While incorporation of a feature hierarchy into the the modulerigid FA DRplanner [12] has been implemented in FRONTIER [10, 15], its description and analysis are beyond our current scope. 40 We would like to note that the detection of modulerigidity crucially relies on the completeness of the underlying dofrigid DP _1 :: : :, which is unchanged by the feature inc.i. oration algorithm. More significantly, the notion of a modulerigid cluster includes socalled dependent clusters that are not selfcontained, but' need to be resolved after others, imposing a solving pri, : '' order. DR 1. that can deal with such clusters have an edge in incorporating those features as in procedural history based representations whose very definition is based on previously ( e. tI features. CHAPTER 4 COMBINATORIAL 3D RIGIDITY CHARACTERIZATION One big open problem is the question of rigidity of 3D constraint systems even when only distances are involved. The problem is that most combinatorial characterizations of rigidity will miss hidden dependencies between constraints and will be wrongly classify many classical nonrigid systems as rigid. In this chapter, we give a polynomial time characterization called module i ,:/1',::l/ that is not fooled by any known such counterexample of nonrigid systems. We show that this property is natural and robust in a formal sense. Rigidity implies modulerigidity, and modulerigidity significantly improves upon the generalized Laman degreeoffreedom or density count. Specifically, graphs containing , ii, i or "hi1, [19] are not modulerigid, while the generalized Laman count would claim rigidity. The algorithm that follows from our characterization of modulerigidity gives a complete decomposition of non modulerigid graphs into its maximal modulerigid subgraphs. 4.1 Determining Dof Rigidity: The Frontier Vertex Algorithm (FA) In this section, we first give an alternative characterization of dof rigidity which translates to a useful property of dof DRplans called dof completeness. (We omit proofs). Then we sketch relevant properties of Frontier vertex DRplans and the corresponding DRplanner (FA DRplanner) [6, 9] which follows this characterization. Let C be a geometric constraint graph. Then Q = {C1,..., C,}, a set of dof rigid proper subgraphs of C, is a complete, maximal, dof rigid decomposition of C if the following hold. If there is a maximal, dof rigid proper subgraph of C then it must contain one of the Ci in Q. Furthermore, Q should satisfy one of the following. Case 1: m = 2 and C1 and C2 intersect on a nontrivial subgraph and their union induces all of C Case 2: Each of the Ci's is nearly maximal with respect to the set Q in the following sense: the only dof rigid proper subgraphs of C that strictly contain Ci intersect all the other subgraphs Cj, j / i on nontrivial subgraphs; The next theorem gives an alternate characterization of dof rigidity. Theorem 4.1.1 Let C be a geometric constraint ,'.,.'l, and Q = {C1,..., C}, be a complete, maximal, dof rigid decomposition of C. Then C is dof rigid if and only if ) lsl Adj dof ( (Ci)) < D, SCQ C ES where (recall) D is the number of dofs of a rigid body, and Adjdof(Ci) is either the number of dofs (negation of /1 ,.:.i) of Ci if C is trivial; or .:'"l' D if Ci is nontrivial. Note that if Case 1 holds, then C is r,.ii ,/,/.:i ll.i dof rigid in fact, the first 1' */' '/;/ of Q is redundant. The next lemma explains the tractability of this method of determining dof rigidity. Lemma 4.1.2 If C is not dof rigid, then only Case 2 in the D. fil.. 4.1 applies. Furthermore, Case 2 implies that no pair of Ci intersect on more than a trivial u<.l'.p'1 Thus (using a simple HR.i,,, ; theoretic argument), m is at most O(n3), where n is the number of vertices C. Furthermore, the computation of the inclusionexclusion formula in Theorem 4.1.1 takes O(n3) time. This leads to a robust property of DRplans using which the characterization can be translated to an algorithm. A dof DRplan P for a geometric constraint graph G is dof complete if the set Q of child clusters of every dof cluster C in P is a complete, maximal, dof rigid decomposition of C. Partial dof complete DRplans are defined analogously as in Section 6.1, and just as before, any partial dofcomplete) DRplan for a constraint graph G can be extended to a dofcomplete) DRplan for G 4.1.1 The Frontier Vertex DRplan (FA DRplan) Note. Throughout this section, unless otherwise mentioned, "(< !I. i means "dof cluster,'" iigid" means "dof rigid," and "DR1p! i means "dof DRplan." Intuitively, an FA DRplan is built by following two steps repeatedly: Isolate a cluster C in the current graph Gi (which is also called the cluster .'l, or flow 'Ij',l' for reasons that will be clear below). C'! I 1: and ensure a complete, maximal, dof rigid decomposition of C. Simplify C into T(C), transforming Gi into the next cluster graph G+ = T(Gi) (the recombination step). The isolation algorithm, first given by Hoffmann et al. [1, 5] is a modified incremental network maximum flow algorithm. The key routine is the distribution of an edge in the constraint graph G. For each edge, we try to distribute the weight w(e) +D+1 to one or both of its endpoints as flow without exceeding their weights, referred to as "distributing the edge e." This is best illustrated on a corresponding bipartite graph G*: vertices in one of its parts represent edges in G and vertices in the second part represent vertices in G; edges in G* represent incidence in G. As illustrated by Figure 38, we may need to redistribute (find an augmenting path). If we are able to distribute all edges, then the graph is not dense. If no dense subgraph exists, then the flow based algorithm will terminate in O(n(m + n)) steps and announce this fact. If there is a dense subgraph, then there is an edge whose weight plus D + 1 cannot be distributed (edges are distributed in some order, for example by considering vertices in some order and distributing all edges connecting a new vertex to all the vertices considered so far). It can be shown that the search for the augmenting path while distributing this edge marks the required dense graph. It can also be shown that if the found subgraph is not overconstrained, then it is in fact minimal. If it is overconstrained, Hoffmann et al. [1, 5] give an efficient algorithm to find a minimal (nontrivial, if one exists) dof cluster inside it. Then Lomonosov and Sitharam [9] gives a method to ensure a complete, maximal, dof rigid decomposition of C. The simplification was given by Hoffmann et al. [6, 7]. The found cluster C interacts with the rest of the constraint graph through its frontier vertices; that is, the vertices of the cluster that are .,.i ,i:ent to vertices not in the cluster. The vertices of C that are not frontier, called the internal vertices, are contracted into a single core vertex. This core is connected to each frontier vertex v of the simplified cluster T(C) by an edge whose weight is the sum of the weights of the original edges connecting internal vertices to v. Here, the weights of the frontier vertices and of the edges connecting them remain unchanged. The weight of the core vertex is chosen so that the density of the simplified cluster is D, where D is the geometrydependent constant. This is important for proving many properties of the FA DRplan: even if C is overconstrained, T(C)'s overall weight is that of a wellconstrained graph, (unless C is rotationally symmetric and trivial, in which case, it retains its dof or weight). Technically, T(C) may not be wellconstrained in the precise sense: it may contain an overconstrained subgraph consisting only of frontier vertices and edges, but its overall dof count is that of a wellconstrained graph. Figure 39 illustrates this iterative simplification process ending in the final DRplan (Figure 15). 4.1.2 The Frontier Vertex Algorithm (FA DRplanner) The challenge met by FA is that it provably meets several competing requirements. Specifically, it gives a dof complete DRplan. The graph transformation performed by the FA cluster simplification is described formally by Hoffmann et al. [6, 7] that provide the vocabulary for proving certain properties of FA that follow directly from this simplification. However, other properties of FA require details of the actual DRplanner that ensures them, and are briefly sketched here. Note: a detailed pseudocode of the FA DRplanner (the existing version, as well as incorporating the modulerigidity algorithm of this section) is given by Sitharam [11, 15]. The pseudocode has been implemented as part of the downloadable, opensource FRONTIER geometric constraint solver [2, 10, 11, 15]. The basic FA algorithm is based on an extension of the distribute routine for edges (explained above) to vertices and clusters in order for the isolation algorithm to work at an arbitrary stage of the planning process, i.e, in the cluster or flow graph Gi. First, we briefly describe this basic algorithm. Next, we sketch the parts of the algorithm that ensure 3 crucial, interrelated properties of the output DRplan: (a) ensuring dof completeness; (b) for underconstrained graphs: outputting a complete set of maximal clusters as sources of the DRplan; (c) controlling width of the DRplan to ensure a polynomial time algorithm. Three datastructures are maintained. The current flow or cluster ','l, Gi the current DRplan (this information is stored entirely in the hierarchical structure of clusters at the top level of the DRplan), and a cluster queue, which is the toplevel clusters of the DRplan that have not been distributed so far, in the order that they were found (below gives an explanation of how clusters are distributed). We start with the original graph (which serves as the cluster or flow graph initially, where the clusters are singleton vertices). The DRplan consists of the leaf or sink nodes which are all the vertices. The cluster queue consists of all the vertices in an arbitrary order. The method Distribute Vertex distributes all edges (calls DistributeEdge) connecting the current vertex to all the vertices considered so far. When one of the edges cannot be distributed and a minimal dense cluster C is discovered, its simplification T(C) (described above) transforms the flow graph. The flows on the internal edges and the core vertex are inherited from the old flows on the internal edges and internal vertices. Notice that undistributed weights on the internal edges simply disappear. The undistributed weights on the frontier edges are distributed (within the cluster) as well as possible. However, undistributed weights on the frontier edges (edges between frontier vertices) may still remain if the frontier portion of the cluster is severely overconstrained. These have to be dealt with carefully. The new cluster is introduced into the DRplan and the cluster queue. Now we describe the method DistributeCi,'; r Assume all the vertices in the cluster queue have been distributed (either they were included in a higher level cluster in the DRplan, or they failed to cause the formation of a cluster and continue to be a top level node of the DRplan, but have disappeared from the cluster queue). Assume further that the DRplan is not complete, that is, its top level clusters are not maximal. The next level of clusters are found by distributing the clusters currently in the cluster queue. This is done by filling up the I. ' or the available degrees of freedom of a cluster C being distributed by D units of flow. The PushOutSide method successively considers each edge incident on the cluster with 1 endpoint outside the cluster. It distributes any undistributed weight on these edges + 1 extra weight unit on each of these edges. It can be shown that if C is contained inside a larger cluster, then at least one such cluster will be found by this method once all the clusters currently in the cluster queue have been distributed. The new cluster found is simplified to give a new flow graph, and gets added in the cluster queue, and the DRplan as described above. Eventually, when the cluster queue is empty, i.e, all found clusters have been distributed, the DRplan's top level clusters are guaranteed to be the complete set of maximal dof rigid subgraphs of the input constraint graph. Lomonosov and Sitharam give the formal proofs [9]. W a d a CC hC CCf C2 kb Figure 4 1: Finding W first will prevent dof misclassification with 2D and 3D example. Note: Throughout, in the interest of formal clarity, we leave out ad hoc, but highly effective heuristics that find simple clusters by avoiding fullfledged flow. One such example is called "sequential (::.i i .i which automatically creates a larger cluster containing a cluster C and a vertex v provided there are at least D edges between C and v. These can easily be incorporated into the flow based algorithm, provided certain basic invariants about distributed edges is maintained. This completes the description of the backbone of the basic FA DRplanner. Next we consider some details ensuring the properties (a) (c) above. First we intuitively explain why dof completeness is a crucial property. After C1 and C2 are found (Figure 4 1), when C1 is distributed, C1 and C2 would be picked up as a cluster, although they do not form a cluster. The problem is that the overconstrained subgraph W intersects Ci on a trivial cluster, and W itself has not been found. Had W been found before C1 was distributed, W would have been simplified into a wellconstrained subgraph and this misclassification would not have occurred. It has been shown by Lomonosov and Sitharam [9] that this type of misclassification can be avoided (W can be forced to be found after C2 is found), by maintaining b d b d b e d j k Figure 42: Ensuring Cluster Minimality. three invariants. The first two are described here. The third is highly related to property (b) and is described in the next subsection. The first is the following invariant: alvi., distribute all undistributed edges connecting a new found cluster C (or the last distributed vertex that caused C to be found), to all the vertices distributed so far that are outside the cluster C. Undistributed weight on edges inside C are less crucial: if they become internal edges of the cluster, then this undistributed weight "disapp'. , when C is simplified into a wellconstrained cluster; there is also a simple method of treating undistributed weight on frontier edges so that they also do not cause problems the method and proof are given by Lomonosov and Sitharam [9]). The second invariant that is useful for ensuring dof completeness is that for any cluster in the DRplan, no proper subset of at least 2 of its child clusters forms a cluster. We call this property cluster ,,:,..:,,;,l.:/l; FA ensures this using a generalization of the method Minimal given by Hoffmann et al. [1, 5] which finds a minimal dense subgraph inside a dense subgraph located by Distribute Vertex and DistributeEdge. Once a cluster C is located and has children C1,..., Ck, for k > 2, a recursive method clusMin removes one cluster Ci at a time (replacing earlier removals) from C and redoes the flow inside the flow graph restricted to C, before C's simplification. If a proper subset of at least 2 C 's forms a cluster C', then the clusMin algorithm is repeated inside C' and thereafter in C again, replacing the set of child clusters of C that are inside C' by a single child cluster C'. If instead no such cluster is found, then the removed cluster Ci the essential. That is, it belongs to every subset of C's children that forms a cluster. When the set of clusters itself forms a cluster E (using a dof count), then clusMin is called on C again with a new child cluster E replacing all of C's children inside E. While the DRplanner described so far guarantees that at termination, top level clusters of the DRplan are maximal. It also guarantees that the original graph is dof underconstrained only if there is more than one top level cluster in the DRplan. However, in order to guarantee that all the maximal clusters of an underconstrained graph appear as top level clusters of the DRplan, we use the observation that any pair of such clusters intersect on a subgraph that reduces (once incidence constraints are resolved) into a trivial subgraph (a single point in 2D or a single edge in 3D). This bounds the total number of such clusters and gives a simple method for finding all of them. Once the DRplanner terminates with a set of maximal clusters, other maximal clusters are found by simply performing a Pushoutside of 2 units on every vertex (in 2D) or every vertex and edge (in 3D), and continuing with the original DRplanning process until it terminates with a larger set of maximal clusters. This is performed for each vertex in 2D and each edge in 3D which guarantees that all maximal clusters will be found. Lomonosov and Sitharam give the proofs [9]. C5 h d C4 at\ b e Cl C2 C3 a b c d e f g h i Figure 43: Prevent accumulation of clusters FA achieves a linear bound on DRplan width by maintaining the following invariant of the cluster or flow graph: every pair of clusters in the flow graph (top level of the DRplan) at any stage intersect on at most a trivial subgraph. FA does this by repeatedly performing 2 operations each time a new potential cluster is isolated. The first is an i ,/.,t I i,,n ,, of the found cluster. In general, a new found cluster N is enlarged by any cluster D1 currently in the flow graph, if their nonempty intersection is not a rotationally symmetric or trivial subgraph. In this case, N neither enters the cluster graph nor the DRPlan. Only N U D1 enters the DRplan, as a parent of both D1 and the other children of N. It is easy to see that the sizes of the subsystems corresponding to both N U D1 and N are the same, since D1 would already be solved. When the DRplan finds (Figure 43)the cluster C2 after C1, the DRplanner will find that Ci can be enlarged by C2 The DRplanner forms a new cluster C4 based on C1 and C2 and puts C4 into the cluster queue, instead of putting C2 to cluster queue. The second operation is to iteratively combine N U D1 with any clusters D2, D3,... based on a nonempty overlap that is not rotationally symmetric or trivial. In this case, N U D1 U D2, N U D1 U D2 U D3 and so on enter the DRplan as a staircase, or chain, but only the single cluster N U D1 U D2 U D3 U ..... enters the cluster graph after removing D1, D2, D3 .... Of course, both of these processes are distinct from the original flow distribution process that locates clusters. 4.2 ModuleRigidity: Characterization and Algorithm We give a recursive definition of 3D modulerigidity (along with a definition of modulecomplete DRplans) and show that it is a natural and robust characterization. Then we sketch an extension of the FA algorithm in order to determine modulerigidity by constructing modulecomplete DRplans. We follow with a number of examples of graphs that are dof rigid but not modulerigid. Let C be a 3D distance constraint graph. Let E, C1,..., Ck be proper sub : : of C. '\\' say that C,... C0k =>,c E (read: irmplies '.'"'. if by C 1 ,..., C,, ( ..: .'' graphs (by adding additional edges), E becomes rigid. Analogo. we define =>A and =*"" asserting dof rigidity and modulerigidity (to be defined below) as the right hand side of the ::.. i'ation, respc i' . Let C be a 3D distance constraint graph. C is modulerigid if: Base case: it is trivial and dof rigid. Or the following holds. Let Q {C1,... C.,} be any maximal, module decomposition of C. This is defined as follows. Let ,* be the transitive closure of the empty set under 4",', that is, if there is a proper subgraph E of C such that either it is modulerigid, or there is some set of modulerigid proper subgraphs C1i,... Ck < ( C such that C1,..., CAk ,"c, E, then E belongs to *. Let Q be : subset {C1,..., ,,,} of '* such that Case 1: m 2; C, and (2 intersect on a nontrivial subgraph and their union induces all of C(. Or. the following holds. Case 2: Any maximal subgraph in n* nust contain one of the Ci in Q. Each of the C's is n n maximnal with r to the set Q in the following sense: the ( :.' clements ( '* that strictly contain C intersect all the other subgraphs Cj, j / i on nontrivial subg. 1' TT: :: C is modulerigid if (1)5iAdj dof( F (Cs)) < , _Q C ES where (recall) D is the number of dofs of a rigid body, and : C) is either the number of dofs (negation of density) of C, if Ci is trivial; or ; ) D if C is nontrivial. Observation 4.2.1 F.. module' .: is do/f and .., .. .' is modulerigid. next lenmmna shows the track : :: of the above characterization. Lemma 4.2.2 Let Q = {CI,..., Cm} be I:. set of proper 'J./l'.,l'l, of C that form a complete, maximal, module decomposition of C. This implies that if m > 2, then no pair of Ci intersect on more than a trivial l'g,.,l'l, Thus m is at most O(n3), where n is the number of vertices C. Thus, the computation of the inclusion exclusion formula in D. fil...( 4.2 takes O(n3) time. Using the above lemma, the following definition shows the use of socalled modulecomplete DRplans to efficiently determine module rigidity. A module DRplan P for a 3D distance constraint graph G is a partial order where each node represents a subgraph in /,,,* or G itself, if G is module rigid. The ordering is by containment. These nodes are called module clusters (to be crucially differentiated from modulerigid subgraphs of G, which we call inherent module clusters). The leaves are the original vertices of G. Each node in the subDRplan rooted at a node C represents a subgraph in "~m,,* or C itself, if C is modulerigid, or an inherent module cluster. If G is modulerigid, there is a single source cluster; if G is not modulerigid, the roots or sources form is a complete, maximal, module decomposition of G. A partial module DRplan does not have to satisfy the conditions on the roots or sources. A module DRPlan is module complete if the set Q of child clusters of every module cluster C in P is a complete, maximal, module decomposition of C. A module DRplan is typically defined to contain additional information by incorporating another partial order called the solving '.:" .:l./; order, which is consistent with the module DRplan's DAG order, but could be more refined. The intent is that modulerigidity of module clusters that appear later in the order depend on clusters that appear earlier. That is, the ordering reflects the number of applications of ="' required to find a module cluster. The next theorem shows that modulerigidity is robust. That is, the order of bottomup construction of module(complete) DRplans is immaterial, a type of C('!ni, !lRosser property. Theorem 4.2.3 If a i'jl, G is modulerigid, then every partial, module( complete) DRplan for G can be extended to a module(complete) DRplan. The above discussion effectively lays out a tractable method for determining modulerigidity by computing modulecomplete DRplans bottom up. This is done by extending the dofcomplete DRplanner FA given in the previous section as follows. First note that by using FA we guarantee no false negatives, since modulerigid implies dofrigid. We now sketch how to eliminating dofrigid graphs that are not modulerigid. The FA DRplanner running on an input graph G uses DistributeCluster (flow) on the current set S of dof rigid clusters to isolate a dof cluster candidate C, and thereafter constructs a a complete, maximal, dof rigid decomposition of it, after which it decides whether a new dofrigid cluster C has been found, using the dofrigid characterization of Section 4.1. This is the key point of extension. We use the analogy between this dofrigid characterization and the modulerigid characterization at the beginning of this Section. Inductively, we can assume that the current set S consists of modulerigid subgraphs of G or inherent module clusters. The method of construction of a complete, maximal, module decomposition Q of the candidate (inherent module) cluster C can be done without constructing ', "'*, by constructing a sequence of Qi's each of which satisfies the above conditions on Q, but with respect to "mCi (i.e, closure with respect to i applications of the ="' operation). This sequence reaches a fixed point at Q. We give examples that illustrate the use of modulerigidity. In Figure 44 Top Left: the graph is dof rigid, but not modulerigid, as seen by the complete maximal module decomposition shown. Top Right: modulerigid, but no pair of inherent module clusters shown forms a modulerigid subgraph, they do form dofrigid Cl S1 y1 V C3   A y v ii c ^ ^  Sh CC4 ,C2 ,'' Cl '" '( C2 b C6 C5 \\ C3 C4 . C1 C2 C3 C4 Figure 44: Examples where modulerigidity beats dof rigidity. subgraphs. Bottom: not modulerigid but dof rigid; complete maximal module decomposition and solving priority orders as follows: the pair C1, C2 is an inherent module cluster C5 but that C5 can be solved only after C3 is solved; That is, before the virtual edge (c, d) is added, Ci and C2 would not be picked up together as a cluster candidate. Similarly, it will also determine that Cs, C3 form a cluster C6, but solving priority order shown. Bottom Right: modulecomplete DRplan for left constraint system with 2 sources or roots: C6 and C4. Figure 45 shows a classic graph given by Crapo et al. [20, 21], with I,!:n, ," which is not modulerigid but is dof rigid. A complete maximal, module decomposition is shown. The middle cluster C2 is not an inherent module cluster, although C1 and C2 are. Figure 45: Classic Hinge example: not modulerigid, but dof rigid A question that immediately arises is to relate the characterization given here to rigidity matroids and standard conjectures on combinatorial rigidity characterizations for 3D [19]. CHAPTER 5 CONJECTURE OF ANGLE CONSTRAINT SYSTEM Laman shows a combinatorial characterization of 2D distance constraint system [18]. When other constraints are involved, for example, ,inl there is no combinatorial characterization. In this chapter, we first give a combinatorial rigidity characterization of a class of angle constraint system. We then show this characterization is not sufficient for the general angle constraint system. Thereafter, we propose a conjecture to determine the rigidity of the general angle system. 5.1 Definitions Point: point p E R2, is represented as (x, y). Angle Constraint: the angle constraint between 2 ordered pairs of points, (Pli, P2i) and (Plj, P2j), satisfies that cos 0 (Pli,P2i)*(PlP2j) (x2iXli)(x2jXlj)+(Y2iYli)(Y2jYlj) I(Pli,P '' Pj,P2j) (X2iXli)2 ( y2iYli)2 (x2jXlj)2 (2j lj)2 CO ilj2 +(U Y Geometric Angle Constraint System: a geometric system in which the objects are finite points and the constraints are finite angle constraints. Solution: the set values of the variables xi, yi of the system that satisfy the constraints Valid Solution: the solution of a geometric system which does not make any angle 0 or points coincident is called a valid solution. Angle Graph: For a geometric angle constraint system, the graph in which the vertices represent the pairs of points and the edges represent the angles is called the angle graph (Figure 51). Angle C,. 1. For a geometric constraint system, if there is an angle cycle in its corresponding angle graph, we w this angle constraint system has an angle p v12 S P 13 v14 v23 P\ ,' p4 \ \1 v24 v34 P3 O 6 Figure 51: Geometric angle constraint system and the angle graph. cycle. If the angle graph has one more edge between v13 and v14 (Figure 51), its corresponding angle constraint system has an angle cycle. Angle Pseudo C;0. 1 For a geometric constraint system, if there is an angle cycle with one angle missing, we i this angle constraint system has an angle pseudo cycle. The system (Figure 51) has an angle pseudo cycle. Angle C/l:'., For a geometric constraint system, if there exists n points (n > 3) in which any two pairs of points has an angle constraint between them, we i the system has an angle clique. Implicit Angle C; 1. In an angle constraint system, for an angle cycle consisting of assigned angles 01 ... Os and unassigned angles 1i ... 7<', s > 0, t > 0, in its corresponding angle graph, if there exists 0i Sj for i / j, where S is the minimal 4 dof subgraph containing 7j, we i this angle constraint system has an implicit angle cycle. When t = 0, implicit angle cycle turns out to be an angle cycle. Degrees of Freedom of Primitive Geometric Objects: degrees of freedom (DOF) describes flexibility of motion. It is the number of parameters of the object which may be independently varied. In 2D, a point has 2 DOF. Degrees of Freedom of a Geometric System: For a geometric system G, its DOF equals ,peG DOF of object p eC DOF removed by constraint c. In Figure 51, the system has 4 points and 3 angle constraints. Each point has 2 DOF and each angle constraint removes 1 DOF. So the system has 5 DOF. 1 7. .. Degrces of Freedom (adof): For a geometric system, count the dof of the sub that are ::.1. cliques as 4, then do the inclusionexclustion 1 counting, the total dof is called listedd '. ees of freedom. C i .' i nden t: Let S be the set of angles of a geometric angle constraint S'Ti .. system (G' is generically independent (T there is an assignment S* = ( ,..., ) of values to the set S such that (C has a valid solution and for such assignment S*, there is a : ',1 ,orhood of S*, that is, Is 1 x ... x i6,, where the J1e (0, , .^ + e) are intervals of angle values, : : some e > 0, such that : ... tuple < values ( ,.... ,0') E Is, G has a valid solution. Notations: We use GC' to denote a geometric angle constraint system with n i:ints; G,, to denote the .:: angle '. of G"' p to denote the point in Ga: v to denote the vertex in (,. 5.2 One Combinatorial Characterization In this section, we give a combinatorial characterization of the angle constraint that can be obtained I. the following construction. Gradual Construction: Starting with a pair of points, add a point with at most 2 angles connecting it with the constructed system at each step until all i '..:i ; are added. If an angle constraint system G' can be constructed by gradual construction, it is ... constructible. Theorem 5.2.1 An .' constructiblhe cgeoetric .'.' constraint :7 is .:' it does not have . Proof We prove it by induction on number of points n of CG: 1. Base case: when G'l has ci 2 points, it is obvio:: i generically independent v{n+l} v{n+l} G n G n Figure 52: The new point pn+l is at the circle or at the radial Gn Figure 53: Two new angles: 61 and 62 2. Assume GC has T angles and is generically independent, because CG is gradually constructible, we can find a point pn+l with at most 2 angles connecting it with GC. Case 1: there is no ,.'/,. connecting Pn+ with GC. Obviously, the case holds. Case 2: there is an ,.',1/ connecting pn+1 with GC. Pnj+ could be at the circle or at the radial determined by the angle 6 (Figure 52). It is easy to know there exists a value of 6 which together with the T angles which make GC have a valid solution that make G(+1 have a valid solution. From hypothesis we know, when G' has a valid solution, these is a corresponding rectangle IT such that GC with any tuple of values (06,..., 0') E IT has a valid solution. As the position of pn+l is continuous, there exists an interval Is for 6, such that G +1 with any tuple of values in IT x 6I has a valid solution. So, GC + is generically independent. Case 3: there are 2 1,1 i., connecting pn+l with GC. Call the 2 angles 61 and 62. We prove case 3 in the following 3 subcases. We call the angles involved in Pn+1 new angles and the others old angles. Gn Figure 54: One new angle 61 and one old angle 62 Subcase 1: Both 61 and 62 are new 'ii1 (F.:,i. 5 3). The position of p+i should be at the intersection of two circles which are determined by 61 and 62 respectively. For a T E IT, choose 6i E (0,e), c 0 to ensure two circles intersect. If for 6*, pn+i is in a corresponding line of a pair of points of GC, we choose ~ equal this 6* to prevent pn+1 lie in this line. After proceeding with all the lines, we ensure pn+ does not lie in any line of GC. If 6*, pn+l coincidents with a point of GC, we choose cT equal this 6* to prevent pT+l coincident with this point. After proceeding with all the points, we ensure pT+l does not coincident with any point in GC. Let I = n (0,T) and 1A I6 x I262. We know GC with any tuple of values in IT x I1 has a valid solution. So GC+, is generically independent. Subcase 2: 61 is a new w,.',ll. and 62 is an old i,'ll. (Figure 54). The position of P,+1 should be at the intersection of the circle which is determined by 61 and the radial which is determined by 62. For a T E IT, choose 61 E (0, ct), T 0. 62 E (C i7). C > 7 to ensure the radial intersects the circle. If for 6 pn+i is in a corresponding line of a pair of points of GC, we choose (T equal this 6* to prevent pn+l lie in this line. After proceeding with all the lines, we ensure pn+l does not lie in any line of GC. If 6*, pn+l coincidents with a point of GC, we choose ( equal this 6* to prevent pT+l coincident with this point. After proceeding 5gi with all the points, we ensure pmn+ does not coincident with any point in GC. Let I,1 = nTT(oCr) and 62 n= TIT( ,,) and l Ist, x I62. We know G + Gn Figure 55: Two old angles do not share a pair of points containing p,+l 0n / d G dt2 Figure 56: Two old angles share a pair of points containing pn+l with any tuple of values in IT x 1, has a valid solution. So G'+, is generically independent. Subcase 3: Both 61 and 62 are old i,lll, (F:lui'' 55). The position of pn,+ should be at the intersection of two radials which are determined by 61 and 62 respectively. For a T E IT, choose 61 E (0, Ce), eT  0 and choose 62 E (C, 7r), cT makes 11 I 12 to ensure two radials intersect. If for 6 pn+1 is in a corresponding line of a pair of points of GC, we choose 4T equal this 6" to prevent pn+i lie in this line. After proceeding with all the lines, we ensure pn+i does not lie in any line of CG. If for 6 pn+l coincidents with a point of GC, we choose c equal this 6" to prevent pn+l coincident with this point. After proceeding with all the points, we ensure pn+1 does not coincident with any point in GC. Let 6, = nTr, (O, ) nd 2 iTIT (,7r) and A = Is x I 2 We know Gn+,I with any tuple of values in IT x IA has a valid solution. So GCi+, is generically independent. Note that 61 and 62 can not be 2 old angles sharing a pair of points containing Pn+i (Figure 56), because G has no implicit angle cycle. From above, we know GC+, is generically independent in case 3. k)o Figure 57: Generically independent system that is not gradually constructible I a b c e g If S Figure 58: Implicit angle cycle is not the only type of dependency. So if G is gradually constructible and has no implicit angle cycle, it is generically independent. On the other hand, if G is not gradually constructible, it may still be generically independent. G (Figure 57) is not gradually constructible because each point has 3 angles involved. But G is still generically independent. The implicit angle cycle is not the only type of dependency in the angle constraint system. Angle 1 (Figure 58) is fixed by angles a, b, c, m and angle j is fixed by angles f, g, h, i. Then the subgraph S actually has 3 degrees of freedom because it has 5 angles (d, e,j, k, 1) fixed. Thus S is not generically independent. Because detecting the implicit angle cycle is not sufficient to tell whether an angle constraint system is generically independent, we propose a rigidity conjecture. 5.3 Observations The following two observations are crucial for the proof of the conjecture. First, we give an algorithm that is essential in our discussion. Verifier: Taken a geometric angle constraint system G as input, 1. If G has a 3 or dof subgraph, return false 2. If there exists an angle cycle which is not contained in an angle clique, return false 3. Find an angle pseudo c(! if it exists. th. :: the missing angle. 4. If there exists one subgraph with 3 or fewer ...i.. return false. 5. Find a 4 .: isu' : i: that is not an angle clique if it exists. .:. : all the unassigned angles . 6. repeat 2, 3, 4 and 5, :: : no more angles are assigned, return true Note that Verfier . have different <... utational .. .'l based on which angle ( chosen in Step 3 and which 4 adof sugrn: : chosen in step. Observation 5.3.1 For an 7 that is in a path P, of V c r,, it will be . .' in : path 1 ,' unless V 'r T' returns false . ".,re it, cn ', 7.' Assume there exists a path P in which 7 is not assigned and Verifier returns true. Pb does not assign all the angles assigned in Pa otherwise 7 is also assigned in Pb violating the assumption. Let 0 be the first angle assigned in P0 but not assigned in Pb. All the angles assigned before 0 in P that are necessary for assigning 0 are also assigned in Pj,. Verifier only returns true if there is no more angle to be assigned. But at the end < Pi,, Verifier can still assign 0 because all angles necessary assigning 0 have been assigned in Pb. contradicts the .. >tion that Verifier returns true at the end of Pb. Observation 5.3.2 All '.'.. returnT the same result. Assume there are two paths PI and b that IP returns false and IP returns true. Pb does not assign all the angles assigned in P, otherwise PV will also return false. Let 0 be the first angle assigned in PO but not assigned in Pb. All the angles assigned before 0 in P) that are necessary for assigning 0 are also assigned in Pb. Verifier only returns true if there is no more angle to be assigned. But at the end of Pb, Verifier can : :1 assign 0 because all angles necessary for assigning 0 have been assigned in Pb. That contradicts the assumption that Verifier returns true at the end of Pb. Observation 5.3.3 All paths that return true assign the same set of il, Assume there are two paths Pa and Pb that both return true but they assign different sets of angles. Let 0 be the first angle assigned in Pa but not assigned in Pb. All the angles assigned before 0 in Pa that are necessary for assigning 0 are also assigned in Pb. Verifier only returns true if there is no more angle to be assigned. But at the end of Pb, Verifier can still assign 0 because all angles necessary for assigning 0 have been assigned in Pb. That contradicts the assumption that Verifier returns true at the end of Pb. Observation 5.3.4 Verifier has C'I,,, I/Rosser 1p'*/' '/ i From Observation 5.3.2, we know Verifier has ('0lir, !iRosser property. Observation 5.3.5 Verifier has y. ./;;,.,;.,/d time ,..';,,l. ii/, To use MFA algorithm find 3 or fewer adof subgraph in step 1,4 and the 4adof subgraph in step 5, it requires O(n3(n + m)) (n is the number of vertices, m is the number of edges). To use depthfirst search to find angles in step 2, 3, it requires O(n + m). Verifier runs at most n4 iterations because there are at most n4 angles and at least one angle is assigned at each iteration, then the time complexity is O(n'(n + m)). Actually the upbound of the time complexity is very loose. If the verifier returns true for a geometric angle constraint system, we v the system passes the verifier. Then we have the following observations. Observation 5.3.6 If a geometric ,;.'l. constraint system G fails the verifier, it is not gene .'.'ll/; independent. If G fails the verifier at step 1, it is obvious that the angles in the 3 or fewer dof subgraphs are not independent to each other, thus G is not generically independent. If G fails at step 2, then for ... angle of the angle .. i. its value is fixed by every setting of values of the other angles in the angle cycle, thus G is not generically : '. pendent. If G fails at step 4, it is obvious that the angles in the subgraph with 3 or fewer adof are not i. '*. endent, thus C is not generically :.. Icndent. Observation 5.3.7 Given n angle constraCint : iin 2D with k(> 0) dof, there is at least one :. ,',' involved in at most 7 Let im be the number of angles involve in the point that has the least number of angles involved. As an angle involves in at most 4 points and G'( has k < the following ine. holds: mn n < ( 4 (2n k). Ti. we get ?n < 8 [4 k/n]. So m < 7. 5.4 Conjectures For the following three lecturess, the first two are used for the i of the third one which is our 2D rigid characterization ..'ecture of angle constraints system. Conjecture 5.4.1 For an ... '. constraint G; with k(> 4 i x) dof that the '' r, there exists an xtuple of. :. :1' such that it does not Tntake the '.. f '' the 'r " Partial Proof: Let G'~ be the ith maximal 4 i : : in G' which has at least 3 points. Si this pro 'ty holds: Gs, and Gs are <' pointed for ... i r j, that is G', and G'C share at most one point. If Gs, and Gs, share a vertex, G',. U G' has 4 i n angle involves in both G',. and G(" TI: violates the statement G,. and Gr are the maximal 4 dof subt (es in GC Or G(, U G.;, has 3 or fewer dof if at least one angle involves in both G' and G( This is ::: 1 t because no : 1 : has 3 or fewer dof in G;'. So the property holds. G,, has t trees: n(n 1)/2 (2n k) = ((n 2.5)2 6.25)/2 1 k. So when k is given, t is increasing for n > 3. Note that the tree could be consist of (c 1 one vertex. When n 3, t .k 3 > x + 1, that is for a given G,, with k dof, it has at least x i 1 trees. W\e give an algorithm to find the .:tuple <.' : ified angles without forming an angle ( 1. or making ..:* subgraph 3 or i 0 dofs. Here is its pseudocode. While x>0 Find maximal 4 dof subsystems If there is no $G_{S_i}$ in $G_n$ add an angle between a pair of trees arbitrarily else add an angle between (vl, v2), where vl is in $G_{S_i}$ and v2 which is in another tree of vl and outside of $G_{Si x end If there is no GC' in G' at current stage, then we ca.n choose the angle in the x' 1. of unsp. : : i angles between a pair of trees ar : : : without forming an :. .1. : or making subgraph 3 or fewer dofs. If there is a G'C, because the trees can't be totally contained in Gs, all together, we can al. .:: such a pair (v1, 'a2) such that. vi is in Gs, and v2 is in another tree of v, and outside of Cs,. i ensures it does not form an angle cycle. And because Gs s are 1.. pointed it does not make :: ;: 1 :3 or fewer dof. We still need to prove G, with .. ying that xtuple the verifier. Conjecture 5.4.2 For an '.: constrint s '. G>+ that the iver . ifn > 4, m is the number of angles involved in .. : that involves the least angles, then there exists an .... angle 7 in G', such that . one of the m '. involved in ; : to G, and .. '. in pG to get G1,n1 1 n+ i passes the Partial Proof: From the proof of Observation 5.3.7, we know n + 1 > F4k/(8 m)]. When m = 4, n > 3. But when n = 3, no G' satisfies that the number of angles involved in the point that involves the least angles is 4. In fact, it can be at most 3. So n > 4. When m = 4... 7, n > 4. Then we know G' has at least 4 points. G' has k, = k + (m 2) dofs. And G, has t = n (n 1)/2 (2n kT) = (n2 5n)/2 + k, trees. When n = 4, t = m+ (k 4) > m. Then the m 1 edges of Gn+1 \ G, is not enough to connect all these t trees to be a tree of G+,1. Then we know the vertices in G, can't be all in a tree of G,+1. Let G' be the ith maximal 4 dof i1iil. in G" + which has at least 3 S i  points. If pn+l is not in any G', then we add 7 by the way similar to Conjecture 5.4.1. If pno+ is in a G', we add 7 between the (11, 12), 11 is the edge in GC and 12 is in G' \ G' and 11 and 12 are not in the same tree of G This pair does exist because the vertices in G, can't be all in a tree of G, So G"s has no angle cycles and no subsystem has 3 or fewer dof. Also, we need to prove G passes the verifier. Conjecture 5.4.3 For an ,';,l,/ constraint system G" in 2D that passes the verifier, it is genet ,'/// independent. Partial Proof: Case 1: there exists a point pn+l has no ,1;.l/. involved. Case 2: there exists a point Pn+i which has 1 I,,;/l. involved. Case 3: there exists a point pn,+ which has 2 wig1, involved. In these 3 cases, G+,l) is generically independent. Refer to the proof of Theorem 5.2. Case 4: there exists a point pn+ which has m(> 3) or more ,..gl involved. ASSUMPTION: For an angle constraint system sG in 2D with 4 dof and no angle cycles and no subsystem has 3 or fewer dof, and G" with aI = I x I2 x ... x I has a valid solution, Ii is the interval of the specified angle i in G", s is the number of specified angles, for an unspecified angle 6 specifying which does not make any angle cycle, let 7 be the specified angle which is in the minimal 4 dof ,1ii. ,. in that contains all the lines participating 6, then for any v* E I\,, as 7 varies in I,, there exists a nonzero sized 6I for 6. If m = 3, call the three angles 61,62 and 63. From Conjecture 5.4.1, we know that there exists an unspecified angle 7 in GC that does not form an angle cycle involving some subset of the specified angles or make any , ii'.l ii 3 or fewer dof. Unspecify 63 and specify 7 to get G i. From case 3, we know GC with la = I x 12 x ... x ... x I x 16s x I62 has a valid solution, s is the number of angles in GC. And the minimal 4 dof , 1i,l. i:: of 63 must contain 7. Then from the assumption, we know for any v* E I\a, as 7 varies in I,, there exists a nonzero sized Is for 63. Let I, E I, and I7l 0, i is the specified angle in G i. As v* varies in ' I does not change much because I', is relatively small. Then la3 n* j'\ I'K has nonzero size. Then we know GC,1 with 'I\, x 163 has a valid solution, so G'+I is generically independent. If m = 4, call the 4 angles 61,62, 63 and 64. Choose 7 as described in Conjecture 5.4.2. After specify 7 and unspecify 64 to get GCsI, and choose I similar to the case when m = 3, we know I64 that has nonzero size exists. Then GC, with ~\' x I64 has a valid solution, so G'+, is generically independent. We can also do the similar job for m 5... 7. CHAPTER 6 SOLUTION SPACE NAVIGATION In this chapter, we study the welldocumented problem of systematically navigating the potentially exponentially many roots or realizations of wellconstrained, variational geometric constraint systems. We give a scalable method called the ESM or Equation and Solution Manager that can be used both for automatic searches and visual, userdriven searches for desired realizations. The method incrementally assembles the desired solution of the entire system and avoids combinatorial explosion, by offering the user a visual walkthrough of the solutions to recursively constructed subsystems and by permitting the user to make gradual, adaptive solution choices. We isolate requirements on companion methods that permit (a) incorporation of many existing approaches to solution space steering or navigation into the ESM; and (b) integration of the ESM into a standard geometric constraint solver architecture. We address the latter challenge and explain how the integration is achieved. And we clarify these requirements essential and desirable for efficient, meaningful solution space navigation. Also, we sketch the ESM implementation as part of an opensource, 2D and 3D geometric constraint solver FRONTIER developed by our group. 6.1 Companion Methods Requirements In order to describe the ESM method and how it can be integrated into any geometric constraint solver (Figure 61), it is necessary to give welldefined essential and desirable requirements on the companion methods mentioned in the Introduction for the ESM method to be effective. We additionally point to known literature that provide the companion methods that meet these requirements. 6.1.1 DRPlanner In order to give the DRplanner requirements, we first need some preliminaries about combinatorial analysis of geometric constraint systems. A geometric con straint p Ill, G = (V, E, w) corresponding to geometric constraint system is a weighted graph with vertex set (representing geometric objects) V and edge set (representing constraints) E; w(v) is the weight of vertex v and w(e) is the weight of edge e, corresponding to the number of degrees of freedom (dofs) available to an object represented by v and number of degrees of freedom removed by a constraint represented by e respectively. For example, Figure 11 shows a 2D constraint systems and their respective dof constraint graphs. Figure 14 shows a 3D constraint systems whose graph have vertices of weight 3 (points) and edges of weight 1. Note that the constraint graph could be a iT;,/' ,,'/l, each hyperedge representing a constraint involving any number of vertices. A vertex induced subgraph represents a subsystem of the entire constraint system. The subgraphs can be classified as being underconstrained, wellconstrained, or welloverconstrained  the latter two are called rigid subgraphs or clusters. The meaning is that the corresponding subsystems have the corresponding constrainedness properties for generic parameter values. In many cases, this classification of the subgraphs can be done purely combinatorially, using the dof weights, but ignoring geometric parameters such as distance, angle and so on attached to the constraints. As mentioned in the introduction, any effective constraint solver combinatorially develops a plan for recursively decomposing the constraint system into small subsystems, whose solutions obtained from the algebraic/numeric solver can be recursively recombined by solving other small subsystems. Such a recombination is straightforward, provided all the ,l.\ 14.I generically have a finite number of solutions, that is, they are generically rigid. The DRplanner is typically a graph algorithm that outputs a decomposition recombination plan (DRplan) of the constraint graph. In the process of combinatorially constructing the DRplan in a bottom up manner, at stage i, it locates a wellconstrained subgraph or cluster Si in the current constraint graph Gi, and uses an abstract .:,,,/i.: / ,rl/, n of Si to to create a transformed constraint graph Gi+l. While we rely on a rough correspondence between wellconstrained subgraphs or clusters and rigid subsystems, the exact nature and limitations of this correspondence is a complex issue, especially in 3D, and is discussed later. Formally, a DRplan of a constraint graph G is a directed .,. i' i, graph (DAG) whose nodes represent rigid clusters in G, and edges represent containment. The leaves or sinks of the DAG are all the vertices (primitive clusters) of G. The roots or sources are all the maximal clusters of G. For well or welloverconstrained graphs, the DRplans have a single source, and for underconstrained graphs, the DRplans have multiple sources. There could be many DRplans for G (Figures 11, 14). Generally, for overconstrained clusters, a DRplan is required to also contain information about which sets of overconstraints can be removed while retaining the rigidity of the cluster. These are called reducible overconstraints. Reducible overconstraint dir. ./11; associated with a cluster C refer to those that connect primitive elements occurring in different child clusters of C. Overconstraints that lie within any child cluster Ci are associated with that Ci, not with C. We describe essential and desirable properties that a good DRplan(ner) should have for it to be useful in conceptual navigation of the solution space of general, cyclic 2D or 3D systems. It is desirable to be able to apply the ESM method to a large class of 2D and 3D constraint systems. For the method to work for any such class, it is essential that the DRplan's nodes should correspond to rigid clusters or generically rigid subsystems, and all choices of reducible constraints of overconstrained clusters should be available. Recall that these clusters and their reducible constraints are picked by the DRplanner using just the constraint graph, that is, using purely combinatorial properties of the constraint system. To illustrate the level of challenge involved in doing this: to date, there is no known, tractable, characterization of generic rigidity of distance constraint (sub'i, if,, for 3 or higher dimensions, based purely on combinatorial properties of the constraint graph [19, 22], although several conjectures exist. Moreover, there are no known combinatorial characterizations of 2D rigidity, when other constraints besides distances are involved. It should be noted that in 2D, Laman's theorem [18], gives such a characterization if all geometric objects are points and all constraints are distances. However, the standard generalization of the Laman property for 3D, also called dof .:1.:l/,I': is inadequate: while all rigid systems are dofrigid, the converse is not the case in 3D. Standard counterexamples are systems that contain constraint dependence or inexplicit overconstraints hidden in socalled " I ,i ,i i or !! ,!;, " [19, 20, 21] (Figure 14). In fact, these are the only known types of counterexamples. The modulerigid Frontier vertex algorithm described by Sitharam and Zhou [12] and implemented in FRONTIER [15] is the first known polynomial time DRplanner that is not fooled by any known type of constraint dependence, specifically, the ' iin or hliii;u" type constraint dependence. It gives a DRplan whose nodes are socalled modulerigid clusters. It is an open question whether there are any nonrigid subgraphs that are modulerigid. No counterexamples are known. The modulerigid Frontier vertex algorithm is crucially based on the socalled dofrigid Frontier vertex algorithm analyzed by Lomonosov and Sitharam [2, 9, 24]. While the latter does not detect bananas and other constraint dependence, it is the first algorithm that gives a complete DRplan, that is, a complete decomposi tion of each cluster into maximal proper subclusters. A generalized version of this decomposition is the key starting point for detecting modulerigidity [12] and is also crucial for obtaining a tractable DRplan that aids efficient solving (discussed next). The basic idea for the dofrigid Frontier vertex DRplanners (without a complete formal analysis and without the fully general completeness property) was presented by Hoffmann et al. [6]. The method for obtaining all possible sets of reducible constraints for overconstrained clusters of dofrigid Frontier vertex DRplans, both for 2D and 3D, and modifying the DRplan once they have been removed, is presented by Hoffmann and Sitharam [8]. The size of a cluster in a DRplan is its fanin (it represents the size of the corresponding , 1iiI ii once its children are solved). Since the algebraicnumeric solvers take time exponential in the size of the subsystems they solve, and the number of solutions is also typically exponential, minimizing the size of a DRplan is essential to the ESM method presented here. An optimal DRplan is one that minimizes the maximum fanin. It is shown by Lomonosov and Sitharam [9, 24], that the problem of finding the optimal DRplan of even a 2D distance constraint graph is NPhard, and approximability results are shown only in special cases. Nonapproximability results are not known. To get around this difficulty, we use the following alternative property. A tractable DRplan for systematic navigation should ensure that each cluster C should be accompanied by a a small set of its children Ci that form an optimal covering set of maximal clusters properly contained in C. A covering set of clusters is one whose union contains all geometric elements within C. The size of the optimal covering set for C is the size of the cluster C, that is, its fanin in the DRplan. For scalability of the ESM method, we restrict ourselves to constraint graphs for which this size is typically constant independent of the original graph size. The ol'i.:h,,i./'l; here refers not only to the size, but also the algebraic complexity of the active constraint system for solving C, given the solutions of its child clusters. This optimization is the function of the combinatorial clustersystem optimizer (CCO) method (Figure 61) described later in this section. Note that in order to choose the optimal covering set of child clusters for a cluster C, the CCO needs as input a generalized complete decomposition of C into maximal proper subclusters, which was already seen to be an essential requirement for the generality of a DRplanner, now seen to be essential for tractability as well. Another crucial property of a DRplan is its width i.e, number of clusters in the DRplan. It is essential that this be small, preferably linear, certainly polynomial, in the size of G: this reflects the complexity of the planning process and also affects the complexity of the solving process that is based on the DRplan. The modulerigid and dofrigid Frontier vertex DRplanners analyzed by Sitharam and Yong and Lomonosov [2, 9, 12, 24], and implemented in FRONTIER [15], are the only ones that have quadratic (typically linear) width and output complete maximal decompositions of each cluster, whose optimal covering sets have typically constant size. For the user to effectively navigate the solution space just by inspecting the solutions to subsystems in the DRplan, it is desirable that these subsystems include those (well or welloverconstrained clusters) that occur in an underlying conceptual decomposition. This is a feature, part or subassembly hierarchy that captures design intent, that is, a partial order, typically also represented as a directed .,, i' 1 graph. This incorporation of such an input decomposition is crucial also in order to allow independent and local manipulation of features, parts, subassemblies or subsystems within their local coordinate systems; for allowing the user to dictate Outer CAD System S____ Front End EqnSoln GUI Adaptor Manager (ESM UTU Navigator ConstEq Combinatorial Proc (CEP ClusterSystem Poc EP Optimizer(CCO). Simple DR Algebraic Solver Planner Solver Figure 61: Standard geometric constraint solver architecture. the order of resolution (and solution space inspection) of the features, parts, subassemblies or subsystems. For example, parametric constraint solving can in fact be achieved as a special case, where the order is a complete, total order. In addition such a solving j ,.: ,.:/; order arises naturally in the case of modulerigid DRplans [12] discussed in Section 6.1. These include clusters whose clusterhood depends on first solving other (nondescendant) clusters in the DRplan. 6.1.2 Combinatorial ClusterSystem Optimizer (CCO) This method is described in detail by Sitharam et al. [14]. Here we give its requirements and output. The CCO method takes its input from the DRplan (Figure 61) one cluster C at a time, along with a complete maximal decomposition into subclusters Ci, and complete information on reducible overconstraints directly associated with each Ci and with C. The CCO method's output consists of: (i) a covering set of clusters among the Ci's that will be used for solving C, (ii) a subset of the cluster overlap constraints for the chosen covering set which together with a wellconstrained set of original constraints, result in a system of algebraic equations (a) that is stable or independent and (b) whose complexity that is, number of variables and degree has been combinatorially minimized; typically this complexity is constant, independent of the size of the constraint graph. Note that the actual algebraic system for solving C is never generated or manipulated by the CCO method. All the output requirements are essential for tractability of solution and thus for the ESM method presented here, and are proven by Sitharam et al. [14], except for the Requirement (ii)(a) which is proven by Sitharam [48]. 6.1.3 Algebraic Solver This could be a purely algebraic or numeric solver. An essential property of the Algebraic Solver (Figure 61) is that it should be reasonably efficient in practice; numerically stable; output all real solutions to the input polynomial system; uses interval arithmetic, that is, can deal with interval values for the coefficients of the polynomials; and can search for solutions within specified intervals for each variable. Desirable properties depend on types of navigation constraints that we permit: incorporating overconstraints during solving to prune solution space; dealing with semialgebraic sets, that is, dealing with polynomial inequalities during solving. The solver [49] satisfies all of these requirements. 6.1.4 Graphical User Interface (GUI) Interaction with the user through the GUI is central to the ESM method, and benefits from a welldesigned GUI. The GUI requirements however are easy to describe: adequate text and menu interaction as well as 2D and 3D canvases to enable the following. The GUI is used to input: the constraint system and a conceptual decomposition or feature hierarchy, (these could have been partially solved and stored from an earlier session), any updates to these, and interactive user input during the constraint parsing and equation building stages and realization space navigation. The GUI is also used to modify the object, constraint and feature repertoire or constrainttoequation parse tree. The GUI is used to output: the DRplan of the input constraint system consistent with the input conceptual decomposition, the system of equations as they are being parsed in stages from the constraints, the , i ,i in solutions corresponding to the nodes of the DRplan, a realization of the partially solved system as the navigation proceeds, and the final realization. A good example is the GUI implemented in FRONTIER [15, 50] and shown in the figures in Section 6.2. 6.2 Navigating the Solution Space This section has two parts. The first describes the overall Equation and Solution iJ.4,,j,r. r (ESM) navigation method and the common, augmented DRplan datastructure used by this method and its companion methods that aids efficiency. The second part describes its integration into a standard constraint solver architecture (Figure 61) specifically, the dataflow, communication with the companion methods that satisfy the requirements given in Section 6.1, and a sketch of its implementation in the FRONTIER constraint solver [15]. 6.2.1 The Basic ESM Method The ESM takes as input the constraint graph, the DRplan output of any DRplanner as in Section 6.1; a stable and combinatorially optimized system of constraints for each cluster in the DRplan that is, the output of any combinatorial clustersystem optimizer as in Section 6.1; and finally navigation constraints, such as redundant or consistent overconstraints and chiralities. It generates an algebraic system of equations and inequalities for each cluster. Then, using its access to any algebraicnumeric solver as in Section 6.1, it offers the user a tractable, interactive visual walkthrough of the solution space by outputting to the GUI and storing in the augmented DRplan datastructure the partial realizations or solutions of the cluster subsystems in an efficient manner. Interactive input to the method includes the user's choice of solutions to the clusters and : 1 "i : navigation constraints added on by the user, using which the .i i method recursively assembles the desired solution of the entire system. met hod provides fully :. i k backtrack ing redoing the user's choices starting from  cluster. Finally, the method can be run ::: vy automatically, without :. user intervention, to output a realization of the entire constraint S including nav~i constraints that are:: :: . Ti.. Solveforest routine can be merged into the Solvecluster routine. It is not necessary, except for clarity, and : dealing with the case where the DRplan has several roots in case the input constraint i was underconstrained. S, rI.st (set S of clusters) [1) At top level of recursion S represents a '::.ilete decomposition of given system into maximal, welloverconstrained subsystems. 2) At lower levels of recursion, S represents an optimal coveri. set output by : ] For each cluster C in S, Solvecluster(C) Return userchosen solution U(C) for each cluster C in S. [efficiently stored in an augmented DRplan datastructure, described below] Solvecluser r (C) [The input is : :'s output for C: 1) at bottom level of recursion, a wellconstrained system involving primitive geometric elements; 2) at ,',I'. :" levels, anoptimal ( : :. set S of solved child clusters Ci, and a stable, independent set of constraints between the Ci's, partitioned into tree overlap constraints and non tree constraints] Solveforest (set S of Ci's) i (C) [Gets from user additional navigation constraints for C. 1) In some iterations, especially the first, 79 ^i, _. ':^ J 1  p" I 1i1& I I A _,. ,1:'. i .*I I PRiIius I Bdllncdllin 1 2 Nexl uiscalion.. J RPSohre I Re Pik Figure 62: Solutions of the cluster formed by the 3 circles (Figure 11). it creates algebraic system Alg(C) for solving C, using the userchosen solution for each Ci and the nontree constraints in the stable set of constraints between the Ci's, output by the CCO. 2) In some later iterations, it prunes any already existing set Sol(C) using the most recently input navigation constraints. 3) It Interacts with user further for massaging this algebraic system to reduce complexity] AlgebraicNumeric Solver(Alg(C)) [Returns solution set Sol(C) for C: rotation of each Ci w.r.t. its parent in the tree of overlap constraints given by CCO for C. The coordinate system of C is the same as the home or root cluster of the tree of cluster overlap constraints output by the CCO: the home cluster's rotation/translation is fixed to be the identity.] Communicate the set Sol(C) visually to user via GUI Until user is satisfied and picks a solution U(C) Return userchosen solution U(C) This visual walkthrough is an interactive process, permitting the usual 3D visual tools such as 1p I zooii zooming, rotation to visualize the various solution possibilities, which cannot be fully illustrated by the figures here. The interested reader is encouraged to download and run the (opensource) software [15] (Figures 62, 63, 65, 66, 67). 80 Enter tre cluster ID of Ite cluster you want Lo resolve ..1. G r, I ' I I .. , I  ,i ' ' "I Figure 6 3: Complete solution of root cluster (Figure 1 1) after choosing subsolutions. 1. Group ID ointrs to the child 2. Cluster Type Pointers to the cdre 3. Navagation constraints 4. Vertices 5. Points to nondescendant clusters 1. Tree of overlap constraints 1. Solutions 2. Nontree overlap and original constraints 2. Solved flag Figure 64: The structure of the cluster. A cluster object represents a DRplanner's simplification [2, 6, 9, 10, 11, 15] of a wellconstrained or a welloverconstrained subgraph, as well as its original subgraph. Figure 64 shows the contents of the cluster. 1. H: ,1,i ,;, field. These cluster objects are hierarchical and contain pointers to their subDRplan, a directed .... i ll graph (DAG), i.e, the DAG interrelationships are stored within each cluster C as a list of its immediate children Ci. 2. Combinatorial descriptive fields. The cluster C contains more descriptive fields, 1) a group ID corresponding to a feature, if any, that corresponds to this cluster C in the input feature hierarchy. Note that not every feature in the input feature hierarchy is a cluster; however, every cluster feature must appear in the output DRplan, if the DRplanner satisfies the desirable feature incorporation property discussed in Section 6.1. 2) Another important descriptive field is the cluster type that indicates whether this cluster is wellconstrained, welloverconstrained (combinatorially), and a list of reducible overconstraints directly associated with C. that is, does not lie within any of the child clusters of C. 3) Another field contains other navigation constraints that are directly associated with C (these are discussed later in this section). 4) Another field is a list of original vertices or geometric primitives that constitute this cluster. 5) In the case of modulerigid DRplanners [12], as mentioned in Section 6.1, some clusters become clusters only after other (nondescendant) clusters have been solved, inducing a solving priority order. Thus a cluster contains pointers to such nondescendant clusters. 3. Fields giving input/output to CCO. The cluster C stores the input to and the output of the CCO companion method, that is, a complete set of maximal rigid clusters within C, of which a subset have been picked by the CCO as the children of C. The cluster structure contains a stable, independent system of cluster overlap and original constraints between the (primitive elements of) children of C. These are partitioned into two parts, 1) a tree of overlap constraints, with a home or root cluster and a set of nontree overlap and original constraints. 2) The original constraints include all nonreducible constraints in C. 4. Fields describing 'il, ib.. :. solution. The cluster object has several fields that store the solved degrees of freedom of the cluster. A list of strings is stored, one for each solution of the cluster returned from the algebraicnumeric solver (given fixed chosen solutions to each of the child clusters). When the user selects a desired solution, that string is parsed into a list of actual degree of freedom values for this cluster. Multiple copies of the list are permitted, one for each parent of the cluster in the DRplan, if they exist. Note that especially when the DRplan incorporates an input feature hierarchy or partial decomposition, the DRplan could be a true DAG with child clusters shared by several parent clusters. The final field is a flag that indicates whether the current Cluster C has been solved or not. A crucial feature of the datastructure that maintains clarity and < : . .,: '". nav igation and backtracking is that each realization of the cluster C is not stored as positions of each geometric element in the cluster this would cost linear time and f fo r each child cluster but rather it is stored as the homogeneous rotation/translations (a constant number of matrix entries) of C's child clusters that resolves the constraints between them. ( i, constraints are the nontree portion of the independent set of constraints output by the CCO cO .. : method and the rotations are associated with the overlap tree output by the CCO companion method, expressing a child cluster C 's rotation with respect to another child cluster Cy of C, namely C)'s parent in the tree of overlap constraints output . the OC' O companion method. Only when the position ~. a primitive geometric element v, in a cluster ( is needed is it actually 1 .. T.: could be needed either by the constraint equation processor (( .' I) of the I : method described next, in order to construct a stable : !. of equations for C's parent in the DRplan, or to prune the solution set of C, or when a ticular realization of C needs to be ( : to the user. T: ... ... of a primitive element v in C is obtained by taking a nested product of rotations. (i) T: "o::: : product is a product taken over ( : of the paths that lead ..... the current cluster to a leaf/sink of the DR .E that corresponds to that geometric element. T:: 7 path is not unique if the geometric element v is shared ".. more than one cluster appearing in the DR .! ... but all these paths provide the same, unique position for the geometric element v: this is ensured by the CCO companion method. (ii) Each : :. : product is associated with a single cluster D along the above path: it is a product of rotation matrices that I D within the coc: :: :.! system of its ent E in the DRplan. Ti: is, it is the product of rotations along the unique *'!. to D from the root or home p10' P11 p15 1 p15 p10 p12 P i3 p14 p p12 p17 M p14 p p17 SPleviois BdIlllai. n 1 i Bdurll: 2.i 2 I IN xl Sel.E BiuIIcalium. r I Rr.Sol I. Re Ri S ih  I R PI. C.anr. Figure 65: N ii;, i iiig by bottomup traversal of G79 in DRplan (Figure 14). p13 p17 p13 p150p5 p8 * 17 pl2 p102 pp16 p1 p14 p16 IPfl Il Pl &v li^s Blicallon 1 '2 r BdlurelIuI2 2 lNtx S erlifireialinr 1i ReS IIv R R R _h'Mv I I RPi.k 11 cancr. Figure 66: N ii;, iiiin by bottomup traversal of G82 in DRplan (Figure 14). cluster in the tree of overlaps for E generated by the CCO companion method (Section 6.1). Thus the entire DRPlan object is simply a pointer to the root node of a list of clusters as they are described above. In case the graph is underconstrained, the root node is a dummy node, whose children are the actual sources of the DRplan, i.e, a complete set of maximal clusters (Section 6.1). The CEP method is a crucial part of the ESM method and has the following functionality: It generates a system of equations and inequalities for solving a cluster C, using (a) the output of the CCO companion method; (b) the userchosen solutions for the child clusters Ci of C; and (c) navigation constraints directly associated with C, including reducible overconstraints which have been isolated by the DRplanner. In order to obtain algebraic systems of low complexity, it helps to permit user interaction during the process of building the system corresponding to Figure 67: Complete solution of constraint system (Figure 14). a cluster. The CEP is additionally editablee" since it permits modifications to the constraint repertoire as well as the constraint parsing mechanism to be input by the user systematically and efficiently instead of having to rewrite the code for the ESM. The CEP's user interaction is effected via the GUI text interface, discussed in the communication and integration section. The CEP has a two stage operation. The first conversion stage converts edges or constraints in the non tree portion of the output of the CCO into algebraic equation strings understandable by the AlgebraicSolver. These equations are between variables describing the positions of the primitive elements in the child clusters Ci of C. The second substitution stage of the CEP expresses the position variables corresponding to a primitive element v in a child cluster Ci in terms of the variable rotation and translation of the cluster Ci within C's coordinate system obtained from the tree portion of cluster overlaps returned by the CCO. The CCO's properties described in Section 6.1 guarantee that the resulting system from the conversion and substitution stages is a stable, independent system of algebraic equations for solving C. Conversion stage of the CEP proceeds in steps, so that at any step, the user can interfere and make substitutions that make the system of equations simpler. The heart of the CEP is a datastructure and lookup system, the constrainttoequation parse tree (C tree), which takes the unique characteristics of each e l 1 or constraint and searches an index of userdefined equations strings for a match. T. CEP organizes those strings into a nary tree representing a natural hierarc  of constraints this conceptual hierarci 1 is also mirrored in the representation of constraints used by ..:. standard constraint solver CUI. use of this tree data structure makes the searching of the constraint list, and conversion of constraint to e :: .1c :both i: : ::H and more interactive. Moreover, this datastructure can be input or moi . . by the user, making it . y editable and extensible, as discussed below. Ti.. CEP tree is organized by ..... ... classes and subclasses. For instance, consider a distance constraint between two points and a I : : constraint between a two circles. 1T. distance has the e.i:: : (xl x2)2 + (yl y2)2 , and the i :: : has the equation (xl ..)2 . :" .)2 (rl r2)2, where :xl, x2, y1, and y2 are either the locations of the points or the centers of the circles, d is the distance between the points, and rl and r2 are the radii (<. the two circles. equations fall into the same .: .1'. class because they are in a sense generated by the same basic template or ,. ... .." In this ( .1 the tangency equation would be a subclass of the distance e : : : since its L ] could be created with the substitution of the d variable in the distance equation with the string (rl i r2). This relatib :: !:: would be represented in the ( : :' tree I two nodes, one node r each .. ... and the tan node r an te tangn node would be a child node of the distance node. To complete the data structure, each node stores (a) a list of edge ob'. which map to an eq nation and (b) either an e.i:: : or a list of substitutions which create the new <1 :11 equation from the parent equation. By storing only the substitution information, the .: .:ess (.' converting the list of constraints to a list of : .ns is highly simplified. When the equation system for a current cluster C is being built one equation at a time, that is, when single constraints are parsed one at a time, the actual variable names c.. :1: in the output :: ; are irrelevant during the conversion stage !.. will be appropriately modified during the substitution stage described below. However, the process of sing a single constraint can be extended to parsing a system of constraints en bloc. T:: requires more care with preserving identical and ,. c variable names that .:.ear in < ... ..: constraints. Generating the corresponding equation set involves traversing several paths of the parse tree in lock i with substitutions being made along the way. Ti. user can interfere at .nr stage and make substitutions to : : : the entire algebraic system. Ti: user interaction proceeds through a simple GUI text interface discussed in the communication and integration section below. Substitution stage of the CiP re, : the .. '. variables corresponding to primitive element v in a child cluster (C which occur in the equation system obtained t. the conversion stage. Ti. variables are expressed in terms (a) the variable rotation and translation of the cluster C, within C's coordinate .et m obtained from the tree portion of cluster c :' I. returned by the CCO. and (b) the already solved, constant position of v within C.'s local coordinate .... Both (a) and (b) require products of rotation matrices, as in the I :' ition of the efficient, augmented DRplan datastructure. In the case of (b), a nested product is required, with the "c : : duct taken over the clusters on : : :'1: in the DRplan from C, to v. In the case of (a), there is only an :: .: .: ..'i::. i of the rotation matrices along the path to i . : the home or root cluster in the tree of ( : constraints for C returned the CCO : : : : method. S m constraints are used not o~"' to prune the search during user directed navigation, but more importantly, to convert the 5 method into a (tractable) automatic search for desired solutions for any cluster of the DRplan. These constraints can either be given apriori or interactively during a userdirected navigation, to prune unwanted realizations of the DRplan's clusters encountered thus far. Leveraging the modularity of the ESM method discussed above that is, its separation from the DRplanner, and its applicability to any input DRplan as in Section 6.1 permits methods developed along with other DRplanners for incorporating navigation constraints to be transferred practically unchanged to the FA DRplanner and the ESM methods discussed above, for example relational and engineering constraints for triangle decomposable systems given by Fudos and Hoffmann [42]. We describe the two other common types of navigation constraints below. One type of constraint used for navigation or picking out desired solutions for any cluster C of the DRplan are simply redundant or overconstraints directly associated with C, that is, connecting primitive elements that lie in different child clusters of C. These are isolated by any DRplanner as in Section 6.1. There is a welldeveloped theory of unique realizations and socalled rigidity circuits obtained, for isolating desired solutions from the solution space using redundant constraints [30]. The other type of common navigation constraints are chirality [4, 41], also called order type or relative orientation constraints. Chirality constraints can be infered from the input sketch. For example, for point objects, these constraints assign signs to the D + 1 by D + 1 determinants of the homogeneous coordinate matrices obtained from each set of D + 1 point objects. I.e, these constraints are D + 1 degree polynomial inequalities. These correspond to a complete oriented matroid specification [51]. Alternatively, a partial oriented matroid specification could be specified by the user: these assert intersection or separation of pairs of convex hulls of subsets of point ob'. ; (called respectively circuits and cocircuits in oriented matroid t,:::': 1 I ). or. 1 .two line segments could be constrained to intersect. or a ...' could be forced to lie in the convex hull of some other set of points. : ... too could be written as pcnomial inequalities. ( i. : .::y constraints, like redundant overconstraints, are also directly associated with a uni( ..:. cluster C in the DP t the smallest cluster that contains all the .:ive elements that in the (:: :T: constraint. Ti : also i: '' that not all of the p; : ': .. '. 've elements i .i in . single *. cluster of C. Ti. navigation constraints associated with a cluster C are processed by the ('Ci using the same Conversion and Substitution stages described above. At the end of these I I the : .. equations and ini : .: :: are not in terms of the primitive elements that they involve. ::: : t1 are in terms of the rotation matrix entries (variables) that place the children C, of C (in the DRplan), within C's coordinate system. Thereafter, during each iteration in which the C('i i is called for cluster C, i': a are dealt with in one <." two .. If the algebraic system associated with the cluster has not yet been solved (in the :. iteration), or the number of solutions is beyond some 0 : .1 :: 'd threshold (in later iterations), and the ':. ebraicSolver is capable of .*.... .. redundant equations and ...1 nomial li: ties, then these processed navigation equations and L : : lIties are tacked on to the stable, independent system for C generated as described above, and sent to the AlgebraicSolver. If not, i.e, if either of these conditions does not hold, these navigation e.i: '. .: aind inequalities are ':.1, used to : .. the solution set for C. that since the navigation e : ': and inequalities have alr been processed the Substitution stage of the C P ', this pruning can be done 1 directly using the solutions output by the ',;ebr .. over, i.e, using the rotation 