Calculating Velocity Vector After Polygon Collision - Madison

AI Thread Summary
Madison is developing a 2D game and needs help calculating the resulting velocity vector after a polygon collision. The collision detection is straightforward, but determining the new velocity vector post-collision is challenging. The discussion clarifies that during a totally inelastic collision, the perpendicular component of the object's velocity to the collision edge should be eliminated, allowing the object to move parallel to the edge. A suggested equation for the final velocity vector involves projecting the initial velocity vector onto the edge vector of the polygon. Madison confirms that the provided equation effectively solves the problem.
mbrown3391
Messages
6
Reaction score
0
I am currently programming a 2-dimensional game and am creating a class that will allow for collision detection with any polygon defined by a set of points. The actual collision detection was easy, however i am having trouble coming up with an equation to describe the resulting velocity vector of an object after the collision.

http://www.cheeseparade.com/diagram.png

Based on the diagram above, can anyone give me an equation that will return the blue vector as a function of the green vector, regardless of the angle of the green vector? All the red points are known information at any given time.

Thanks,
Madison
 
Last edited by a moderator:
Physics news on Phys.org
I'm not quite sure what I'm looking at here... what should the relationship be between the blue vector and green vector? Or in other words, what kind of physical situation are you trying to simulate? What happens to the object that collides with the polygon?
 
when the object collides, the component of its velocity that is perpendicular to the edge that it collides with should be eliminated so that the object continues on a path parallel to the edge. i don't need to worry about bouncing at this point.
 
OK, I see... you're talking about a totally inelastic collision. I'm assuming you have (or can calculate) the velocity vector \vec{v} as well as the vector pointing along the edge of the polygon in the direction of the blue arrow, which I'll call \vec{p}, and also that you either have or can write a function to take dot products. Then you can just project \vec{v} on to \vec{p} to get your final velocity:
\vec{v}\,' = \frac{\vec{v}\cdot\vec{p}}{\vec{p}\cdot\vec{p}}\ \vec{p}

Incidentally, a general formula for inelastic collisions can be found on Wikipedia, http://en.wikipedia.org/wiki/Coefficient_of_restitution.
 
Thank you! that equation worked perfectly.
 
The rope is tied into the person (the load of 200 pounds) and the rope goes up from the person to a fixed pulley and back down to his hands. He hauls the rope to suspend himself in the air. What is the mechanical advantage of the system? The person will indeed only have to lift half of his body weight (roughly 100 pounds) because he now lessened the load by that same amount. This APPEARS to be a 2:1 because he can hold himself with half the force, but my question is: is that mechanical...
Some physics textbook writer told me that Newton's first law applies only on bodies that feel no interactions at all. He said that if a body is on rest or moves in constant velocity, there is no external force acting on it. But I have heard another form of the law that says the net force acting on a body must be zero. This means there is interactions involved after all. So which one is correct?
Thread 'Beam on an inclined plane'
Hello! I have a question regarding a beam on an inclined plane. I was considering a beam resting on two supports attached to an inclined plane. I was almost sure that the lower support must be more loaded. My imagination about this problem is shown in the picture below. Here is how I wrote the condition of equilibrium forces: $$ \begin{cases} F_{g\parallel}=F_{t1}+F_{t2}, \\ F_{g\perp}=F_{r1}+F_{r2} \end{cases}. $$ On the other hand...
Back
Top