Thanks to my fellow physicist, Oleg Matveychuk, I've done with the collision handler bug I said in the last status report. That was indeed a mistake in the paper (Collision Detection and Response for Computer Animation).

One of the collision equation in that paper looks like

Here, is linear and is angular velocity of each of two bodies, is the vector pointing from center of mass to collision point, and is normal to collision plane. The expression in parens, let's call it , is relative velocity of collision points of two bodies. So, Moore and Wilhelms propose to set to 0.It appears that this corresponds to completely unelastic collision (with restitution coefficient equal to 0), and that's why it doesn't look too realistic.

If we have coefficient of restitution , then proper equation is , where is taken after collision and before.

Another thing I've done is support of generic polyhedra. For example, now we can experiment not just with cubes, but with parallelepipeds or tetrahedra. And in future this will help us to handle arbitrary shapes by approximating them with polyhedra, using point repulsion algorithm which I'm going to implement (it's also needed for semi-adjusting BSP trees).

## 1 comment:

Always good to have a physicist close by!

Post a Comment