Calculate ball velocities after slope bounce

  • Thread starter Thread starter DrKrunklehorn
  • Start date Start date
  • Tags Tags
    Ball Bounce Slope
AI Thread Summary
The discussion focuses on calculating the correct post-collision velocity of a ball after it bounces off a rotating line, or racket. The user has successfully detected 2D collisions but struggles with determining the correct reflection angle as the racket tilts. They initially thought the reflection angle could be derived from the incident angle but found this approach ineffective. A suggestion was made to work out the vectors for a horizontal racket and then apply rotation transformations to account for the racket's angle. The importance of detecting whether the ball hits the top or bottom of the racket is also highlighted for accurate calculations.
DrKrunklehorn
Messages
5
Reaction score
0

Homework Statement



Hello! I'm working on my final project for a programming class. Currently I can successfully
detect 2D collision between a ball, and a line that can rotate in any direction.

However when the ball hits the line I need to change it's velocity so it bounces
in the right direction. I'm not worrying about elasticity or friction or anything, just
post collision direction.

Homework Equations



I know basic Trig is involved and maybe Dot product, but I'm pretty sure we don't need that.

The Attempt at a Solution



I thought if the racket was horizontal, it would be as easy as incident angle = reflection
angle. But as the racket tilts upward I pictured the reflection angle decreases at the same
time.

So I tried taking the racket's rotation relative to the ground and subtract it from the ball's
movement angle. This I thought would be the new angle of reflection.

Sadly it didn't work out. Sometimes the ball sort of bounces in the right direction but it's
really shoddy.

Thanks for the assistance!
 
Physics news on Phys.org
Why not work out the vectors for the case that the racket is at zero degrees then rotate the vectors by the racket angle using either matrix or quaternion methods. You may need to detect if that ball hits the top or the bottom of the racket.
 
Thread 'Collision of a bullet on a rod-string system: query'
In this question, I have a question. I am NOT trying to solve it, but it is just a conceptual question. Consider the point on the rod, which connects the string and the rod. My question: just before and after the collision, is ANGULAR momentum CONSERVED about this point? Lets call the point which connects the string and rod as P. Why am I asking this? : it is clear from the scenario that the point of concern, which connects the string and the rod, moves in a circular path due to the string...
Back
Top