Collision Detection in 2D Motion

AI Thread Summary
To implement collision detection in a 2D motion simulation of a ball being thrown, one must consider the ball's elasticity and the flat, stationary ground. The simulation can use basic physics equations to update the ball's position and velocity over time, factoring in gravitational acceleration. Upon impact, if the ball is elastic, the vertical component of its velocity should be inverted, while the horizontal component may be dampened. For a more detailed simulation, assumptions about energy transfer and deformation during the bounce can be included. Ultimately, the approach can vary in complexity based on the desired accuracy of the simulation.
kachilous
Messages
15
Reaction score
0
I have created a very simple numerical simulation that models an object being thrown off a building at some angle, and when the object hits the ground, the simulation stops. Now I want to add in collision detection. How would I go about doing this? What would be the equations needed to compute the new values of time, velocity and position?
 
Physics news on Phys.org
What's the shape of the object and the ground? Is the object spinning? Are you interested in just the moment of impact, or you want to know what happens afterward?

If you want to know what happens afterward, you need to make some assumptions about the elasticity, how it deforms, and how much rotational energy is transferred to the ground.
 
It is a ball that has elasticity. I expect the ball to bounce upon impact with the ground. The ground is a flat surface that is stationary
 
It depends on how thorough you want to be. The easiest thing to do is just simulate with a constant step size, and do something like
a_y(t+dt) = a_y(t) - g*dt
v_y(t+dt) = v_y(t) + a_y(t)
y(t+dt) = y(t) + v(t)
if y(t) < 0, then {
y(t+dt) = 0
v_y(t+dt) = -elasticity*v_y(t)
v_x(t+dt) = damping*v_x(t)
}

Of course, you didn't say how detailed your simulation is.
 
No, there's something even easier. If the collision is perfectly elastic (which is very close to true for bouncy balls), and the thing it is hitting is very massive (like the ground or a wall), then you just flip the direction of the velocity vector component that is normal to the surface of collision.
 
Hi there, im studying nanoscience at the university in Basel. Today I looked at the topic of intertial and non-inertial reference frames and the existence of fictitious forces. I understand that you call forces real in physics if they appear in interplay. Meaning that a force is real when there is the "actio" partner to the "reactio" partner. If this condition is not satisfied the force is not real. I also understand that if you specifically look at non-inertial reference frames you can...
This has been discussed many times on PF, and will likely come up again, so the video might come handy. Previous threads: https://www.physicsforums.com/threads/is-a-treadmill-incline-just-a-marketing-gimmick.937725/ https://www.physicsforums.com/threads/work-done-running-on-an-inclined-treadmill.927825/ https://www.physicsforums.com/threads/how-do-we-calculate-the-energy-we-used-to-do-something.1052162/
I have recently been really interested in the derivation of Hamiltons Principle. On my research I found that with the term ##m \cdot \frac{d}{dt} (\frac{dr}{dt} \cdot \delta r) = 0## (1) one may derivate ##\delta \int (T - V) dt = 0## (2). The derivation itself I understood quiet good, but what I don't understand is where the equation (1) came from, because in my research it was just given and not derived from anywhere. Does anybody know where (1) comes from or why from it the...

Similar threads

Back
Top