Alii
- 5
- 0
Homework Statement
Im programming physics simulation. ...rigid body collision with ball.
The ball is OK, but I have to push and rotate the rigid body.
I have the contact point and the velocity(v) that I would add to the bodys current velocity if I wouldn't have to rotate it.
So I need to divide that v into push(v_push) and rotate(angular_velocity) parts.
The Attempt at a Solution
I see v as a momentum that stores some energy(E_total)
Energy_in_v_push= Energy_in_v - Energy_in_generated_angular_velocity
So my current solution is:
M= |v| * r (torque)
I= 1/12 * m * (a^2 + c^2) (moment of inertia. the body is an a*c rectangle. m is the weight)
(... M and I are OK)
omega= M / I
E_total= 1/2 * m * |v|^2
E_spin= 1/2 * I * omega^2
E_push= E_total - E_spin
|v_push|= sqrt( 2 * E_push / m)
generated_angular_velocity= omega * FROM_RADIANS (I have to convert it to degrees)
Well, this works perfectly except I have to multiply generated_angular_velocity with m, otherways it turns much too slowly.
Whats the problem then? I guess that omega= M/I is angular acceleration not velocity or something. Is this whole approach wrong?
Thanks!