Advertisement

Speed reduction over time

Started by May 16, 2002 09:53 PM
3 comments, last by Thr33d 22 years, 9 months ago
Ok, I want to reduce speed as a result of friction over, say, a pool table, or traveling through a constant volume. Now, I don''t need exact physical accuracy, but I want to be able to calculate the speed + distance traveled over time at a variable number of frames per second. Unfortunatly I don''t have the math skills to do this, if someone could point me in the right direction (link, math, or code.) I just don''t really want to call a loop x# of times based upon how much time has passed based upon a curve for a constant time increment. Thanks in advance, -Michael
Personally I would use conservation of energy for this problem. Every frame calculate the work done due to friction, minus that from the kinetic energy last frame, and set it to the new kinetic energy.


Frictional Work Done (Joules) = Force (newtons) * Distance Travelled (metres)
Kinetic Energy (Joules) -= Frictional Work Done (Joules)

stuff you might want to know:
Kinetic Energy = 0.5 * mass * velocity^2
Force due to friction = Coeffecient of Resistance * Gravity
where ''0 < Coeffecient of Resistance < 1''


note that the Distance Travelled is the distanced travelled since the last frame.

good luck,
bangz.

I can write a little bit of code if you couldn''t understand that... Although i''m just to tired 2 do it now ;-)
Advertisement
Air friction is proportional to speed (if speed isn''t really high), so

F = k * v = m * a
-> dv = (k * v * dt) / m

While friction with a floor or wall is proportional to weight

F = k * m = m * a
-> dv = k * dt

I''m not sure about a rolling ball, but I would say that it''s proportional to weight too. I think friction of a rolling object is static, since the surface of the ball isn''t really moving on the floor, so it''s a slightly different problem.

You only need the dv equations, to write

speed = speed - dv

And in case you are wondering,
k = constant
v = speed
dt = time step
m = mass

Cédric
Technically, ideal rolling objects don''t ever slow down. All the energy is in the form of rotational motion, and the static friction provides the torque to make the ball roll. Because the ball isn''t sliding, no work is done by the friction force. Or something.

Obviously, this isn''t true, so that was a waste of a paragraph. Let me just remind you that the energy of the ball is the sum of the translational kinetic (.5 * m * V^2) AND rotational kinetic (.5 * I * w^2) energy. (w = omega, the rotational velocity, I = )

Rotational motion is a bitch. If I had my book here, I could simplify it all to something succinct, but alas....

I say ignore what I''ve written and kludge it.
I think what you first said was right. The reason why balls do slow down is that there isn''t a single point of contact; there is a surface because of deformation. I think an ideal ball would lose some speed initially to get rolling, but would then keep on rolling forever because the point of contact would be still, relatively to the floor.

It seems to me that the easiest way to apply friction would be to decrease speed by a constant, and adjust the rolling to the speed.

Cédric

This topic is closed to new replies.

Advertisement