- #1
_Nate_
- 20
- 0
For my physics engine, I have a pretty simple formula to deal with collisions.
Essentially, in a collision, both Momentum and Kinetic Energy have to be conserved. Thus, m1v1 + m2v2 = m1u1 + m2u2 and m1v1^2 + m2v2^2 = m1u1^2 + m2u2^2, and, given m1, m2, v1, and v2, we can solve for u1 and u2 (final velocities of each object) like this:
u1 = (m1-m2)/(m1+m2)v1 + (m2+m2)/(m1+m2)v2
u2 = (m1+m1)/(m1+m2)v1 + (m2-m1)/(m1+m2)v2
And this all works well and good (I think)
However, I am having trouble doing the same thing for rotation: what's the equivalent formula for rotation? Are there rotational equivalents for mass, velocity, momentum, and kinetic energy, and how can I use a formula similar to the one above to, given rotational momentum, calculate rotational velocities after a collision?
Essentially, in a collision, both Momentum and Kinetic Energy have to be conserved. Thus, m1v1 + m2v2 = m1u1 + m2u2 and m1v1^2 + m2v2^2 = m1u1^2 + m2u2^2, and, given m1, m2, v1, and v2, we can solve for u1 and u2 (final velocities of each object) like this:
u1 = (m1-m2)/(m1+m2)v1 + (m2+m2)/(m1+m2)v2
u2 = (m1+m1)/(m1+m2)v1 + (m2-m1)/(m1+m2)v2
And this all works well and good (I think)
However, I am having trouble doing the same thing for rotation: what's the equivalent formula for rotation? Are there rotational equivalents for mass, velocity, momentum, and kinetic energy, and how can I use a formula similar to the one above to, given rotational momentum, calculate rotational velocities after a collision?