Physics Help Forum 2d collision ,angular velocity, friction

 Kinematics and Dynamics Kinematics and Dynamics Physics Help Forum

 Dec 19th 2008, 08:46 AM #1 Junior Member   Join Date: Dec 2008 Posts: 2 2d collision ,angular velocity, friction im developing a 2d physics engine. its very simple at the moment, circles can collide with each other and with stationary polygons. but i would like to add a new dimention to my solution: friction. this would then also introduce angular velocity to my particles. so here is my question: at the point of collision between 2 moving circles I know the following: circle1 with center P1, radius r1,mass m1, velocity V1, angular velocity w1; circle2 with center P2, radius r2,mass m2, velocity V2, angular velocity w2; and ive got a point of contact C and a normal N to one of the circles center at the point, and a friction coefficient mu. i want to calculate the following: the change in linear velocity for each ball; dV1 and dV2, and the change in angular velocity for each ball; dw1 and dw2. im a programmer, not a mathematician or physicist, so help is much appreciated. if you could show me simple formulas i can implement that would be perfect. the variables i gave i use a capital letter in the name to indicate it is a vector.
 Jan 19th 2009, 12:37 PM #2 Senior Member   Join Date: Dec 2008 Location: Las Cruces NM Posts: 256 When you say you are devloping a physics engine, do you mean that it only has to have a visually appealing representation of collisions? Or is it supposed to show actual physics? It's an interesting question whether the actual physics can be worked without representing how the bodies deform during impact. Consider the idealized situation of a head on collision between two "perfectly rigid" spheres, approaching each other at the same speed. Before the collision one sphere has velocity + v and afterward it bounces back with some velocity (probably -v if we assume no energy loss). But if there is an instant of time where both spheres are motionless, and then where did all the energy of motion go? In a real collision it goes into deforming the spheres. With rigid spheres you must say (paraphrasing the Wizard of Oz) "Pay no attention to the little time instant behind the curtain!". The relevance of this to your problem is that you want friction to affect the collision. For this to happen (in reality) the colliding spheres must be in contact for more than zero time. What shall this time be? If this is a simulation of billiards where all the spheres are roughly identical then perhaps you can make a seat-of-the-pants assumption about the time they are in contact. You also must make some assumption about the force that presses the spheres together during this time. It might be easier to consult a billards expert and fit a curve to empirical data!
 Jan 20th 2009, 06:00 AM #3 Junior Member   Join Date: Dec 2008 Posts: 2 well as ive learned in the current gaming industry, its about making it 'apear' as close to real to at least convince the user. im not a mathematician or physicist, so, i dont want to even think about anything more complex than what i desire the input and outcome to be. so i assume that the objects are perfectly rigid i have the variables i presented in the post. now can anybody give a formula or set of formulas to approximate my desired outcome to at least fool the average gamer that it was infact a perfectly elastic collision between these two rigid objects with a specific friction coefficient between the surfaces of the said objects. my engine works on a simulation that calculates the 'aproximate' time the first collision will occur,if at all, during a small time frame(1/60 of a second). then it advances the objects in the simulation by calculated time and then resolves all collisions, if any. a collision is defined as two objects 'aproximately' 'touching' each other. so at this point their linear velocities get adjusted as well as their angular velocities. if a collision did occur during the 1/60 second then the whole process is repeated for the remaining time frame. its very simple. im just making a simple 2D game with semi-realistic physics. not a complete physics simulator that can reverse calculate the time the big bang exactly started.
 Jan 20th 2009, 10:22 AM #4 Senior Member   Join Date: Dec 2008 Location: Las Cruces NM Posts: 256 There might be a few game programmers who also haunt physics forums, but I think you have a better chance of getting something useful on a programming forum. Being a Linux user, my favorite forum would be fedoraforum.org, which has a section on Programming. If you get some open source code, you can probably find the details as comments in the code. (There are lots of programs on the web that purport to be billiards simulations.). I can speculate on various equations, but I've never tested them for visual plausibility. Another approach: If you can generate a set of example collisions that come out the way you like them, it should be possible to use multi-variable curve fitting to create formulas. That's more a math problem than a physics problem.
 Jan 20th 2009, 10:34 AM #5 Senior Member   Join Date: Dec 2008 Location: Las Cruces NM Posts: 256 I found a physics paper that deals with this topic: Impulsed-based Simulation of Rigid Bodies http://www.google.com/url?q=http://www.cs.berkeley.edu/~jfc/papers/95/ibsrb95.pdf&sa=X&oi=revisions_result&resnum=1&ct=r esult&cd=1&usg=AFQjCNHfk1iUDLIWSWCZ13XS49wSBoRN1Q

 Thread Tools Display Modes Linear Mode

 Similar Physics Forum Discussions Thread Thread Starter Forum Replies Last Post ling233 Kinematics and Dynamics 0 Jan 9th 2016 05:09 AM ling233 Kinematics and Dynamics 0 Dec 25th 2015 03:03 AM wildhockeyfan34 Energy and Work 1 Apr 8th 2010 11:07 PM Hellbent Kinematics and Dynamics 7 Nov 20th 2009 02:28 PM orgoistough Advanced Mechanics 1 Oct 31st 2008 09:14 PM