NTNUJAVA Virtual Physics Laboratory
Physics Simulations to help you enjoy the fun of physics!
February 10, 2010, 06:00:07 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: This site host hundreds of physics related java simulations under create common license. All registered user will be able to get files for offline use when user login and view the simulation. Switch to this new system on 2007/02/14. (previous system2001-2007, 1996-2001) ,Check out Chinese forum to find more simulations and resources in Chinese.
 
   Home   Help Search Login Register  
"That their main business was not put into the mind knowledge which was not there before, but to turn the mind's eye towards light so that it might see for itself." ...Plato's advice to educators(429-347BC)
Google Bookmarks Yahoo My Web MSN Live Netscape Del.icio.us FURL Stumble Upon Delirious Ask FaceBook

Pages: [1]   Go Down
  Print  
Author Topic: Q:Bouncing Balls (Masses): two ball collide with each other  (Read 15273 times)
0 Members and 2 Guests are viewing this topic. Click to toggle author information(expand message area).
pleasedontgocrazy
Newbie
*
Offline Offline

Posts: 4

« on: August 31, 2005, 11:25:43 PM »

If I know to balls and there velocities and the masses how do i find there final velocities. So far I have assumed that the two balls have the same mass but this may not be true in some cases.

Here is the code for a collision so far
 
  'Ball A
 
  NewAngle = WorkOutRADAngle(Ball(BallA), Ball(BallB))
 
  NewSpeed(BallA).X = BallSpeed(BallB) * -Cos(NewAngle - BallAngle(BallB))
  NewSpeed(BallA).Y = BallSpeed(BallA) * Sin(NewAngle - BallAngle(BallA))
 
  MoveBall(BallA).X = (NewSpeed(BallA).Y * Sin(NewAngle)) - (NewSpeed(BallA).X * Cos(NewAngle))
  MoveBall(BallA).Y = (NewSpeed(BallA).Y * -Cos(NewAngle)) - (NewSpeed(BallA).X * Sin(NewAngle))
 
  'Ball B
 
  NewAngle = WorkOutRADAngle(Ball(BallB), Ball(BallA))
 
  NewSpeed(BallB).X = BallSpeed(BallA) * -Cos(NewAngle - BallAngle(BallA))
  NewSpeed(BallB).Y = BallSpeed(BallB) * Sin(NewAngle - BallAngle(BallB))
 
  MoveBall(BallB).X = (NewSpeed(BallB).Y * Sin(NewAngle)) - (NewSpeed(BallB).X * Cos(NewAngle))
  MoveBall(BallB).Y = (NewSpeed(BallB).Y * -Cos(NewAngle)) - (NewSpeed(BallB).X * Sin(NewAngle))

What happens when the balls have differnt masses?

Here the program so far: http://www.freewebs.com/dave_fooks/BounceBalls.exe

P.s. Moveball is the new velocity for the ball
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 1966


WWW
« Reply #1 on: September 02, 2005, 07:04:52 AM »

Please check out 2D collision
Logged
Pages: [1]   Go Up
  Print  
"That their main business was not put into the mind knowledge which was not there before, but to turn the mind's eye towards light so that it might see for itself." ...Plato's advice to educators(429-347BC)
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Racing Balls
kinematics
Fu-Kwun Hwang 24 81258 Last post September 22, 2009, 01:48:46 PM
by janelavis
Bouncing Ball
kinematics
Fu-Kwun Hwang 6 129653 Last post September 22, 2009, 01:55:42 PM
by janelavis
Elastic bouncing ball
Kinematics
Fu-Kwun Hwang 5 6953 Last post October 31, 2009, 10:34:34 PM
by Fu-Kwun Hwang
A bouncing ball (learn how to create event to habdle bouncing condition in EJS)
Simple Examples for beginner who want to learn EJS
Fu-Kwun Hwang 5 7092 Last post February 05, 2009, 05:51:46 AM
by walkerouks
How to tag onto these balls?
Misc
Yves 6 4834 Last post February 11, 2008, 02:39:51 AM
by Yves
Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 5.079 seconds with 23 queries.