Deceleration formula for movement simulation

AI Thread Summary
The discussion centers on calculating deceleration for a 3D physics engine simulation, specifically aiming to accurately represent an object's movement over a set distance and time. The user attempts to simulate an object traveling 100,000 units in 1,700 milliseconds, but encounters discrepancies in both distance and time when applying a deceleration formula. They express frustration that while using average speed yields correct results, it fails to incorporate realistic deceleration effects. The conversation also touches on the need for clarity in defining the type of motion being simulated and the mathematical representation of the equations involved. Ultimately, the user seeks assistance in achieving a more accurate movement system that reflects real-world physics.
Moon54
Messages
17
Reaction score
1
Hi, i have one big problem with this simple formula, i tried many ways and combinations, but nothing worked how i wanted it.

Let's assume we have a distance, let's say it's 100000 units of any type, could be virtual since i am trying to program a 3d physics engine.

The object pass that distance in 1500ms in the first revolution, second one would be 1700ms. Now i have to calculate the speed, it will be:

100000 / 1500ms = 66,66 (Begin speed)

100000 / 1700ms = 58,82 (Ending speed)

Now as the deceleration formula says:

66,66 - 58,82 = 7,84

7,84 / 1700ms = 0,0046117647058824 ~ 0,0046118

That means the object losses 0,0046118 for 1ms.

The biggest issue with these calculations is it just doesn't fit the expected time or distance.

So if i do something like this:

speed = 66,66 - 0,0046118 = 66,6553882;
then i move the object in the system: distance += speed(66,6553882);
I will keep doing it for the next 1699ms left, i will found that the distance don't fit. The object should travel 100000units, in 1700ms, it don't have to be 100% accurate, but it should fit.

I did few simulations with the exact parameters, and what is going to happen, is the object will travel around 20% extra distance, or if i change the deceleration, the distance will be correct but the time will drastically change.

I found that the only way to imitate the real world movement is using average speed without deceleration, and when the object complete specific distance, change the speed to the next one, we just measure, in that case both time and the distance will be correct, but how can i imitate the deceleration loss per 1ms? There must be a way to get the data by timer, and do it. When the object lose speed, they do it by smaller intervals, then 1 second or even more.

I need help to finish my project, i will need accurate movement system and all what i have to do, is find a way to move the object by 1ms, and subtract the deceleration value at that time.
 
Physics news on Phys.org
Moon54 said:
The object pass that distance in 1500ms in the first revolution
What revolution? Is this circular motion?

Moon54 said:
it just doesn't fit the expected time or distance.
What expected time? Who is expecting what?

It sounds like you are taking very simple linear equations and making them sound very complicated. Please try to re-state your problem.

What are you trying to simulate? Linear motion? Circular motion?
Can you write the equations symbolically, no numbers, just distance d, speed s, acceleration a, time t?
 
anorlunda said:
What revolution? Is this circular motion?What expected time? Who is expecting what?

It sounds like you are taking very simple linear equations and making them sound very complicated. Please try to re-state your problem.

What are you trying to simulate? Linear motion? Circular motion?
Can you write the equations symbolically, no numbers, just distance d, speed s, acceleration a, time t?

What i am trying to do, is imitate in my 3d engine the data i get from real world.
The expected time, is 1700ms, and the distance around 100000, as i explained if the object from real world accomplish a full revolution in 1700ms, i know the deceleration value, then i should be able to mathematically represent what i saw, correct?

Yes, in this case it's circular motion. I use a line to represent the circle, so at 25000 is 90 degree, 50000 is 180, at 100000 it's 360 etc.

If you really need it in symbols. After i have the deceleration, it was something like:

d = d + (s - a);

Why i did d = d + (s - a)?

Because i want to add the new value to the old one, otherwise it's just adding the last, so by numbers:

0 = 0 + (66.66 - 0.04);

66.62 = 66.62 + (66.62 - 0.04);

133,2 = 133,2 + (66.58 - 0.04);

Keep going 1700 times, because that's the time of movement, at the end i should have 1700ms, and around 100000 of distance.

This 66.66 is the speed/ms, also 0.04/ms is the deceleration value.
distance.
 
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...
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...
Back
Top