Jump to content
  • Advertisement
Sign in to follow this  
dustydoodoo

Just need a little explaining

This topic is 3610 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In Chris Hecker's article, he gives an equation for finding the impulse needed for collision response. I just can't seem to "solve for j/Impulse" given this equation RelativeVelocity + Impulse/MassOfObjectA + Impulse/MassOfObjectB = -e * RelativeVelocity which, once its has been rearranged should be Impulse = -(1 + e) * RelativeVelocity * (MassOfObjectA + MassOfObjectB) It does make sense to me, but I just don't know how (1 + e) gets there. I've been trying for some time to solve for "j" but I just can't! It would really help if someone could do it step by step for me. I feel as if it is actually really simple, but for some reason I just can't figure it out on paper! I probably wrote it wrong on here, but i hope that someone just gets the point.

Share this post


Link to post
Share on other sites
Advertisement
Let me shorten the names of your varibles so that the form of the equation is easily seen:

V + I/Ma + I/Mb = -e * V

For this you simply move all terms without I to the right hand side

I/Ma + I/Mb = -e * V - V

Factor I out on the left. (We can simplify the right a little too by factoring out -V)

So: I (1/Ma + 1/Mb) = -V(1 + e)

We can divide both sides by that factor of ( 1/Ma + 1/Mb ) to isolate I

I = -V (1+e) / (1/Ma + 1/Mb)

It looks like the answer is a little different than you expected.

If you prefer we can simplify a little more by putting 1/Ma + 1/Mb into a single fraction by expressing it over a common denominator:

1/Ma + 1/Mb = (Ma + Mb)/(Ma*Mb)

So that:

I = -V (1+e) * (Ma*Mb)/(Ma + Mb)

Hope that helps.

Share this post


Link to post
Share on other sites
RelativeVelocity + Impulse/MassOfObjectA + Impulse/MassOfObjectB = -e * RelativeVelocity


RelativeVelocity + e * RelativeVelocity = - Impulse / ( MassofObjectA + MassofObjectB )

- Impulse = ( 1 + e ) * RelativeVelocity * ( MassofObjectA + MassofObjectB )

Impulse = - ( 1 + e ) * RelativeVelocity * ( MassofObjectA + MassofObjectB )


Simple math..

Share this post


Link to post
Share on other sites
Quote:
Original post by mattnenterprise
It has -(1 + e) which is the same as this -1(1 + e) which when you multiply -1 and 1 you get -1 + e which equals -e.


Hmm? -1 + e = -e? is that right!?

Share this post


Link to post
Share on other sites
Quote:
Original post by Sleek
...

RelativeVelocity + e * RelativeVelocity = - Impulse / ( MassofObjectA + MassofObjectB )

...

Simple math..



This line is incorrect since I/Ma + I/Mb = I*(1/Ma + 1/Mb) = I * (Ma + Mb)/(Ma*Mb) which is not the same as I /(Ma + Mb), as you have written (try it with numbers). Remember that when adding fractions you must put them over a common denominator.

Share this post


Link to post
Share on other sites
Quote:
Original post by dustydoodoo
Quote:
Original post by mattnenterprise
It has -(1 + e) which is the same as this -1(1 + e) which when you multiply -1 and 1 you get -1 + e which equals -e.


Hmm? -1 + e = -e? is that right!?


No, it isn't. But what i think he was trying to say is that -(1+e) = -1(1+e) = -1 + -e, which is correct.

Share this post


Link to post
Share on other sites
Thanks Alfred! I would say thanks to the person that replied after you, but I was a little insulted by "Simple math.." I always seem to get offended when people use "..." I really need to get better at these kinds of things. I guess its because I don't practice much.

Share this post


Link to post
Share on other sites
Quote:
Original post by dustydoodoo
Thanks Alfred! I would say thanks to the person that replied after you, but I was a little insulted by "Simple math.." I always seem to get offended when people use "..." I really need to get better at these kinds of things. I guess its because I don't practice much.



No problem. Are you familiar with vector arithmetic? I took a look at the Chris Hecker article and you should watch out for the vectors that come up in these equations. Vab is a vector and Vab dot n gives the component of the velocity vector in the direction of n. You'll run into trouble treating them as pure numbers. Here's a little tutorial incase you're a bit rusty:

http://www.math.hmc.edu/calculus/tutorials/vectoranalysis/

Good luck.

Share this post


Link to post
Share on other sites
Quote:
Original post by AlfredR
Quote:
Original post by dustydoodoo
Thanks Alfred! I would say thanks to the person that replied after you, but I was a little insulted by "Simple math.." I always seem to get offended when people use "..." I really need to get better at these kinds of things. I guess its because I don't practice much.



No problem. Are you familiar with vector arithmetic? I took a look at the Chris Hecker article and you should watch out for the vectors that come up in these equations. Vab is a vector and Vab dot n gives the component of the velocity vector in the direction of n. You'll run into trouble treating them as pure numbers. Here's a little tutorial incase you're a bit rusty:

http://www.math.hmc.edu/calculus/tutorials/vectoranalysis/

Good luck.


Thanks for the link! I do know a little about vector math (cross and dot product, addition/subtraction) But I've yet to really do much with it. So having this to look to is excellent! thanks.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!