thesis - Computer Graphics Group - Charles University - Univerzita ...
thesis - Computer Graphics Group - Charles University - Univerzita ...
thesis - Computer Graphics Group - Charles University - Univerzita ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
6.5. CONTACT 85<br />
where v + ni is the value of vni (relative body velocity along ni at pi) after the collision is resolved,<br />
v− ni is the value before the collision is resolved and ɛi is called the coefficient of restitution. Setting<br />
ɛi = 1 would model a perfectly elastic collision while ɛi = 0 would make the bodies not to bounce<br />
at all, [13].<br />
Since ˙ Ci p is the relative body velocity at contact i, C˙ i<br />
p = vni , the collision law can be implemented<br />
by the velocity-level constraint<br />
C˙ i p = vni = Ji,Ai (ni) · vAi + Ji,Bi (ni) · vBi ≥ −ɛi · v − ni . (6.44)<br />
Note that we have to use a greater-or-equal formulation of the constraint, because there might<br />
be other impulses, say due to other collisions, acting on Bi that should not be cancelled.<br />
Collisions With Impulsive Friction<br />
To model collisions with friction we would like to (in addition to the collision constraint (6.44))<br />
constrain vtx to zero but allow the constraint to break if the magnitude of the impulsive constraint<br />
i<br />
force due to the constraint had to exceed µi · fni , where fni was the magnitude of the impulsive<br />
normal force due to the collision constraint, and do the same for v y<br />
ti .<br />
If f• and f• denote the impulsive quantities analogous to the force quantities f• and f• from<br />
the previous section, then the velocity-level constraints we would like to model are given by<br />
fni ≥ 0 vni ≥ −ɛi · v − ni<br />
fni · vni = 0<br />
vti = 0 ⇒ fti ≤ µi · fni<br />
vti = 0 ⇒ fti = µi · fni ∧ fti · vti ≤ 0. (6.45)<br />
We would like to approximate these equations analogously to the static friction case so that<br />
the static friction’s algorithm could be reused (this time we would relate constraint impulses to<br />
velocities instead of constraint forces to accelerations, though).<br />
By following the derivation of (6.43) we get the formulation of the constraints we are looking<br />
for, in the form of a 3-DOF velocity-level bounded-equality constraint (6.26),<br />
Ji,Ai =<br />
⎛<br />
−n<br />
⎜<br />
⎝<br />
T i<br />
− t<br />
−(rAi × ni) T<br />
x T<br />
i −(rAi × t x i )T<br />
− t y T<br />
i −(rAi × t y<br />
i )T<br />
⎞<br />
⎟<br />
⎠ Ji,Bi =<br />
⎛<br />
n<br />
⎜<br />
⎝<br />
T i<br />
t<br />
(rBi × ni) T<br />
x T<br />
i (rBi × t x i )T<br />
t y T<br />
i (rBi × t y<br />
i )T<br />
⎞<br />
⎟<br />
⎠<br />
ci = (−ɛi · v − ni , 0, 0) (6.46)<br />
lo<br />
λi = (0, −µi · ˆ fni , −µi · ˆ fni )<br />
hi<br />
λi = (+∞, µi · ˆ fni , µi · ˆ fni ),<br />
where ˆ fni is a guess of fni = (λi)1, the first constraint DOF is due to the collision (impact) and<br />
the other two DOFs are due to the impulsive friction along t x i and t y<br />
i directions and are special.<br />
Impulsive friction with other velocity-level constraints is handled analogously to the accelerationlevel<br />
case of static friction with other acceleration-level constraints. All constraints are again<br />
reduced to a LCP, the constraint rows due to the non-special DOFs are solved first, the values<br />
of ˆ fni are obtained and impulsive friction limits are set. Finally, all constraint rows due to the<br />
non-special and special DOFs are solved.