Deceleration formula for movement simulation

Click For Summary
SUMMARY

The discussion focuses on calculating deceleration for a 3D physics engine simulation, specifically addressing the challenge of accurately modeling movement over a defined distance and time. The user attempts to simulate an object traveling 100,000 units in 1,700 milliseconds with an initial speed of 66.66 units/ms and a final speed of 58.82 units/ms. The key issue identified is that the calculated distance exceeds the expected value, leading to the conclusion that using average speed without deceleration may yield more accurate results. The user seeks a method to implement deceleration in smaller intervals to better mimic real-world movement.

PREREQUISITES
  • Understanding of basic physics concepts such as speed, distance, and acceleration.
  • Familiarity with 3D physics engine programming.
  • Knowledge of linear and circular motion equations.
  • Experience with time-based simulations in programming environments.
NEXT STEPS
  • Research "Implementing deceleration in physics simulations" for practical techniques.
  • Explore "Average speed calculations in motion simulation" to refine movement accuracy.
  • Study "Numerical integration methods for physics engines" to improve simulation fidelity.
  • Learn about "Circular motion equations in game development" for better representation of motion.
USEFUL FOR

Game developers, physics engine programmers, and anyone involved in simulating realistic movement in 3D environments will benefit from this discussion.

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.
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
1K
  • · Replies 5 ·
Replies
5
Views
8K
  • · Replies 46 ·
2
Replies
46
Views
11K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 19 ·
Replies
19
Views
4K
  • · Replies 22 ·
Replies
22
Views
998
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 17 ·
Replies
17
Views
4K