How to calculate velocities/forces from sphere collisions?

In summary: I'm going to do.In summary, In order to solve for the collision points between 2 spheres, the programmer needs to track the spheres as a whole, as well as their center and radius. They then need to solve for a resultant force between the spheres.
  • #1
cvex
8
0
Hi,

Basically I have a point cloud that represents balls with different radii. They are all moving based on forces and sometimes they are intersecting with each other.

upload_2015-3-10_11-58-5.png


Imagine the yellow ball is going in one direction while the blue balls goes in another direction. At one time they are colliding. How can I affect each sphere,s velocity or force so I can update it after the collision?

What I know are these:

1. Since everything is represented as points, I know the position of the point that intersects with me given each of their radii.

2. I know the distance between them.

3. I know their velocity.

4. I know what forces are acting on these but they are integrated onto velocity at each iteration.

5. I know their radii.

6. I know their mass but it can be ignored.

7. I know their surface friction but this can also be ignored.If it was a simple repulsion, I would just negate the velocity but it will depend on where on the sphere the other sphere hits, right? That's where I have no idea how to solve this.

Any ideas?Thanks a lot.
 
Physics news on Phys.org
  • #2
Can you set up a system of equations using the velocities and radii of the circles to find the collision points? Then perhaps apply conservation of momentum to find the final velocities of the system's?
 
  • Like
Likes cvex
  • #3
Thanks I can. This is inside a 3d app. So what you do is add nodes to modify the behaviour of particles. They generally modify force and the particle solver integrates it onto velocity.

So if I can calculate what kind of force is produced from the collisions, I can easily do it. I just don't know how to set it up with spheres and the point of impact.

Normally they have a rigid body solver that can do this easily. I just wanted to do it with particles for fun.
 
  • #4
You mean the resultant force? Well it would be normal to the contact tangent. So if you can figure out the point of conract, you'll have a point there (im assuming 3 coords?) The difference in coords will be the opposite the direction of the force on that sphere.
 
  • Like
Likes cvex
  • #5
Thanks alot. Since these are all particles, I don't have the point of contact, just that some point with a radius A is within my radius of B and so I should react. I need to find a way to find this point of contact given the 2 centers of the spheres and radii. Can that be done mathematically?
 
  • #6
Oh ill giarantee it can, the question is how... how are you tracking the spheres? Do you track them as a whole or do you just track the center and know where the shell is?
 
  • Like
Likes cvex
  • #7
I am just tracking the centers and know their radii. I made more progress though. I just need to perform moving sphere sphere collision like this:

"Moving Sphere/Sphere: (location) Add the radius of the moving sphere to the static sphere, and treat the moving sphere as a ray. Use this ray to perform ray/sphere intersection. See Gomez; Schroeder for code (article has bug in derivation, code is fine); and RTR2, p. 622."

If I do this, I should have hitpoint, normal, distance, etc so after that only thing I would need is to figure out how to calculate a force from that so I can apply it to the current point/sphere.
 
  • #8
So this is just between 2 spheres and they have 1 collision?
The force is going to depend on the object you want them to model. Maybe you should treat them as having a membrane? Then model the interaction as a spring, with x being the radius and x hat (direction) being in the radial direction (which we talked about earlier). Or are you looking for more of a pool ball interaction? Try giving this a look. They seem to do a decent job explaining it: http://www.real-world-physics-problems.com/physics-of-billiards.html
 
  • Like
Likes cvex
  • #9
The only thing I'm going to say about what you posted, is that it works for 2 spheres, but gets sufficiently more complex for multiple spheres of different sizes, if it even works at all. If it's a larger sample, you'll want to do that but with an if statement that checks during every step of motion in your while loop. Then call the calculation function, and use that to determine your force.
 
  • #11
Thanks the first link doesn't work but I want a billiard kind of interactions between the balls.
 
  • #12
The second link goes through and gives some good insight on how to make this happen with springs. They say basically (loose paraphrasing) 'Billiards are really stiff springs, this is how you model a spring'.
So they solve for your change in velocity, which is ultimately what you're looking for, right? The only thing, is that you'll have to break this down into chunks, or pixelate it, or step it or however you want to call it. So the premise is this: billiards are springs. The spring constant is fixed, and the mass of the oscillator (the mass of the billiard ball) is fixed, therefore the time it takes for the collision to occur is fixed. If you've studied lagrangian mechanics/oscillators (these 2 seem to go hand in hand), you'll have seen ##\omega = \sqrt{\frac{k}{m}}## with omega being angular velocity, or rate of compression of the spring (billiard ball), k being the spring constant, and m being the mass.

So go through the article, or at least the first little bit, as that's what I thought was necessary, decide on the mass of the objects, the spring constant, and that will give you the time you need. Then, along with the angle of the collision (arctangent function in code), you can get the direction of the force. Now you have the magnitude of the the force, the time interval for the force, and the direction for the force: everything you need for a vector impulse, which is the change in momentum, and change in momentum/mass is change in velocity.
 
  • Like
Likes cvex

Related to How to calculate velocities/forces from sphere collisions?

1. How do you calculate the velocity of a sphere after a collision?

To calculate the velocity of a sphere after a collision, you need to use the conservation of momentum equation. This states that the total momentum before the collision is equal to the total momentum after the collision. You can calculate the initial momentum by multiplying the mass of the first sphere by its initial velocity, and the final momentum by multiplying the mass of the first sphere by its final velocity. Set these two equations equal to each other and solve for the final velocity of the first sphere.

2. What factors affect the force of a sphere collision?

The force of a sphere collision is affected by several factors, including the masses of the spheres, their velocities, and the angle at which they collide. The coefficient of restitution, which measures the elasticity of the collision, also plays a role in determining the force. Additionally, external forces such as friction and gravity can affect the overall force of the collision.

3. How do you calculate the force of a sphere collision?

The force of a sphere collision can be calculated using the impulse-momentum theorem. This equation states that the change in momentum of an object is equal to the force applied multiplied by the time it is applied. To calculate the force of a collision, you need to know the initial and final velocities of the spheres, as well as their masses. Plug these values into the equation and solve for the force.

4. Is there a difference between calculating velocities/forces for elastic and inelastic collisions?

Yes, the calculation for velocities/forces in elastic and inelastic collisions is different. In an elastic collision, both kinetic energy and momentum are conserved, meaning that the total energy and momentum before and after the collision are the same. In an inelastic collision, only momentum is conserved, and some of the kinetic energy is lost. This difference affects the equations used to calculate velocities and forces in each type of collision.

5. How can I incorporate air resistance into my calculations for sphere collisions?

To incorporate air resistance into your calculations for sphere collisions, you can use the drag force equation. This equation takes into account the velocity of the sphere, its cross-sectional area, and the density of the air to calculate the force of air resistance. You can then use this force in the momentum and force equations to adjust for the effects of air resistance on the collision.

Similar threads

Replies
14
Views
1K
  • Mechanics
Replies
9
Views
1K
Replies
3
Views
1K
Replies
6
Views
1K
  • Mechanics
Replies
10
Views
2K
Replies
3
Views
923
Replies
12
Views
1K
  • Introductory Physics Homework Help
Replies
2
Views
1K
Replies
8
Views
1K
Back
Top