Problem on angular momentum synthesis

Started by
7 comments, last by cococool 22 years, 4 months ago
Hello everyone, I'm currently developing a Pool3D game. What makes my brain hurt is the angular momentum synthesis. It's easy to make it if ball spinning disabled. But in order to obtain more realistic effect ball spinning must be enabled. Then things get much more complicated! My project can be accessed at Pool3D.zip (Size: 0.49M) Any suggestions are appreciated. Thanx so much! Edited by - cococool on November 29, 2001 10:07:39 PM
Advertisement
Don''t have time to look at the demo, but it would be *really* cool if your pool game were able to support balls that jump up in the air and collide back down on the table to do the various tricks that pros do in competition. Is there any pool game that supports this sort of trick? Seems like a very cool opportunity for a pool game.

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
The rigid body demo at www.nvidia.com is very cool. Doesn''t look to include rotational effects, but since you''re doing a Pool game, you should definitely look at the demo:

http://developer.nvidia.com/view.asp?IO=Rigid_Body_Demo

The demo is quite awesome.

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
actually virtial pool 3 supports balls jumping in the air as well as rotational spin on the balls. also you can try "3d ultra cool pool" by sierra (will have to get the demo at fileplant) also supports ball jumping and english.

i hope one day as well to make a decent pool game, but the physics portion has scared me off a bit since i want it to be accuarte to the point i can setup an trick shot form a billards book and set the simulation in motion and it works correctly.
Here is a blurb on angular momentum. It''s been a while (4 years) since I''ve used that stuff, so I''ll be making this up as I go. Pay no attention to the physicist behind the curtain. Your mileage may vary. Do not taunt Happy Fun Ball.

       Fr  Ft    <----B---->       ## ##      #     #      #     #     #   O   #      #     #      #     #       ## ##         A--------> Fr + Ft 


Assume that your collision creates a force Fr+Ft in A,
corresponding to a torque effect (Fr) and a linear effect (Ft).
If you move the force from A to B, Fr will change direction (read up on torque), but Ft will not.

Yet there is no force exerced on B. Thus, Fr(B) and Ft(B) cancel each other. Which means that Fr = Ft.

So, when you get a collision, half of the force contributes to linear momentum, and half to angular momentum.

Now, since we are doing a simulation, the collision is considered to be instantaneous, and we are working with impulses rather than forces. (An impulse is the integral of a force over time.)

Two impulses are involved in the collision. The impulse normal to the surface that will bounce the ball back, and the impulse tangent to the surface, corresponding to friction.

With a perfectly elastic collision, the normal impulse is equal to 2.M_ball.V_normal, which is just enough to reverse the normal velocity vector of the ball. With 1.M_ball.V_normal, your ball won''t bounce at all (inelastic collision). In between...

As for friction, what matters is the tangent velocity of point A (which I assumed was the point of your collision). This velocity is due both to the linear velocity and the angular velocity of the ball.

If it is non-zero, the impulse depends on the coefficient of dynamic friction for sliding motion, and is opposed to the velocity in A.

If it is zero and yet the ball is moving, the ball is actually rolling. The impulse then depends on the coefficient of dynamic friction for rolling motion, is opposed to the velocity of the ball (so that the ball slows down, but the velocity at the contact point remains zero). This coefficient of friction is LESS than the previous one (Once a ball stops skidding, it keeps rolling until it stops, and does not start skidding again.)

Finally, if the ball is motionless on a surface, static friction applies, with a coefficient LARGER than BOTH of the previous ones. This friction tries to prevent the ball to start moving. Which means that any force that you exert on the ball will be opposed by static friction, up to the point where you actually overwhelm it (the ball starts to move) and dynamic friction begins to apply.




That was a brain dump of what I remember on the topic. If that helps you turn your game into a best seller, I''ll be happy to take a mere 50% of the gross as my due payment. Or your soul if you''d rather (I have a contract ready for you).

- Yannick
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Thanks so much for your suggestions,

Fruny, I really like your "Happy Fun Ball", but how about adding another Fr+Ft at C ?

           Fr  Ft         <----B---->             ## ##     Fr+Ft          #     #   /      ----#     #--/-----     /   #   O   #C     /    /     #     #      /   /      #     #     /  /        ## ##     / /           A--------> Fr + Ft/ Pool Surface     /------------------ 


It seems to me in your explanation you only considered one impulse at a time, pardon me and correct me if I misunderstood what you said. That''s definitely a good tutorial on how to simulate a ball traveling and rolling on a surface.

Yes, the ball slides and then rolls along the X axis after hit by a force in the Y direction (Just follow me here). Then it collides with something and begins to spin, which is a rotation along the Z axis. So what will the synthesized rotation be?

In the pool model, at least we shall think about two impulses at a time: one from the pool surface friction, the other from ball-to-ball friction or ball-to-cush friction. But that''s much more complicated, for the rotation of the ball is not necessarily within a set plane. And that''s what various trick shots depends on.

The Rigid Body Demo IS cool. but still, it seems not include a horizontal rotation. I wonder how Virtual Pool 3 managed to make it.

Thanks for your help.
quote:Original post by Anonymous Poster
actually virtial pool 3 supports balls jumping in the air as well as rotational spin on the balls. also you can try "3d ultra cool pool" by sierra (will have to get the demo at fileplant) also supports ball jumping and english.


Cool! I may have to check that out.

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
I''m interested in the friction problem as described by Fruny.

I currently have a realistic friction model in my engine that can derive a friction force for two colliding and rotating bodies.

Basically I calculate the force require to make the contact velocity equal to zero. It''s a little expensive to calculate since it require a Matrix Inverse and it also requires a timestep (dt). However, it works really really well since it also considers static and kinetic friction...

Anyway, I was wondering how this would be done with impulses. This would effectivly eliminate dt from the equation. I''m already using impulses to make things bounce so it would be nice to have a complete impulse model...and maybe it''ll simplify my equations too.

Thanks for the input.

Tod.

http://homepage.mac.com/tod_baudais/
quote:Original post by tod_baudais
I''m interested in the friction problem as described by Fruny.


Tod,

You may want to consider starting a new thread...



Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net

This topic is closed to new replies.

Advertisement