HAL Id: hal-00691690
https://hal.archives-ouvertes.fr/hal-00691690
Submitted on 26 Apr 2012
HAL
is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or
L’archive ouverte pluridisciplinaire
HAL, estdestinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires
Extensions of the witness method to characterize under-, over- and well-constrained geometric constraint systems
Simon Thierry, Pascal Schreck, Dominique Michelucci, Christoph Fünfzig, Jean-David Génevaux
To cite this version:
Simon Thierry, Pascal Schreck, Dominique Michelucci, Christoph Fünfzig, Jean-David Génevaux. Ex- tensions of the witness method to characterize under-, over- and well-constrained geometric constraint systems. Computer-Aided Design, Elsevier, 2011, 43 (10), pp.1234-1249. �10.1016/j.cad.2011.06.018�.
�hal-00691690�
over- and well-onstrained geometri onstraint systems
SimonE.B.Thierry a,∗
,PasalShrek a
,DominiqueMihelui b
,Christoph
Fünfzig b
, Jean-DavidGénevaux a
a
LSIIT,UMRCNRS7005
UniversitédeStrasbourg
b
LE21,UMRCNRS5158
UniversitédeBourgogne
Abstrat
Thispaperdesribesnewwaystotakleseveralimportantproblemsenountered
in geometri onstraint solving, in the ontext of CAD, and whih are linked
tothehandlingofunder- andover-onstrainedsystems. Itpresentsapowerful
deompositionalgorithmofsuhsystems.
Our methods are based on the witness priniple whose theoretial bak-
ground is realled in a rst step. A method to generate a witness is then
explained. Weshowthathavingawitnessanbeusedtoinrementallydetet
over-onstrainednessandthustoomputeawell-onstrainedboundarysystem.
An algorithmis introduedto hekifanhoringagiven subsetof theoordi-
natesbringsthenumberofsolutionsto anitenumber.
An algorithm to eiently identifyall maximalwell-onstrainedparts of a
geometri onstraint systemis desribed. This allows us to designa powerful
algorithmof deomposition,alled W-deomposition,whihis ableto identify allwell-onstrainedsubsystems: itmanagesto deompose systemswhih were
notdeomposablebylassiombinatorialmethods.
Keywords: GeometriConstraintsSolving,Witnessonguration,Jaobian
matrix,W-deomposition,Under-onstrainedness,Over-onstrainedness, Well-onstrainedness,Transformationgroups
1. Introdution
Geometri onstraint solving in Computer-Aided Design (CAD) aims at
yieldingagurewhihmeetssomeinideneandmetrirequirements(e.g.dis-
tanes between points or angles between lines), usually speied in graphial
∗
Correspondeneshouldbeaddressedtothisauthor
Emailaddresses: simon.thierryunistra.f r (SimonE.B.Thierry),
shrekunistra.fr(PasalShrek),dmihelu-bourgogne.fr(DominiqueMihelui),
.fuenfziggmx.de(ChristophFünfzig),jean-david.genevauxetu.u nis tra. fr
(Jean-DavidGénevaux)
(C, X, A) with C a set of onstraints (prediates) on a set X of unknowns
(geometrielements)withrespettoasetAofparameters(metrivalues). So-
lutionsarereturned astheoordinatesof thegeometrielements,i.e. aset of
funtionsf :X →Ri inidimensions. Formoreformaldenitionsofgeometri onstraintsystems,thereadermayreferto[29℄.
Example : Geometri onstraintsystem
Figure1showsalassialexampleofageometrionstraintsystem. We
give a formal statement of the system and a sketh as the user would
draw it. Therightof thegure showsa possiblesolution. Many other
solutionsexist:
• ifasymmetryisappliedonasolution,ityieldsanothersolution;
• ifarotationand/oratranslationisapplied onasolution, ityields anothersolution;
• ifasymmetryisapplied forinstane onpointp3,withaxisp2p4,it
yieldsanothersolution.
dist(p1, p2, k1),ang_ppp(p6, p1, p2, θ1), dist(p2, p3, k2),ang_ppp(p2, p3, p4, θ2), dist(p3, p4, k3),ang_ppp(p4, p5, p6, θ3), dist(p4, p5, k4),dist(p5, p6, k5), dist(p1, p6, k6),withk1= 7,k2= 5, k3= 9,k4= 8,k5= 6,k6= 7,θ1= 135, θ2= 120,θ3= 115
PSfragreplaements
p1
p1 p2
p2 p3
p3
p4
p4
p5
p5
p6
p6
7
5
9
8 6
7 135
◦
120
◦
115
◦
Figure1: Formalstatement(left)ofa2Dtehnialsketh(middle)and apossiblesolution
(right).
Theliteraturedesribesanumberofdierentapproahestosolvegeometri
onstraintsystems:
• algebraimethods onsistin translatingthe GCSinto aset ofequations andworkingontheequationsystem,thusforgettingthegeometrialbak-
ground. Algebraimethods anbe lassiedin numerialmethods (iter-
ative omputations onverging to an approximate solution from initial
valuesgivenbytheuser,suhastheNewton-Raphsonortheontinuation
method[27℄)andsymbolimethods(diretomputationsontheequations
those methodsareseldomusedbeauseoftheirtimeomplexity[1℄),
• geometrimethodsusethegeometriknowledgetosolvethesystem: rule-
based methods [2, 19℄ dedue onstrution plans by an expliit use of
geometri rules,graph-based methods[7, 10,27, 33, 34,38℄ ompilethis
knowledgeintoalgorithmswhihonsideronlyombinatorialandonne-
tivityriteria,
• hybridmethods[5,9,20℄alternatealgebraiandgeometriphasesofom-
putationstousethepowerofbothapproahes.
For moredetails ongeometrionstraintsolvers,see[13℄. Ageneraltrend,
both to redue omplexity and to enhane resolution power, onsists in de-
omposing the GCS into solvable subsystems and in assembling their solu-
tions[5,10,14,17,27,33,34,38,42℄.
Example : Deomposition ofgeometri onstraintsystems
Itisimpossibletodrawdiretlyasolutionofthe2DexampleofFigure1
withonlyarulerandaompass. Butitiseasytoseparatelysolveeah
triangle(p1p2p6,p2p3p4andp4p5p6)andthenassemblethem. Byusing
deomposition,theresolutionpoweristhusgreater.
Notiethat,ontheexampleofFigure1,ifoneremovesoneofthetrian-
gles,sayp2p3p4,andthentries tosolvetheremainingsystem,oneneeds
toaddinformationfromthesolvedsubsystem,i.e. adistaneonstraint
betweenp2andp4,otherwisetheremainingsystembeomesartiulated.
For a detailed survey of deomposition methods, see [18℄. The piee of
informationadded when removing asubsystem is alled aboundary[29℄. Al-
thoughseveralmethodsexisttondtherelevantinformationinspeiresolu-
tionframeworks[33℄,nogeneralalgorithmyetexiststo omputetheboundary
withoutaddingtoomuhinformation.
Indeed, it is important for resolution methods, espeially for graph-based
methods, that the system does not have too few or too many onstraints.
Looselyspeaking, asystemisalled
• under-onstrainedifit hasan innitenumberof solutionsbeausethere arenotenoughonstraintstopindowneverygeometrielement,
• over-onstrainedifithasnosolutionbeauseofonstraintontraditions 1
,
• well-onstrainedifithasanitepositivenumberofsolutions.
Invarianeofrigidsystemsbydiret isometriesisgenerallytakeninto aount
byanhoringapoint andadiretion in 2D, apointand twodiretions in 3D.
Thepointand thediretion arealledareferene forthediretisometriesand
onstitutewhatweallananhor ofthesystem. Othertransformationgroups
may be onsidered[37, 42℄: wesaythat asystemis G-well-onstrainedif itis well-onstrainedmodulo G[29℄.
1
Notiethatthedenitionsofthelevelsofonstrainednessaregeneralanddonottakeinto
aountthe generiityhypothesis, furtherdisussedinsetion2. Thus,thereexistsystems
whiharesaidtobeonsistentlyover-onstrained,whentheyaregeneriallyover-onstrained
butthevaluesoftheparametersaresuhthattherearesolutions.
ThesystemofFigure1isrigid,orwell-onstrainedmodulodiretisome-
tries. Thesystemof Figure2a iswell-onstrained modulo diret isome-
tries, but ontains a subsystem, shown at Figure 2b, whih is well-
onstrained modulo similarities [37℄: one an yield a nite number of
solutionsfrom whihanysolutionanbegenerated byapplying asal-
ing,arotationand/oratranslation.
The systemof Figure2 is under-onstrainedmodulo any groupating
globally on the system: if one anhors points p1 and p2, for instane,
pointsp3andp4maystillmovewithoutviolatingonstraints.
PSfragreplaements
p1 p2
p3 p4
Figure2: Arigidsystem(left);asubsystemwell-onstrainedmodulo similarities(middle);
anartiulatedsystem(right)
Alotofworkhasbeendoneaboutthedetetionofover-onstrainedness[15,
17,32℄orunder-onstrainedness[21,41,46℄andmoregenerallyaboutthehar-
aterizationofrigidity[22,24,37,44℄. Yet,methodsdesribedintheliterature
may fail to onsider the onsequenes of mathematial theorems that are not
expliitly taken into aount in the onstrution of the resolution algorithm.
Sinea theoremlist annot beexhaustive 2
, it is impossibleto developarule-
basedorgraph-basedalgorithmwhih detetsallgeometripropertiesindued
bymathematialtheorems.
Inthisartile,weextendthewitnessmethod[30℄toaddressseveralproblems
itedabove: howtodeterminetheonstrainednesslevelofaGCSwithoutbeing
trikedby mathematialtheorems(seefor instaneFigure 11);howtobuild a
well-onstrainedboundarysystem;howtohekifapotentialanhordoesnot
make the systemover-onstrained; how to eiently detet all maximal well-
onstrainedsubsystems of agiven GCS;howto deompose awell-onstrained
systemintotheset ofallitsminimalwell-onstrainedsubsystems.
For onisenessreasons,in the rest ofthis paper,weonsider 2D systems,
unless expliitlymentioned otherwise. Yet,all algorithms anbe extended to
3Dsystemswithnearlynohanges.
This artile is organizedas follows: Setion 2 realls the priniples of the
witnessmethod andgivesawaytogenerateawitness;Setion 3introduesan
2
Morepreisely,thesetoftheoremsisreursivelyenumerable,butnotreursiveingeneral.
thatitleadstoaorretgreedyalgorithmtoomputeawell-onstrainedbound-
arysystem;Setion4showshowto deideifapotentialanhorisvalidornot;
Setion 5givesalgorithms to eientlyidentify themaximal well-onstrained
subsystemsofanartiulatedsystem(alsoalledexible system);Setion 6de-
duesfromthesealgorithmsamethodtofurtherdeomposearigidsysteminto
well-onstrained subsystems; Setion 7 disusses the robustness issues of our
algorithms;nally,Setion8onludesandgivesperspetivestothiswork.
2. The witnessmethod
2.1. Priniple
The notion of witness appears in dierent domains suh as the study of
polynomial systems through the priniple of algebrai probability one [39℄,
probabilistiproofsin geometry[6℄ortheRigidityTheory[11℄.
The ideaonsists in studying generi properties of a ontinuous olletion
ofobjetsthroughthestudy ofasingleoneof these objets: awitness. Sine
therigidityisanimportantpartofouronern,wereallherethebasisofthe
rigiditytheoryasdesribedin [11℄.
2.1.1. Frameworks andrigidity
The question of rigidity is studied through the notion of frameworks. A
framework is a triple (V, E, p) where (V, E) is a graph and p : V → Rd a
realizationofthegraph,whihmapsthevertiesofV topointsofdimensiond.
Thinkingofgraphedgesas rigidbarsandofvertiesasartiulationpoints,the
maingoalofombinatorialrigidityistoanswerIs(V, E, p)rigid?,i.e. arerigid
bodymotionsallowedonlyonthewholeframework,withnoloaldeformation.
An innitesimal exion isthen amapq:V →Rd suh that (p(i)−p(j))· (q(i)−q(j)) = 0,foreah(i, j)∈E. Aframeworkisalledinnitesimallyrigid, iftheonlyinnitesimalexionsarisefrom thediretisometries ofRd,i.e. the
translationsandrotations. It is proventhat innitesimalrigidity isastronger
propertythan rigidity: a framework anberigidbut not innitesimallyrigid,
famousexamplesaregiveninFigure3(see[11℄). Counter-examplesofrigidbut
notinnitesimallyrigidframeworksarisewhentheframeworkissingular.
Figure3:Non-innitesimallyrigidframeworks. Theframeworkontheleftisrigid.
A frameworkF = (V, E, p)is said generi if there is aneighborhood of F
whereallframeworkswithgraph(V, E)arerigidifF is,andnotrigidotherwise.
theoryarestatedbythefollowingproposition:
Proposition 1. Consider agraph (V, E). If there is arealization psuh that
theframework(V, E, p)isgeneriallyrigid,thentheframeworks (V, E, q)where q is another realization of the graph, is rigid for almost any q. On the other
hand, if twoframeworks (V, E, p)and (V, E, q)are generi, thenthey are both
rigidorboth notrigid.
Thisproposition justiesthefatthatin 2D,theLamantheorem[24℄gives
aombinatorialharaterizationofrigidity. Alas, suhaharaterizationisan
openproblemindimension3orhigher.
From the geometri onstraintpoint of view, a framework in rigiditythe-
ory orresponds to the realization of ageometri onstraint system where all
onstraintsarepoint-to-pointdistaneonstraints: suhasystemisgenerially
well-onstrainedupto diretisometriesifit isgeneriallyrigid. This wasgen-
eralized by Mihelui et al. [30, 31℄ to metri onstraints over points, lines,
et.(distanesandangles)andtoinideneonstraints(olinearitiesin2Dand
3D,oplanaritiesin3D).
2.1.2. ExtensiontoCAD
Intheprevioussetion,wehaverealledthebasisofrigiditytheoryandthe
priniplesofwitnessinterrogationinthisontext. Intherestofthisartile,we
donothavethepoint of viewof rigidity theory andof frameworks, but fous
ongeometrionstraintsystem.
As stated above, geometri onstraint systems in CAD naturally lead to
onstraint graphs, or more generally to hypergraphs. It is then tempting to
extrapolate results of the rigidity theory, suh as Laman's theorem, into the
eld of onstraintsolving. In ourase, theonstraintsare put in agraphial
formonthesketh (seeFigure 1)whihisarealizationoftheonstraintgraph
thesamewayasinRigidityTheory. Undersomegeneriityassumptions,itisa
perfet andidatetobeawitnessfortheonstrainednessproperties.
Indeedwhen thedesigner drawsasketh, he/she hasasolutionXw foran
equation system F(X, Aw) = 0, with someparameter values Aw read on the
sketh. ThenthegoalisasolutionforthesystemF(X, Aa) = 0,where Aa are
thevaluesgivenforthedimensioning. Thisfat hasbeenusedwithin theon-
tinuationmethod with homotopy in CAD [3, 25℄ orto dene aneighborhood
relationship between gures [4℄. In fat, our purpose is lose to these prob-
lematis sine we laim that the sketh is like the searhed solution from the
onstrainednesspointofview.
IntheCADdomain,allthegeometrionstraintsanbeputundertheform
ofpolynomialequations,andF isaC∞lassfuntion. Weanthenonsidera
TaylorexpansionofsystemF(X, Aw) = 0,andget:
F(Xw+ε−→V , Aw) =F(Xw, Aw) +εF′(Xw, Aw)−→V +O(ε2)
where
−
→V an also be seen as the instant veloity of eah objet involved in
thesystemand εis asmall timestep. Then, ε−→V is aninnitesimalexion,or motion, if it leads from a solution to another solution of the system. Or, in
other words, the O(ε2) term in the previous formula beomes in fat a o(ε2)
term. Underthese onditions,wemusthave
F′(Xw, Aw)−→V = 0 (1)
The spae of the innitesimal motions allowed by the onstraints at the
witnessisthengivenbyker(F′(Xw, Aw)). Notethat
• thematrix F′(Xw, Aw) isknownas theJaobianmatrixof the funtion F(X, Aw)takenatpointXw;
• when allonstraintsarepoint-to-pointdistanes, the Jaobianmatrixis therigiditymatrixonsideredinRigidityTheory;
• for other onstraintswith parametersthe generiity onditionsare alike
thoseintheombinatorialase: aparametervalueAwandaorresponding solutionXwaregeneriiftherootisanimpliitfuntionoftheparameters
insomeopenneighborhoodof(Xw, Aw);forinstane,foratrianglespe-
ied withthreelengthparameters,thisonditionforbidsthat onelength
is the sum of the others; moregenerally this ondition implies that the
matrix
∂F(X, A)/∂X ∂F(X, A)/∂A
0 Id
has thesamerank in an openneighborhood of (Xw, Aw). When all the
equationsarepolynomials,beauseofthealgebraiprobabilityoneprini-
ple,thegeneriparametervaluesaredenseinthesetofparametervalues
orrespondingtoarealization.
Example : Generi formulationof onstraints
Forpoint,line,planeinidenes,weassumethattheorrespondingon-
straintsarespeiedexpliitlywithoutparameters. Thisisto avoidex-
pressingpoint-pointinidenesbyadistaneonstraint(p1,x−p2,x)2+ (p1,y−p2,y)2 =d2 with distane parameterd= 0. For adistane on-
straint (p1,x−p2,x)2+ (p1,y−p2,y)2 =d2, theparameter d= 0 is not
generi, as the onstraint is singular at the solution point. Foran an-
gle onstraint angle(p1, p2, p3) = θ, i.e. −−→p2p1 · −−→p2p3 = lp1p2lp3p2cosθ,
the parameter values θ = ±π, θ = ±π/2, and θ = 0 are not generi.
Similarly,point-line,line-planeinidenesandline-line,plane-planepar-
allelism/orthogonalityonstraintsarenotexpressedbyangleonstraints
beauseitwouldintroduenon-generiangles.
Typiality. A witnessistypial ifit isrepresentativeforthe searhedsolu-
tion,i.e. ithas thesameombinatorialproperties(oinidenes, olinearities,
oplanarities,et.). [4℄assumethattheskethisawitness,andthatthesketh
(Xw, Aw), {(X, A) : F(X, A) = 0} withthe speied ombinatorial properties istypialwith probability1 foraset ofwitnesssolutions. Notethat [18℄built
an(artiial)ounter-example,i.e. asystemwithtwolassesofsolutions(thus
withtwokindsofwitnesses)whiharedierentinombinatorialproperties,and
noontinuousdeformationexiststotransformoneintotheother. Insuhases,
awitnessisrepresentativeofonlyonelass(itslass)ofsolutions. Thisexample
istheoneofFigure4. Suhartiialsystemsareignoredinthisartile.
PSfragreplaements
A
A
B B
C C
D D
PSfragreplaements
p1
p2 p3
6
4 3
50
Figure4: Ambiguous system: ifpoints arerequired to be
distint,thenitisrigid(leftase);otherwise,whenAandC
havethesameoordinates,pointDanbeanywhereonthe
dottedirle(exampletakenfrom[18,Figure14℄).
Figure5: A2Dsketh ofa
rigidtriangle.
We an then study the degrees of freedom of the system by studying the
rankof the JaobianmatrixF′(Xw, Aw)on a typialwitness Xw, and in the
aseofunder-onstrainedness,thestrutureoftheallowedinnitesimalmotions
anbededued fromthestudyofthekernelofF′(Xw, Aw).
In the rest of this paper, we onsider that rows of the Jaobian matrix
representonstraintsandolumnsrepresentvaluesoftheunknowns(oordinates
ofthegeometrielements). Welassiallydenotebymthenumberofrowsand
bynthenumberofolumns ofthematrix.
2.2. Pratial example
Let us now detail a step-by-step onstrution of a witness and its use to
haraterizethe degreesof freedom of the orresponding geometri onstraint
system. WeonsiderthetrivialgeometrionstraintsystemofFigure5.
ThisGCSonsistsofthreesets:
• unknowns: X={p1, p2, p3};
• parameters: A={k1, k2, α};
• onstraints: C={dist(p1, p2, k1),dist(p2, p3, k2),ang_ppp(p1, p2, p3, α)}
Thedimensioninggivenbytheskethisafuntion ρ:A→R,withρ(k1) = 6, ρ(k2) = 4, ρ(α) = 50. If onewere to onsiderthe bottom left ornerof the
skethastheoriginandgiveoordinatestothepointsonthesketh,theywould
notsatisfytheonstraintswiththisdimensioning.