Simple 2D Ball Collision Formulas for Velocity and Angle of Deflection

In summary, the problem is that you need to solve for the velocities after a collision between two objects of identical mass. You can do this by calculating the impulse between the objects, and then resolving the velocities into components that are perpendicular and parallel to the line of action of the force.
  • #1
Dude J McCool
4
0
This is a little "high school", i know, but I'm trying to design a simple collision detection program and i need a few formulas, but i can't find them anywhere.

Here is the problem. I have two balls of equal size and mass in a frictionless, 2D environment. These balls have known velocities (x,y), radii and mass. The balls collide at a given point. An angle can be determined by drawing a line between the centers of each ball, and determining the angle of that line with respect to the x-axis. Knowing all of these, how can i now go about determining the velocities after the collision? and thus, the angle of deflection?

I'm looking for something like:
Ball1 Vx, Vy After collision
Ball2 Vx, Vy After collision.

Thanks in advance.

-benny
 
Physics news on Phys.org
  • #2
A few clarifications:

Is this for "real world" analysis? That is, will the balls be able to spin? Or will they be without significant rotation. And will the collision be perfectly elastic, or will there be some less-than-perfect collisions?

"Ideal world" calculations are a lot easier.
 
  • #3
Arg! I forgot to say this. Stupid me. Yeah, totally elastic. This is an 'ideal' situation.

-benny
 
  • #4
Hi benny,
I was working with this exact problem a while back. Apparently, the impulse between the two masses act along the line joining the centers of mass. If the interaction is over a very short period of time, you can regard this impulse as constant in direction. Knowing this, you can resolve the velocity vectors into components that are perpendicular and parallel to the line of action of the force. Then, you can treat the parallel components as a 1D collision. The perpendicular component is unaffected because acceleleration must be parallel to the force. Simply add the results together to get your final velocities.
 
  • #5
The short answer to this problem is in the phenomenon of "velocity exchange." IF two particles that have identical mass collide ina perfectly elastic collision, they will each have a final velocity that is identical to the initial velocity of the other.

This of course never happens perfectly in the real world. In a sample of low-pressure helium, you would get the closest possible approximation of this ideal situation.

THe math is a bit harder. YOu have to simultaneously consider the conservation of momentum in the "x" direction, the conservation of momentum in the "y" direction, and the conservation of kinetic energy (which is independant of direction).

You get three formulas, and since M is constant, it keeps cancelling out. (note the " ' " means "after the collision)

v1x + v2x = v1x' + v2x' (v1x +v2x is a known quantity, call it "A")

v1y + v2y = v1y' + v2y' (v1y + v2y is "B")

conservation of KE brings this formula:
(v1x)^2 + (v1y)^2 + (v2x)^2 + (v2y)^2 [call this "C"]
= (v1x')^2 + (v1y')^2 + (v2x')^2 + (v2y')^2

You need at least one more formula (since there are four unknowns)

EDIT: I just noticed that my forth formula is not correct (I took it out) can someone else take it from here? I got to go teach a class.
 
Last edited:
  • #6
OK, I'm back, but I'm still blanking on the last part of this problem. THere is a trick to do here and I've forgotten what it is! Hopefully someone else will be slong soon...
 
  • #7
perhaps http://www.phy.ntnu.edu.tw/java/collision2D/collision2D.html will help those who are almost on the right track.

It would seem to me that the equation would be something like this:

V2' = sqrt((cos θ * V2)^2 + (sin β * V1)^2))
V1' = sqrt((cos θ * V1)^2 + (sin β * V2)^2))

Where:
θ is the angle between the force vector of ball1 and the V1 direction vector, and
β is the angle between the force vector of ball2 and the V2 direction vector.

I think this is right if masses are equal, if not then you just multiply the vectors by the mass. Now, the problem is, on a coordinate x,y 2D plane, where right movement is + left -, up + and down -, how can sign be preserved with all the exponents happening? That is, if the equation is right in the first place.

-benny
 
Last edited by a moderator:
  • #8
I don't mean to sound like I'm egging you guys on, but i find it odd that questions involving much more complex and abstract physical theories are being answered, yet what would seem to me like a fairly simple problem, is causing so much trouble...or apathy, as the case very well may be.

Stranger still is that i can't find one piece of source code in any language that provides proper 2D elastic ball collisions. Like i said, i find numberous java applets, like the one above, so the source must exist, but there is no code. I would think that any programmer working on any kind of physics system in their code, or collision system, would construct this very system as a FIRST step, i mean, i would. So why then is code so difficult to find? and why are the formulas not more publisized when ball physics seems quite popular?

The situation is very confusing to me, but not quite as confusing as trying to derive the solution . I need this by tomorrow, so any help, would be VERY much appreciated.

-benny
 
  • #9
First thing: I made a mistake about the "velocity exchange" bit. THat i sonly for 1-D elastic collisions.

Second thing:I didn't notice StepenP's post. THat was the missing element, and it seems that you had the formulas correct (but I did not check it out on paper and I can't stand the way formulas look on this forum).

Third thing: this is not simple. IT is not done in high school and not even in 1st year college (generally, I'm sure there are exceptions. The math is very cumbersome when using algebra, and only less cumbersome when using vector calculus.

I was really hoping someone else would pipe in on this one because I wanted to see the results. I think that this problem is more time-consuming than most.
 
  • #10
Last edited:

1. How does 2D ball collision work?

In 2D ball collision, two balls with different velocities and masses collide with each other and transfer energy and momentum based on their masses and velocities.

2. What is the formula for calculating 2D ball collision?

The formula for calculating 2D ball collision is known as the conservation of momentum, which states that the total momentum before the collision is equal to the total momentum after the collision. This can be represented as: m1u1 + m2u2 = m1v1 + m2v2, where m is the mass and u and v are the velocities of the balls before and after the collision, respectively.

3. How do you calculate the final velocities of the balls after collision?

The final velocities of the balls after collision can be calculated using the formula v1 = (m1u1 + m2u2 - m2v2) / (m1 + m2) and v2 = (m1u1 + m2u2 - m1v1) / (m1 + m2), where v1 and v2 are the final velocities of the first and second ball, respectively.

4. What factors affect 2D ball collision?

The factors that affect 2D ball collision include the mass, velocity, and angle of collision of the balls. The surface and environment in which the collision occurs can also have an impact on the outcome.

5. How can you simulate 2D ball collision in a computer program?

To simulate 2D ball collision in a computer program, you would need to use a physics engine or write your own code that calculates the velocities and positions of the balls based on the conservation of momentum formula. You may also need to consider factors such as friction and elasticity in your simulation.

Similar threads

Replies
14
Views
1K
  • Mechanics
Replies
9
Views
1K
Replies
5
Views
2K
Replies
1
Views
787
Replies
32
Views
4K
Replies
13
Views
2K
Replies
1
Views
1K
Replies
49
Views
3K
  • Introductory Physics Homework Help
Replies
2
Views
1K
Back
Top