Professional Documents
Culture Documents
CS274: Computer Animation and Simulation: Rigid Body Dynamics
CS274: Computer Animation and Simulation: Rigid Body Dynamics
Lecture VII
e2 R. 2 R.1
e1
e3
R. 3
CS274 Spring 01 Lecture 7 Copyright © Mark Meyer
Angular Velocity
We can represent the cross product with a matrix
0 az ay
a b a b ax
*
0 ax b
a y az 0
Therefore
R(t ) ω (t ) R(t )
*
F2 (t )
F1 (t )
density
inertia tensor
I(t ) (r (t ) r (t ) Id r (t ) r (t ) ) dV
ˆ ˆ ˆ ˆ T
x(t ) v (t )
R (t ) ω* R (t )
d
dt P(t ) F (t )
L(t ) τ (t )
cos( / 2)
q(t )
sin( / 2) axis
x(t ) v (t )
q(t ) 1 ω q(t )
d 2
dt P (t ) F (t )
L(t ) τ (t )
Collision detection –
determining if, when and where a collision occurs
Collision response –
calculating the state (velocity, …) after the collision
x(t2 )
x(t3 )
x(t2 )
x(tc )
x(t3 )
separating plane
First find a separating plane and
see if it is still valid after the next
simulation step
p a p b
A A p a p b A
N N N
B B B p a p b
N (p a (t ) p b (t )) 0 N (p a (t ) p b (t )) 0 N (p a (t ) p b (t )) 0
separating contact colliding
CS274 Spring 01 Lecture 7 Copyright © Mark Meyer
Collision
Soft Body Collision
J F t
J
v or P J
M
CS274 Spring 01 Lecture 7 Copyright © Mark Meyer
Impulse
An impulse also creates an impulsive torque
τ impulse (p(t ) x(t )) J
1
ω I (t ) τimpulse or L τ impulse
B Jb
.̂ .̂ .̂ .̂
d (t ) N
(p (t ) p (t )) N (p (t ) p (t )) 0
a b a b
d(tc ) N (p
a (tc ) p (p (t ) p (t )) 0
b (tc )) 2 N a c b c
post-collision state
compute and apply constraint forces