# Deceleration formula for movement simulation

• Moon54
In summary, the person is trying to program a 3d physics engine and has difficulty getting the movement to match the expected time or distance. The person has found that the only way to do this is to use average speed without deceleration and when the object completes a specific distance, change the speed to the next one.
Moon54
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.

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.

## 1. What is the deceleration formula for movement simulation?

The deceleration formula for movement simulation is a = (v - u) / t, where a is the deceleration, v is the final velocity, u is the initial velocity, and t is the time taken for the object to decelerate.

## 2. How is the deceleration formula used in movement simulation?

The deceleration formula is used in movement simulation to calculate the rate of decrease in velocity of an object over time. This information is then used to accurately simulate the movement of the object in a virtual environment.

## 3. What factors can affect the deceleration of an object?

The deceleration of an object can be affected by factors such as the mass of the object, the surface it is moving on, and external forces such as friction or air resistance. These factors can impact the rate at which the object slows down.

## 4. Can the deceleration formula be used for all types of movement?

Yes, the deceleration formula can be used for all types of movement, including linear, circular, and rotational motion. However, the specific variables used in the formula may differ depending on the type of movement being simulated.

## 5. How is the deceleration formula derived?

The deceleration formula is derived from the fundamental laws of motion, specifically Newton's second law which states that the acceleration of an object is directly proportional to the net force acting on it and inversely proportional to its mass. By rearranging this equation, we can derive the deceleration formula for movement simulation.

• Mechanics
Replies
5
Views
3K
• Mechanics
Replies
11
Views
2K
• Mechanics
Replies
9
Views
1K
• Mechanics
Replies
1
Views
1K
• Mechanics
Replies
11
Views
1K
• Mechanics
Replies
19
Views
3K
• Mechanics
Replies
15
Views
1K
• Mechanics
Replies
5
Views
893
• Mechanics
Replies
16
Views
10K
• Mechanics
Replies
3
Views
1K