- #1

Xcrypt

- 21

- 0

http://imageshack.us/photo/my-images/195/spinner.png/

^this is the object/spinner I am referring to.

I am trying to code a physics based minigolf game in which a ball should be able to collide properly with the spinner object and the arms of it.

However I am lacking in physical knowledge to do so.

This is the model I currently have:

1) When the ball hits the spinner, a point gets defined where the ball hits the spinner. Of this point on the spinner, there is a tangential velocity bound to it which I have put in a vector.

2) Then, I projected the ballVelocityVector onto that tangentialVelocity Vector, and get a new vector: ballProjectedVelocityVector

3) After that, momentum gets defined:

ballProjectedMomentumVector = ballProjectedVelocityVector * ballMass

spinnerPointMomentumVector = pointTangentialVelocityVector * spinnerMass [probably where it goes wrong?]

4) Then new velocities get defined for the ballProjectedVelocityVector and the spinnerPointTangentialVelocityVector

Using:

va = [C

where:

v

v

u

u

m

m

C

5) The spinner gets a new angular velocity: (the new spinnerPointTangentialVelocityVectorLength / distance from that point to the axis of the spinner)

The ball gets a new velocityVector: (the new ballProjectedVelocityVector + (the old ballVelocityVector[projected onto the vector perpendicular to the projected velocity]) )

----------

However, this model I am using is not quite accurate, since if 'the point where the ball hits the spinner' is closer to the axis, the MORE angular rotation the spinner will get with this model.

Does anyone know what I am doing wrong / what steps I should take to determine the proper new angular velocity of the spinner after collision and the new velocity of the ball after collision?

----------

In explaining, please make try to do so so I can understand, because although I am very interested in physics and learning, my current knowledge is still very low.

----------

Thanks a lot for the help! :)

^this is the object/spinner I am referring to.

I am trying to code a physics based minigolf game in which a ball should be able to collide properly with the spinner object and the arms of it.

However I am lacking in physical knowledge to do so.

This is the model I currently have:

1) When the ball hits the spinner, a point gets defined where the ball hits the spinner. Of this point on the spinner, there is a tangential velocity bound to it which I have put in a vector.

2) Then, I projected the ballVelocityVector onto that tangentialVelocity Vector, and get a new vector: ballProjectedVelocityVector

3) After that, momentum gets defined:

ballProjectedMomentumVector = ballProjectedVelocityVector * ballMass

spinnerPointMomentumVector = pointTangentialVelocityVector * spinnerMass [probably where it goes wrong?]

4) Then new velocities get defined for the ballProjectedVelocityVector and the spinnerPointTangentialVelocityVector

Using:

va = [C

_{r}*m_{a}*(u_{b}-u_{a})+m_{a}*u_{a}+m_{b}*u_{b}]/(m_{a}+m_{b})where:

v

_{a}is the final velocity of the first object after impactv

_{b}is the final velocity of the second object after impactu

_{a}is the initial velocity of the first object before impactu

_{b}is the initial velocity of the second object before impactm

_{a}is the mass of the first objectm

_{b}is the mass of the second objectC

_{r}is the coefficient of restitution (which I have set for a near-perfect non-elastic collision (0.05) )5) The spinner gets a new angular velocity: (the new spinnerPointTangentialVelocityVectorLength / distance from that point to the axis of the spinner)

The ball gets a new velocityVector: (the new ballProjectedVelocityVector + (the old ballVelocityVector[projected onto the vector perpendicular to the projected velocity]) )

----------

However, this model I am using is not quite accurate, since if 'the point where the ball hits the spinner' is closer to the axis, the MORE angular rotation the spinner will get with this model.

Does anyone know what I am doing wrong / what steps I should take to determine the proper new angular velocity of the spinner after collision and the new velocity of the ball after collision?

----------

In explaining, please make try to do so so I can understand, because although I am very interested in physics and learning, my current knowledge is still very low.

----------

Thanks a lot for the help! :)

Last edited: