JoeJ wrote:But that does not handle the case like snipping the pencil on both ends simultaneously...?
Yes it does, what is does not do is to apply a precise impulse to achieve a desired result.
But if you had the impulse it will apply it properly to the body.
Applying impulses is not much different than applying forces, in fact an impulse is a finite force applied for an infinitesimal amount of time
therefore the same equation used to apply forces and torque can also be used to apply impulse and anglular impulses.
In the case of the pencil say you know the impulse on each point and distance at witch to apply the impulse
Say Pi is the inpulse and Ri – c is the distance form each point to the center, From the secund law of mation you have
Sum Fi = m * dv / dt
Sum Ri x Fi = I * dw / dt
From ther integration Fi and Ti indevidually for a small amunt of time, you can asume the Fi is a spike of constant high,
therefore the integration on the left size is the sum of a const value equal to the high of each spike mutiplied by the length of time the impusle is applied.
on the right size mass and inertia are also constant because of the asumtion that the impulse is appled in an infinitesimal amount of time, therefore the body does not
has time to rotate or move. so the equation becomes.
Sum (Fi * dt) = m * v2 – m * v1
Sum ((ri x Fi) * dt) = I * w2 – I * w1
Here impulse Pi = Fi * dt
Sum (Pi) + m * v1 = m * v2
Sum ((ri x Pi) * dt) + m * w0 = I * w2
Now the to get the new velocity and angular velocity
You calculate and acumulate the values from an the left size in a loop, and then
You multiply by the inverse mass and inverse inertia
Inv(m) * ((Sum (Pi) + m * v1) = v2
Inv (Sum (ri x Pi) + m * w0) = w2
Like I said what the function doe no do is to calculate the exact Pi to achieve a desire result, for toy nee a complementary solver of linear system of equations.
if you have Pi. then it is just a applycation.