How to calculate velocities/forces from sphere collisions?

Click For Summary
SUMMARY

This discussion focuses on calculating velocities and forces resulting from collisions between spheres represented as point clouds in a 3D application. Key concepts include determining the point of contact based on sphere centers and radii, applying conservation of momentum, and modeling interactions similar to billiard balls using spring dynamics. The conversation emphasizes the need for precise calculations of forces at the point of impact to update sphere velocities accurately.

PREREQUISITES
  • Understanding of 3D geometry and collision detection
  • Familiarity with conservation of momentum principles
  • Knowledge of spring dynamics and Hooke's Law
  • Experience with programming in a 3D simulation environment
NEXT STEPS
  • Research "Moving Sphere/Sphere collision detection algorithms"
  • Study "Hooke's Law and its application in physics simulations"
  • Explore "Lagrangian mechanics and oscillators" for advanced collision modeling
  • Investigate "Vector impulse calculations for momentum changes in collisions"
USEFUL FOR

Game developers, physicists, and anyone involved in 3D simulations or particle systems looking to implement realistic collision responses and force calculations.

cvex
Messages
8
Reaction score
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
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
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.
 
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
Thanks a lot. 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?
 
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
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.
 
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
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

Similar threads

  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 35 ·
2
Replies
35
Views
4K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
5
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 20 ·
Replies
20
Views
2K