0
\$\begingroup\$

I'm making basketball throwing simulator and I have two questions about the collision response. To make collision response with any surface like the wall or ground, I'm using the following formulas to calculate impulse then linear velocity and angular velocity after collision:

enter image description here

for more info about the formula see this. The formula in the picture is a little bit different from the one in the site cause the mass of the object B(which is a surface) is considered infinite.

First question: the vector r(AP) is from the center of the sphere to the collision point, and the normal vector (n) goes in the opposite direction, so the cross product of these two vectors is zero vector, only (1/ma) left in the denominator of the impulse. And for angular velocity the cross product of r(AP) and the normal will be also zero vector and this leads to not to rotate after collision and this is wrong of course, what's the problem with these results?

Second question: in the denominator of the impulse: (n) dot ( ( n cross r(AP) ) / I cross r(AP)

What's the order of operations in this case, should I do the cross products first then the dot product at the end, or just do the operations from left to right?

\$\endgroup\$
2
  • 1
    \$\begingroup\$ I'm a month late, but as for the first question, your result sounds correct to me. Rolling (angular velocity) of a sphere along a surface is caused by friction, which is tangential to the surface, so we wouldn't expect to see any rotation from a surface-sphere collision resolved along the normal. As for the second question, cross product always has to come first, since if you do dot product first, you're left with a scalar and can't do a cross product anymore. \$\endgroup\$ Aug 27 at 4:57
  • \$\begingroup\$ Honestly, might as well rewrite this as an answer... \$\endgroup\$ Aug 27 at 4:58
1
\$\begingroup\$

For your first question: don't doubt yourself! Your results are reasonable for a sphere-surface collision. Assuming that the wall/ground can't move (has infinite mass), then your impulse would indeed be proportional to the mass of the sphere times its incoming velocity. Ending up with just 1/mA in the denominator (equivalent to mA in the numerator) is consistent with this.

What's more, rolling is a phenomenon caused by friction, which is a force that is applied parallel to the surface. Since your resolution is along the surface normal, you can't get rolling from this collision, so it makes sense that you have no angular velocity.

For your second question, when a cross product and a dot product are written together, order of operations dictates that the cross product must be solved first. This is because the dot product generates a scalar, not a vector. If you do the dot product first, you won't have a vector left to cross!

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.