Jump to content

  • Log In with Google      Sign In   
  • Create Account


Calculate direction vector after collision


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 Slig Commando   Members   -  Reputation: 334

Like
0Likes
Like

Posted 01 March 2013 - 07:49 PM

So I am trying to figure how to properly identify an objects new direction after colliding with another object. So if I know a bodie's acceleration, velocity, direction it is moving, ect..., how would you go about this? Say a ball is moving towards a wall, I im not sure which direction to apply force at the collision point to that body. I am sure it has something to do with the dot product of the two colliding bodies, but can anyone give some insight?

Sponsor:

#2 DT....   Members   -  Reputation: 487

Like
0Likes
Like

Posted 01 March 2013 - 11:39 PM

http://www.essentialmath.com/GDC2012/Richard_Tonge_solvingRigidBodyContacts.pdf



#3 EWClay   Members   -  Reputation: 659

Like
1Likes
Like

Posted 02 March 2013 - 02:03 AM

For a wall, it's easy. The force direction is always the wall's normal vector (neglecting friction).

For other bodies the force direction depends on the shape and the point of contact.

The velocity of the bodies after collision depends on the masses of the bodies and the restitution, as well as the contact normal. But again, for a perfectly bouncing ball against a wall the solution is easy: reverse the component of velocity along the wall's normal vector.

#4 Bacterius   Crossbones+   -  Reputation: 8523

Like
0Likes
Like

Posted 02 March 2013 - 05:07 PM

The velocity of the bodies after collision depends on the masses of the bodies and the restitution, as well as the contact normal. But again, for a perfectly bouncing ball against a wall the solution is easy: reverse the component of velocity along the wall's normal vector.

 

Gravity still applies while the wall and ball are in contact. This is irrelevant for rigid collisions but becomes important for other types of collisions (notably, soft-body).


The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis


#5 EWClay   Members   -  Reputation: 659

Like
0Likes
Like

Posted 02 March 2013 - 06:51 PM


The velocity of the bodies after collision depends on the masses of the bodies and the restitution, as well as the contact normal. But again, for a perfectly bouncing ball against a wall the solution is easy: reverse the component of velocity along the wall's normal vector.


Gravity still applies while the wall and ball are in contact. This is irrelevant for rigid collisions but becomes important for other types of collisions (notably, soft-body).

Gravity is quite far down the list of effects to consider. Given the nature of the question, I'm sure frictionless rigid bodies is a good starting point.

#6 Bacterius   Crossbones+   -  Reputation: 8523

Like
1Likes
Like

Posted 04 March 2013 - 06:01 PM

Gravity is quite far down the list of effects to consider. Given the nature of the question, I'm sure frictionless rigid bodies is a good starting point.

 

I was just highlighting that other forces don't suddenly stop acting upon collision, and must still be considered (and added to the collision response force properly) if the collision time is nonzero (for rigid bodies, it is zero, which is why I said that this is irrelevant for rigid collisions). So in fact gravity is not even on the list of effects to consider.


The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS