10.08.2013 Views

thesis - Computer Graphics Group - Charles University - Univerzita ...

thesis - Computer Graphics Group - Charles University - Univerzita ...

thesis - Computer Graphics Group - Charles University - Univerzita ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

60 CHAPTER 6. CONSTRAINED RIGID BODY DYNAMICS<br />

Figure 6.1: Illustration of index sets, complementarity conditions and pivoting. Thick lines<br />

correspond to index sets — constraint i belongs to an index set if point (λi, ai) lies on the thick<br />

line associated with the set. Circles indicate “singular points”.<br />

0<br />

ai<br />

✻<br />

i ∈ NH<br />

✎☞i<br />

∈ C<br />

✍✌<br />

✻<br />

✎☞<br />

✍✌<br />

λlo i 0 λhi i<br />

✲<br />

i ∈ NL<br />

✲ λi<br />

The algorithm starts with letting λ = 0 (hence a = b) and then takes c iterations to update<br />

λ. At the i-th iteration it computes λi so that (6.18) would hold for constraint i and in doing so<br />

it adjusts λj, 1 ≤ j < i so that the conditions for constraints j, that were processed at previous<br />

iterations, would remain obeyed (constraints j, j > i are ignored at the i-th iteration). When all<br />

c constraints are processed, all conditions are obeyed and λ contains the value we were solving<br />

for.<br />

Index Sets<br />

Index sets NH, NL, C are defined as a mutually disjoint subsets of constrained indices {1, . . . , i},<br />

where i is the number of the current iteration, that characterize what conditions of (6.18) are<br />

currently obeyed by constraints j ≤ i. We will say that the constraint (index) j is<br />

• clamped and belongs to a set C if λ lo<br />

j < λj < λ hi<br />

j ∧ aj = 0.<br />

• non-clamped hi and belongs to a set NH if λj = λ lo<br />

j ∧ aj > 0.<br />

• non-clamped lo and belongs to a set NL if λj = λ hi<br />

j ∧ aj < 0.<br />

• non-clamped and belongs to a set NC = NH ∪ NL if either j ∈ NH or j ∈ NL.<br />

Whenever updating λi, a changes as well and it must be ensured that each j, j < i remains in<br />

one of the index sets so that (6.18) would not be violated for j < i — j either remains in its<br />

current index set or transfers from an index set to another “adjacent” set (this is called pivoting).<br />

Cases where λj = λ lo<br />

j ∧ aj = 0 or λj = λ hi<br />

j ∧ aj = 0 are “singular” and indicate that j<br />

should be transferred to a neighboring index set (see (6.1)). For example if j ∈ C and λj reaches<br />

λlo j , j is transferred to NH5 . Constraint j can not be in NH (NL) if λ lo<br />

j = −∞ (λ hi<br />

j = +∞).<br />

Constraint j can not be in C if λlo j = λhi j = 0, such a constraint can be ignored.<br />

Index sets and the pivoting process is illustrated by diagram (6.1) specific to a constraint i.<br />

Point (λi, ai) in the diagram is restricted to lie on one of the three disjoint lines that correspond<br />

to index sets NH, C, NL and the pivoting corresponds to transfers of (λi, ai) from one line to the<br />

other neighboring line when a “singular point” is reached.<br />

5 Due to the definition of NH, ai must also be tweaked so that ai > 0.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!