Medial Aixs Level CCD
Since we are simulating rigid bodies(no deformation), we decide to use MAT instead of triangular mesh to perform CCD.
traditional triangle-level CCD
Finding the first TOI(time of impact) to prevent penetration & tunneling issues.
There are total 2 types of collision involved(elementary test): 1. Vertex-Face 2. Edge-Edge
So, the continuous triangle
We assume the velocities are constant in a time interval
Vertex-Face Collision
Point:
Thus,
If there is collision, then
Equation 1 just shows that in the collision time
It is important to note that this equation is not sufficient to verify the collision since it is true if
Edge-edge Collision
The ideas in Vertex-face Collision can be used in the edge-edge collision case with minor changes. Let
Once again, this is a nonlinear system. The relation used to calculate t is that A, B, C, D must be coplanar, like before.
This also is a cubic equation, which can lead to 3 values for
MAT-level CCD
Like triangle-level CCD, we have two types of elementary test: Cone-Cone (like edge-edge), Sphere-Slab (like vertex-face).
Cone-Cone Collision
we can define 2 medial cones as
so, center of arbitrary sphere on cone can be defined as
squared distance
Notice!: Since
sum of two squared radii is
Thus, the function of squared distance between 2 arbitrary spheres is
the solution space is
Sphere-Slab Collision
Similar to cone-cone collision. But interpolating a medial slab requires