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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6.2. ACCELERATION-LEVEL CONSTRAINTS 61<br />

Iteration<br />

The algorithm loops over i, at iteration i it computes λi and ai while maintaining the complementarity<br />

conditions on λj and aj for j < i. Indices j > i are ignored at the i-th iteration. Let<br />

us look at the i-th iteration more closely.<br />

When the i-th iteration is started, λi = 0 and ai = Ai,C∪NC · λC∪NC + bi. If (λi, ai) already<br />

lies on a line of the complementarity diagram due to constraint i then (6.18) already holds for<br />

i, index i is assigned to the corresponding index set and the algorithm can proceed to the next<br />

iteration. Let us assume that (λi, ai) is not on a line.<br />

Our goal is to “drive” i to NH, C or NL. We will do so in multiple steps. At each step we<br />

compute a vector ∆ λ, the adjustments to λ, that will make (λi, ai) “move towards” a line in the<br />

diagram. This will be looped until (λi, ai) ends up on a line. Index i will be then assigned to the<br />

corresponding index set and the iteration will finish.<br />

To ensure that conditions for constraints j < i are not violated while taking a step during<br />

iteration i, we will require that clamped indices remain clamped and non-clamped indices remain<br />

non-clamped or a “singular point” is reached. If (λj, aj) reaches a “singular point”, j is transferred<br />

to the neighboring index set. We will now derive what ∆ λ should look like.<br />

• Since we are not interested in constraints j > i at the i-th iteration, ∆ λj>i = 0.<br />

• If ai > 0 we would like to decrease λi so that i would eventually reach NH, hence ∆λi<br />

should be a negative non-zero value. If ai < 0 we would like to increase λi so that i would<br />

eventually reach NL, hence ∆λi should be a positive non-zero value.<br />

However we do not know what the exact value of ∆λi should be. To tackle this problem<br />

we will write λdir = ∆λi = ∓1 (a λ “direction”) with a note that we will actually add<br />

∆ λ · scale to λ and scale > 0 (a scaling factor) will be determined later.<br />

• If ∆ λ · scale was added to λ, a = A · λ + b would change by ∆a · scale = A · ∆ λ · scale.<br />

From the requirement that clamped indices remain clamped or reach “singular points” and<br />

are transferred to NH or NL we get a condition ∆aC = 0 and from the requirement that<br />

non-clamped indices remain non-clamped or reach “singular points” and are transferred<br />

to C we get ∆ λNC = 0. Putting these two requirements together we get that ∆ λC =<br />

−A −1<br />

CC · AC,i · ∆λi.<br />

This is easy to show. Since we work with matrix slices we can assume (without loss of<br />

generality) that C = {1, . . . , k} and NC = {k + 1, . . . , i − 1}. Constraints j > i are ignored<br />

at this iteration and to simplify writing we can assume that this is the last iteration. Then,<br />

utilizing the requirement ∆λNC = 0, ∆λi = λdir and letting ∆λC = x,<br />

⎛<br />

A = ⎝<br />

ACC AC,NC AC,i<br />

⎞<br />

⎠ ∆ ⎛<br />

λ = ⎝<br />

x<br />

0<br />

⎞<br />

⎠<br />

ANC,C ANC,NC ANC,i<br />

Ai,C Ai,NC Aii<br />

⎛<br />

λdir<br />

⎞<br />

∆a = A · ∆ ACC · x + AC,i · λdir<br />

λ = ⎝ ANC,C · x + ANC,i · λdir<br />

⎠<br />

Ai,C · x + Aii · λdir<br />

and since it is required that ∆aC = 0 we get that x = ∆λC = −A −1<br />

CC · AC,i · λdir.<br />

We thus have<br />

∆ λC = −A −1<br />

CC · AC,i · λdir, ∆ λNC = 0, ∆ λi = λdir, ∆ λj>i = 0 (6.19)

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

Saved successfully!

Ooh no, something went wrong!