Unblocking The Main Thread Solving ANRs and Frozen Frames
Physically Based Simulation - Constrained Dynamics & Contact Force Computation
1. KGDC 2003 1 Physically Based Simulation
Physically Based Simulation
Constrained Dynamics & Contact Force Computation
이웅수
peras@rigorware.com
Rigorware Corp.
2. KGDC 2003 2 Physically Based Simulation
The Elements of Simulator
Broad Phase Collision Detection
Narrow Phase Collision Detection
Contact Determination
Contact Analysis
Collision Solver
Time Control
Motion Solver
Constraint Solver
Mass Property Analysis
3. KGDC 2003 3 Physically Based Simulation
What Are Constraints?
Inequality(≥) ConstraintEquality(=) Constraint
4. KGDC 2003 4 Physically Based Simulation
General Constraints
Prismatic Joint
5. KGDC 2003 5 Physically Based Simulation
General Constraints
Spherical Joint
6. KGDC 2003 6 Physically Based Simulation
General Constraints
Revolute Joint
7. KGDC 2003 7 Physically Based Simulation
Contact
8. KGDC 2003 8 Physically Based Simulation
Dynamic States
T = IαF = ma힘 / 회전력Force / Torque
αa가속도 / 각가속도acceleration
L = IwP = mv운동량 / 각운동량momentum
wv속도 / 각속도velocity
Im질량 / 관성텐서mass / Inertia Tensor
AngularLinear술어Terminology
9. KGDC 2003 9 Physically Based Simulation
A Single Geometrically Constrained Particle
[ ]
1. Implicit
( ) 0
2. Parametric
cos ,sin
0 legal position
0 legal velocity
0 legal acceleration
C r
r
C
C
C
θ θ
= − =
=
=
=
=
q q
q
10. KGDC 2003 10 Physically Based Simulation
Point On Circle
1
( ) ( 1) 0
2
0 ( )
0
( : Constraint Force)
0,
C
C
C
C
m
C m
m
∧
∧
∧
∧
= − =
∂
= = =
∂
= + =
+
=
+
= + = = − −
q q q
q q q
q
q q q q
f f
q f
f f
q q q f q f q q q
11. KGDC 2003 11 Physically Based Simulation
The Principle of Virtual Work
Translational Kinetic Energy
,
2
0, | 0
m
T T m
m
λ
λ
∧
∧
∧
= = = +
= ∀ =
=
− −
=
q q q q f q f q
f q q q q
f q
f q q q
q q
12. KGDC 2003 12 Physically Based Simulation
Drift and Feedback
Spring & Damping
s dC k C k C= − −
13. KGDC 2003 13 Physically Based Simulation
Avoiding Penetrations
The normal distance function
14. KGDC 2003 14 Physically Based Simulation
The Contact Force
Total contact force = Normal force + Friction force
The normal force
The normal force is repulsive
16. KGDC 2003 16 Physically Based Simulation
LCP
The complementary condition
17. KGDC 2003 17 Physically Based Simulation
The Notation
18. KGDC 2003 18 Physically Based Simulation
The Linear Dependence
The contact point position
The contact point velocity
The contact point acceleration
19. KGDC 2003 19 Physically Based Simulation
The Linear Dependence
The angular momentum
The angular velocity
The angular acceleration
20. KGDC 2003 20 Physically Based Simulation
The Linear Dependence
21. KGDC 2003 21 Physically Based Simulation
The Linear Dependence
22. KGDC 2003 22 Physically Based Simulation
The Linear Dependence
23. KGDC 2003 23 Physically Based Simulation
The Linear Dependence
and
24. KGDC 2003 24 Physically Based Simulation
Appendix – Euler Angles
Euler angles are Non-commutative
25. KGDC 2003 25 Physically Based Simulation
Appendix
Vertex, Edge, Face 6 cases