hi wave,
Thanks, I had tried that actually but it doesn't seem to work in all scenarios - I think because the modulus gives the same result for angles that are 90 degrees apart as it does for 180 (your example), when in fact these are opposites.
This is to do with collisions and elasticity really, so maybe it will be clearer with an example:
If a moving ball (cue ball for example) collides with a static one, and the cue ball has backspin applied, then depending on how full the impact depends on how much the backspin will affect the subequent motion of the cue ball.
What I mean is that if the balls strike head on then the cue ball would move backwards after the collision. However if it were to just strike a glancing blow, the effect of backpin would be minimal and the ball would continue to move forwards.
Looking at things in this way the moving ball can effectively strike the other ball at an angle between 0 and 90(+/-) degrees - with 0 being a head on collision and 90 being the faintest of glancing contacts.
But obviously the angle between the balls on contact and the angle the moving ball is travelling at can both be any angle so I need a way to convert the difference into a 0-90 range.
Hopefully this makes it a bit clearer. As you may guess this relates to a pool game. I have all the effects of sidespin and top and backspin working (albeit in a 'fake' physics way), except for taking into account how the speed of the cue ball is altered by the fullness of the contact.
Thanks, I had tried that actually but it doesn't seem to work in all scenarios - I think because the modulus gives the same result for angles that are 90 degrees apart as it does for 180 (your example), when in fact these are opposites.
This is to do with collisions and elasticity really, so maybe it will be clearer with an example:
If a moving ball (cue ball for example) collides with a static one, and the cue ball has backspin applied, then depending on how full the impact depends on how much the backspin will affect the subequent motion of the cue ball.
What I mean is that if the balls strike head on then the cue ball would move backwards after the collision. However if it were to just strike a glancing blow, the effect of backpin would be minimal and the ball would continue to move forwards.
Looking at things in this way the moving ball can effectively strike the other ball at an angle between 0 and 90(+/-) degrees - with 0 being a head on collision and 90 being the faintest of glancing contacts.
But obviously the angle between the balls on contact and the angle the moving ball is travelling at can both be any angle so I need a way to convert the difference into a 0-90 range.
Hopefully this makes it a bit clearer. As you may guess this relates to a pool game. I have all the effects of sidespin and top and backspin working (albeit in a 'fake' physics way), except for taking into account how the speed of the cue ball is altered by the fullness of the contact.