Search code examples
mathresponsecollision-detectionphysicscollision

Some questions about 2D polygon collision response


Hey so after reading this article I've been left with a few questions I hope to resolve here.

My understanding is that the goal of any multi-dimensional collision response is to convert it to a 1D collision be putting the bodies on some kind of shared axis. I've deduced from the article that the steps to responding to a 2d collision between 2 polygons is to

  1. First find the velocity vector of each bodies collision point
  2. Find relative velocity based on each collision point's velocity (see question 1)
  3. Factor in how much of that velocity is along the the "force transfer line (see question 2)"
    (which is the only velocity that matters for the collision)
  4. Factor in elasticity
  5. Factor in mass
  6. Find impulse/ new linear velocity based on 2-4
  7. Finally figure out new angular velocity by figuring out how much of the impulse is "rotating around" each object's CM (which is what determines angular acceleration)

All these steps basically figure out how much velocity each point is coming at the other with after each velocity is translated to a new 1D coordinate system, right?

Question 1: The article says relative velocity is meant to find and expression for the velocity with which the colliding points are approaching each other, but to me it seems as though is simply the vector of
CM 1 -> CM 2, with magnitude based on each point's velocity. I don't understand the reasoning behind even including the CMs in the calculations since it is the points colliding, not the CMs. Also, I like visualizing things, so how does relative velocity translate geometrically, and how does it work toward the goal of getting a 1D collision problem.

Question 2: The article states that the only force during the collision is in the direction perpendicular to the impacted edge, but how was this decided? Also how can they're only be force in one direction when each body is supposed to end up bouncing off in 2 different directions.


Solution

  • "All these steps basically figure out how much velocity each point is coming at the other with after each velocity is translated to a new 1D coordinate system, right?"

    That seems like a pretty good description of steps 1 and 2.

    "Question 1: The article says relative velocity is meant to find and expression for the velocity with which the colliding points are approaching each other, but to me it seems as though is simply the vector of CM 1 -> CM 2, with magnitude based on each point's velocity."

    No, imagine both CMs almost stationary, but one rectangle rotating and striking the other. The relative velocity of the colliding points will be almost perpendicular to the displacement vector between CM1 and CM2.

    "...How does relative velocity translate geometrically?"

    Zoom in on the site of collision, just before impact. If you are standing on the collision point of one body, you see the collision point on the other point approaching you with a certain velocity (in your frame, the one in which you are standing still).

    "...And how does it work toward the goal of getting a 1D collision problem?"

    At the site of collision, it is a 1D collision problem.

    "Question 2: The article states that the only force during the collision is in the direction perpendicular to the impacted edge, but how was this decided?"

    It looks like an arbitrary decision to make the surfaces slippery, in order to make the problem easier to solve.

    "Also how can [there] only be force in one direction when each body is supposed to end up bouncing off in 2 different directions."

    Each body experiences a force in one direction. It departs in a certain direction, rotating with a certain angular velocity. I can't parse the rest of the question.