NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
December 18, 2017, 03:57:50 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
"Nothing in life is to be feared, it is only to be understood." ..."Marie Curie 1867-1934, Polish born French Physicist, Twice Nobel Prize Winner- Physics and Chemistry)"
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 23375 times)
0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
pleasedontgocrazy
Newbie
*
Offline Offline

Posts: 4

«
Embed this message
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: 3080



WWW
«
Embed this message
Reply #1 on: September 02, 2005, 07:04:52 am » posted from:Taipei,T'ai-pei,Taiwan

Please check out 2D collision
Logged
Pages: [1]   Go Up
  Print  
"Nothing in life is to be feared, it is only to be understood." ..."Marie Curie 1867-1934, Polish born French Physicist, Twice Nobel Prize Winner- Physics and Chemistry)"
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Bouncing Ball
kinematics
Fu-Kwun Hwang 19 223024 Last post December 27, 2015, 03:41:00 am
by lootfo8x
Elastic bouncing ball
Kinematics
Fu-Kwun Hwang 7 20527 Last post December 23, 2015, 09:30:56 am
by lookang
A bouncing ball (learn how to create event to habdle bouncing condition in EJS)
Examples for beginner who want to learn EJS
Fu-Kwun Hwang 5 15343 Last post February 05, 2009, 05:51:46 am
by walkerouks
Elastic bouncing ball
kinematics
ahmedelshfie 0 4675 Last post May 27, 2010, 07:18:10 pm
by ahmedelshfie
Bouncing ball with rotation
dynamics
ahmedelshfie 0 5830 Last post November 16, 2010, 04:27:20 pm
by ahmedelshfie
Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.06 seconds with 23 queries.since 2011/06/15