Advertisement

finding midpoint using linear acceleration and resistance physics

Started by June 01, 2003 12:06 AM
1 comment, last by smoothhippo 21 years, 8 months ago
Ok, so I just implemented linear acceleration with linear resistance into the game... these are the equations I''m using: ; v = ((a-(k/m)*v)*delta_t)+v ; x = (0.5*(v0+v)*delta_t)+x I know the start point and the end point... I also know the acceleration(a), mass(m) and wind resistance(k)... Because my object will never reach zero (because of dividing to infinity), how would I go about finding when I need to apply negative acceleration to get the object to return to 0 velocity? In other words. I am looking to find out two things. #1: how can I find, using the above formulas, (or maybe a better one if you guys have one) the time that the velocity will equal zero when it''s a positive number, and I apply a negative acceleration? #2: how can I give a good estimation as to when to reverse the engine? I can''t find a good answer. I''ve spent the last 2 hours trying to figure this out with no results... I''ve had lots of crazy things happen (such as a spaceship that moves in a spring fashion), but nothing worth keeping If you guys can help, that would be much apreciated. If you''re having trouble conceptualizing, think like you would be if you were playing total annihilation. You tell the until to move from A to B, and at some time the unit needs to start slowing down... when is that time?
delta_t das sieht nach einem deutschen Physikschüler aus.
ok first your formula looks strange, it should look like
x = 0.5*a*(delta_t*delta_t) + v*delta_t + x
v = a*delta_t + v
and then either you just look if v changes from above zero to zero or vise versa (...???... I mean like the opposite).
Or you can calculate it with
v = a*t + v0
v = 0
0 = a*t + v0
t = -v0/a
Advertisement
quote:
Original post by smoothhippo
Ok, so I just implemented linear acceleration with linear resistance into the game... these are the equations I''m using:

; v = ((a-(k/m)*v)*delta_t)+v
; x = (0.5*(v0+v)*delta_t)+x

I know the start point and the end point... I also know the acceleration(a), mass(m) and wind resistance(k)... Because my object will never reach zero (because of dividing to infinity), how would I go about finding when I need to apply negative acceleration to get the object to return to 0 velocity?

In other words. I am looking to find out two things.
#1: how can I find, using the above formulas, (or maybe a better one if you guys have one) the time that the velocity will equal zero when it''s a positive number, and I apply a negative acceleration?

#2: how can I give a good estimation as to when to reverse the engine? I can''t find a good answer.

I''ve spent the last 2 hours trying to figure this out with no results... I''ve had lots of crazy things happen (such as a spaceship that moves in a spring fashion), but nothing worth keeping

If you guys can help, that would be much apreciated.

If you''re having trouble conceptualizing, think like you would be if you were playing total annihilation. You tell the until to move from A to B, and at some time the unit needs to start slowing down... when is that time?


v = u + at where
v = final velocity
u = initial velocity
a = acceleration
t = time

*Let v = 0.
*You know the initial velocity of the object, so sub that into u.
*a will be the acceleration of the object''s own "breaks" added to the acceleration due to friction\wind resistence\whatever else.
*solve for t.

You need to convert wind resistence into an acceleration. I don''t know the formula, but it''s based on the speed of the object and the surface area. You can get the speed from v = u + at again; depending on how accurate you want to be, a is either just the object''s breaks or the previous value for wind resistence.

So sub in the equation for wind resistence in terms of t, added to a, and solve v = u + at for v = 0. I think that''ll work
-------------"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."- Charles Babbage (1791-1871)

This topic is closed to new replies.

Advertisement