   2D collision of 2 circular objects (fully elastic collision)
  im currently makin a simulation of ball's on a tablesee: www.mdk-photo.com/&#106avascript/Vectoranyways, so far i've used the sentence that "two objects colliding exchange their vectors of heading" <-- this is UNTRUE in 2d or 3dso now i've used 6 days on Google, Wiki and good knows where else, searching for physical formulars and vector-math without result... then i came across:http://www.gamedev.net/community/forums/topic.asp?topic_id=390861&whichpage=1&#2589967however, the math described in the post, is rarther un-readable (in my eyes)so i humbly reqeust someone to give explain or write how exactly to implement the exhange of vector-forcesim sooo tired of standard physical explanations without examples :(you may start with:-before collision: vA,vB "Movement vector directions - Array[x,y]"-positions: pA,pB "Array[x,y]"extras:-Mass = 1.0-accelleration = 0.0 (or 1.0 ?)in advance - Thanks   
  Well, i used the reflection off the normal of the other ball, or do want something more discriptive, i.e. code, cause i did the sphere collision stuff in POV-Ray(a pain to code), i could probably make it into &#106avascript.BTW, nice smooth simulation, it's hard doing that in &#106avascript, i did a game once, but it sucked.   ;Pool Hall Lessons;  I've already proven that I'm bad at explaining this, but I'll try again anyways. The key idea is to switch the momentum in the axis of collision or exchange their vectors of heading, however you want to say it. This means finding each object's speed along that axis and switching them. The axis of collision, as I like to put it, is the axis created by connecting the 2 centers of your circles. Since it isn't likely to be aligned with your x or y axis you'll have to project your momentum's onto it before you can switch them. You can do this using the dot product ie (momentum).(normalized axis) = (magnitude of momentum along that axis). Once you have projected your momentum's you'll have 2 magnitudes one for each circle. Take these and multiply them by your axis to get 2 vectors one for each circle. Those vectors represent each of your circle's momentum's along that axis. Then for each circle subtract its vector along that axis and add the other circle's vector along that axis. That is how you "exchange their vectors of heading". Just to be clear: normalize means set a vector's length to 1 by dividing  by its length and if you don't know about the dot product you should check this out: http://en.wikipedia.org/wiki/Dot_product Hopefully, this is more helpful than last time. Someone should submit a good article on this so it doesn't come up on the forums so often.edit: you might want to set a maximum on the text and collision checking in your program. I accidently left it running and just noticed because it was taking all of my processing power and slowly counting up on memory usage[Edited by - Alrecenk on June 9, 2006 11:38:05 PM];Quote:Original post by JBourriePool Hall LessonsPERFECT article !!!everything needed is there !!someone ought to post a/this working code to Wikipedia !!to everyone else : Thanks for the effort !   