Recently I’ve been revisiting everything I learnt about physics in school.
So, as far as I’m aware:
What am I getting wrong?
Recently I’ve been revisiting everything I learnt about physics in school.
So, as far as I’m aware:
What am I getting wrong?
The calculator uses distance after impact, while you are using time after impact (to decelerate to a complete stop). Plug in 0.54 m into the calculator and it gives a similar answer to yours calculated for 0.1 s post-impact.
As a practical matter in an intro physics lab, it’s far easier to measure how far the ball sank into the clay than to try to time it with a stop watch.
Oh, that’ll teach me to pay more attention to webpages. :smack:
Are there any equations which are helpful for working out what the distance or deceleration time would be?
Ask a detailed question. Right now all we’ve got is you musing about acceleration, velocity, time, and distance.
In a real-world collision you can’t assume conservation of energy, you can’t assume a constant rate of acceleration, etc. That’s very different from idealized elastic or inelastic collisions of point-bodies.
So what are you trying to accomplish: Review Physics 101, establish or validate some rules of thumb about motor vehicle accidents, something completely different, etc.?
Help us help you.
Oh, sorry. If you want some background, I’m working on a 2D platformer engine which can take into account the momentum of the player character.
So, to make my question more specific: If I’m trying to simulate an impact against a surface with no, or practically no, give what sort of value should I use for time or distance (since I can’t really divide I by 0, and 0.1 is clearly too high)?
The answer is “it depends”. As you’ve discovered, stopping in 0 distance requires infinite force. (Hence the divide by zero.) What counts as “close enough to zero” depends on the scale of the objects in your game and the precision of your floating point (single or double).
If the impactor is macro-sized and smooshy, e.g. a human falling from great height onto concrete, then the first bit of the person to make contact will stop in a small fraction of a millimeter. As the person compresses, the other end will slow to a stop over the length of the body, e.g. 1.5 - 2 meters. You can’t accurately model the person as a rigid point source which uniformly decelerates without deforming.
Deciding whether or how the person will bounce is also not simple.
Qualitatively it’s mostly like what happens when you drop a beanbag in your kitchen. Squoosh and stay put mostly.
Conversely, if it’s something small and stiff and not going very fast, e.g. an egg-sized rock hand-thrown against a concrete wall, then the whole thing will decelerate over a small fraction of a millimeter with essentially zero deformation. And it will rebound intact at a very large fraction of the incoming speed. Mostly like a pool ball banking off a rail.
Note that for both people and rocks the behavior changes as the speed of impact goes up. The rock will do very different things at 10, 100, and 500 mph. Ditto people at 5, 20, 50, 100, and 500 mph.
Ultimately, science will give you some guidelines on what would be totally unrealistic & fake looking. But you’ll have to use your game designer chops to decide what impact & bounce behavior looks coolest without doing too much violence to photorealism. Life was easier in the early days of Pong; nobody expected realistic physics or dramatic effects. Now they want both.