what do i do after angle.

Started by
4 comments, last by yaroslavd 19 years, 4 months ago
Im crearint a pool game, and i already know how to get the angle of the collision between two balls. but, what do i do with it. How do i use the angle to calculate the velocity of the two balls? I have read through my math book and i just cant understand it. Thanks in advance.
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="88" height="70" id="H2lvl" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="http://www.ironhive.com/CFCs/H2lvl.swf?gamertag=jBaddog" /> <param name="quality" value="high" /> <param name="wmode" value="transparent"> <embed src="http://www.ironhive.com/CFCs/H2lvl.swf?gamertag=jBaddog" quality="high" bgcolor="#ffffff" width="88" height="70" name="H2lvl" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object>
Advertisement
I am doing something very similar. I could help you better if you let me know if you let me know how you represent velocity vectors (magnitude/angle or x/y).
Well, I'll just tell you what I found out thru research:

v1 = velocity of ball #1
v2 = velocity of ball #2
t = position of ball #1 - position of ball #2
n = collision normal (perpendicular to t)

Project v onto n and t. n velocity stays the same after the collision. Figure out the t velocity through this system of equations:

v1m1 + v2m2 = v1fm1 + v2fm1 (Conservation of Momentum)
v1 - v2 = v2f - v1f (Conservation of KE, elastic collision)

Remember, apply each v in the above formulae is actually the t velocity, not the total velocity. I can give you the solutions later (don't have them at the moment). Then, just add vn and the new vt to find the v after collision.
Does that help?
i thinks so, thanks, ill try and do that.
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="88" height="70" id="H2lvl" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="http://www.ironhive.com/CFCs/H2lvl.swf?gamertag=jBaddog" /> <param name="quality" value="high" /> <param name="wmode" value="transparent"> <embed src="http://www.ironhive.com/CFCs/H2lvl.swf?gamertag=jBaddog" quality="high" bgcolor="#ffffff" width="88" height="70" name="H2lvl" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object>
Let me know if it works. I haven't had the time to implement it myself.

This topic is closed to new replies.

Advertisement