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.

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

either fail to compute a valid max step (either max step ≤ ɛ or max step = +∞ — no conditions<br />

on scale could be applied at the given context) or it might get stuck in an infinite loop transferring<br />

a certain index j between two index sets and not making any further progress. To correct this,<br />

extra checks that validate max step and index transfers must be incorporated into the algorithm.<br />

Finally, precision correction should be implemented. The purpose of the correction is to<br />

clamp (λj, aj) so that if j should belong to an index set S then the point (λj, aj) will really lie on<br />

the corresponding line in the diagram, avoiding the “singular points”. For example if j transfers<br />

from C to NH it must be ensured that aj > 0 after the transfer and aj thus needs be tweaked<br />

so that aj ≥ ɛ, where ɛ is a small positive constant.<br />

The algorithm can be easily adapted to handle k unbounded equalities and c−k bounded equalities, exploiting<br />

the special properties of the unbounded equalities. If constraints are indexed so that the first k constraints<br />

correspond to the unbounded equalities, we can let C = {1, . . . , k}, aC = 0, λC = −A −1<br />

CC · bC and start off with<br />

the (k + 1)-th iteration directly.<br />

Also note that we have to compute ∆λC at each iteration step, which involves the evaluation of A −1<br />

CC (say, by<br />

a factorization of ACC). At the end of the step either i is assigned to NH, C, NL or an index j < i transfers from<br />

an index set to another set (NH → C, C → NH, C → NL, NL → C) — j is either added to or removed from C.<br />

Incorporating clever factorization techniques, the factorization of ACC at the current iteration step can actually<br />

be computed from the factorization of AC ′ C ′ from the previous step (C′ is the index set C from the previous step),<br />

thus improving the solver performance, [22].<br />

6.3 Velocity-Level Constraints<br />

In this section we will introduce a concept of impulses that allow to handle velocity-level constraints<br />

directly, including constraints with non-constant right-hand sides, without the need for<br />

going to the acceleration-level. We will use the notation from previous sections and base our<br />

discussion upon the work of [10] and [13].<br />

6.3.1 Impulses<br />

Let us return to the motivational example from section (6.2.2). We had an 1-DOF inequality<br />

position-level constraint i defined as Cp(r(t)) ≥ 0. We assumed that Cp(r(t)) = 0 and ˙ Cp(r(t)) =<br />

0 at the current time t and could enforce the original position-level constraint by maintaining the<br />

corresponding ¨ Cp(r(t)) ≥ 0 acceleration-level constraint.<br />

Now let us assume that Cp(r(t)) ˙ < 0. In this case the rigid bodies no longer rest at the<br />

boundary of the valid set of body positions in the position product space, but the boundary is<br />

approached with a non-zero relative velocity. Corresponding ˙ Cp(r(t)) ≥ 0 velocity-level constraint<br />

is violated at the current time t and the original (position-level) constraint can not be implemented<br />

on the acceleration level by maintaining ¨ Cp(r(t)) ≥ 0 (no matter how strong the constraint force<br />

is, it will require a non-zero time amount to bring ˙ Cp(r(t)) (and later on also Cp(r(t))) to a<br />

positive value) — unless the body velocities are changed directly, the original constraint will be<br />

violated at the next time step.<br />

For example if we (again) interpreted the position-level constraint as a non-penetration constraint<br />

between a ball and a brick wall then Cp(r(t)) = 0 and ˙ Cp(r(t)) < 0 would indicate that<br />

the ball had struck the wall and the ball velocity would have to be changed abruptly at time<br />

t in order to prevent penetration at the next time step. In reality, however, the time duration<br />

of the collision is not zero, bodies involved in the collision deform and restoration forces with

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

Saved successfully!

Ooh no, something went wrong!