How do i find the direction of impulse in 3d?

In summary, the conversation discusses a game involving collisions with spheres and the need to find the direction of the impulse between them. The formula used to calculate the magnitude of the impulse is provided, along with potential problems with gears and multiple collisions. Two methods for simulating collisions are mentioned, including simulating forces and considering two motions separately. The importance of tangential forces and elasticity is also discussed. Finally, the direction and magnitude of the impulse are determined to be along the line passing through the centers of mass, with the actual speeds only affecting the magnitude and not the direction.
  • #1
1101
23
0
I'm writing a game that involves collisions with spheres. Anyway each sphere has both angular and linear velocity. These two spheres collide. I need to find the direction of the impulse between them (if that's the right wording). I tried just subtracting their linear velocity components like this:

implusex = sphere1xspeed - sphere2xpseed;
implusey = sphere1yspeed - sphere2zpseed;
implusez = sphere1zspeed - sphere2zpseed;
(at which point I would then normalize the vector)

This seems to work for calculating the linear velocity after the collision but what happens is that the magnitude of the impulse is 0 when there is no linear velocity. This creates a problem with things like gears which may be locked into a fixed location in space but have angular velocity.

I should point out that since I'm working in a game environment I do not know what the final linear/angular velocity of the spheres is.

I'm using the formula found here to calculate the magnitude of impulse and do other physics things: http://www.euclideanspace.com/physics/dynamics/collision/threed/index.htm
 
Physics news on Phys.org
  • #2
If you have possibility of more than one collision at a time, I'd go with simulating forces instead and run collisions step-by-step. Just assume Hooke's law between them, and go with it. There are some pitfalls in that too, which I can tell you how to get around once you find problems, but it's still easier than trying to solve a multiple-collision.

Otherwise, if you prefer to do collision at-once, you need to consider two motions separately. The motion along the line connecting centers and motion perpendicular to it.

Motion along the line is a simple 1D collision. You'll need some sort of coefficient telling you how elastic collision will be, and then solve for conservation of momentum and energy loss appropriate for your coefficient.

The tangential component is more complicated if you want the spheres to have spin and surface friction. This is another reason to run it step-by-step. You can then just take force between spheres, use it as normal force, and with coefficient of friction figure out what the tangential force at the surface is.

I'd have to think about it a while to tell you how, or even if, it can be done in collision at-once. (It simply isn't done that way, normally, so I'd have to derive a few things from scratch.)

Edit: If you want, I can send you a source code for a simple pool simulation I wrote some time ago. It's not very clean, but it works, and you might pick up a few useful things from it.
 
  • #3
You understand that all I need to find is the direction of the impulse right? I don't need the magnitude. Also really don't want any source code to spend hours digging through. This is evidently much hard than I thought. Also I'm just assuming everything has an elasticity of 1.
 
  • #4
Heh. Can't blame you for not wanting to read the code.

Alright. If you assume a collision of two hard spheres with elasticity of 1, this problem can be greatly simplified.

Basically, you can disregard any tangential forces. Both spheres will preserve their angular momentum, and therefore their original angular speed.

The direction of impulse is then simply along the line that passes through centers of mass. So impulse for sphere 1 will have direction:

[tex]I_x = x_1 - x_2[/tex]
[tex]I_y = y_1 - y_2[/tex]
[tex]I_z = z_1 - z_2[/tex]

Properly normalized, of course, as you originally suggested.

The actual speeds will only matter as far as magnitude of the impulse, not direction.
 
  • #5
Are you sure? It doesn't seem to be working right
 
  • #6
How are you computing the actual magnitude of the impulse?
 

1. How do I determine the direction of impulse in a 3D system?

To find the direction of impulse in a 3D system, you need to calculate the vector sum of all the forces acting on the object. This can be done by using the principles of vector addition and considering the direction of each force in relation to the object's motion.

2. What is the difference between impulse and momentum in 3D?

Impulse and momentum are both vector quantities that describe the motion of an object in 3D. However, impulse is a measure of the change in momentum over time, while momentum is a measure of the object's motion at a specific point in time.

3. How does the angle of impact affect the direction of impulse in 3D?

The angle of impact refers to the angle at which a force acts on an object. In 3D systems, the direction of impulse is affected by the angle of impact as it determines the direction and magnitude of the force acting on the object.

4. Can the direction of impulse change during an object's motion in 3D?

Yes, the direction of impulse can change during an object's motion in 3D. This can happen if the direction of the forces acting on the object changes or if there is a change in the object's velocity or acceleration.

5. How do I use the equations of motion to find the direction of impulse in 3D?

The equations of motion can be used to find the direction of impulse in 3D by first calculating the net force acting on the object and then using this value to determine the change in momentum. From there, the direction of impulse can be determined using vector addition and considering the direction of the forces and the object's motion.

Similar threads

Replies
3
Views
945
Replies
3
Views
1K
Replies
1
Views
733
Replies
9
Views
1K
  • Classical Physics
2
Replies
61
Views
1K
Replies
3
Views
1K
Replies
14
Views
1K
Replies
14
Views
2K
Replies
1
Views
784
Replies
25
Views
8K
Back
Top