Calculating object position with non-constant speed

  • Context: Undergrad 
  • Thread starter Thread starter caibbor
  • Start date Start date
  • Tags Tags
    Position Speed
Click For Summary

Discussion Overview

The discussion revolves around calculating the position of an object moving with non-constant speed, specifically when the speed decreases linearly over time. Participants explore the implications of this scenario in the context of programming a particle engine, as well as the mathematical underpinnings of distance calculation based on varying speeds.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant presents a scenario where they run at 5 mph and then linearly decrease to 1 mph, questioning their position after 30 minutes.
  • Another participant suggests sketching a velocity vs. time graph to find the area under the curve, indicating it would be a trapezoid, but emphasizes the importance of clarifying the time frame for deceleration.
  • A different participant introduces a variation involving three points (A, B, C) and calculates positions based on initial velocity and acceleration, but receives feedback on the accuracy of their acceleration value.
  • One participant calculates the average speed over the first half-hour as 4 mph and the second half-hour as 2 mph, leading to a distance of 2 miles in the first half-hour and 1 mile in the second.
  • Another participant challenges the acceleration value used in the calculations, suggesting a different value and prompting questions about the accuracy and simplicity of the method employed.

Areas of Agreement / Disagreement

Participants express differing views on the calculations involved, particularly regarding the average speed and acceleration values. There is no consensus on the correct approach or final answers, as various methods and interpretations are presented.

Contextual Notes

Some calculations depend on the assumptions made about the time intervals and the nature of acceleration. The discussion highlights the complexity of deriving positions based on non-constant speeds without a clear resolution on the best method to use.

caibbor
Messages
19
Reaction score
0
The problem (long story short) to use an analogy... if I stand here, and then immediately run 5mph for an hour, after 30 minutes I have run 2.5 miles. But if I instead linearly drop from 5mph to 1mph over the course of that hour, where do I stand after 30 minutes?

The speed is linear so I don't think this quite breaks into calculus, but I've been banging my head over this for a while.

Reasoning:

I'm trying to program a particle engine and calculate movement without storing origins since they won't be drawn on screen unless they're within the view frustum and therefore particles off screen that are moving around that suddenly come on screen would not be in the proper place. So the calculations have to be made without any state variables.
 
Physics news on Phys.org
caibbor said:
The problem (long story short) to use an analogy... if I stand here, and then immediately run 5mph for an hour, after 30 minutes I have run 2.5 miles. But if I instead linearly drop from 5mph to 1mph over the course of that hour, where do I stand after 30 minutes?

The speed is linear so I don't think this quite breaks into calculus, but I've been banging my head over this for a while.

Reasoning:

I'm trying to program a particle engine and calculate movement without storing origins since they won't be drawn on screen unless they're within the view frustum and therefore particles off screen that are moving around that suddenly come on screen would not be in the proper place. So the calculations have to be made without any state variables.

I don't know about the particle engine part, but the calculation of distance run is easy - sketch a graph of velocity vs time. The area under that graph will be the distance covered. In this case, your area will be a trapezoid.

Before you sketch the graph, you have to be clear whether you're decelerating from 5mph to 1mph over 1 hour or half-hour. It makes a big difference.
 
Well, I've got some food for thought on this. I gave a more explicit variation of the problem to a friend which goes as follows:

A particle at is going to travel past three non-evenly separated points A, B, and C in a straight line on the x-axis. The particle starts at 0.0 seconds at point A at (0,0) moving at 5 units right per second. It linearly slows down until it reaches point C at 1.0 seconds moving 1.0 units per second. Along the way, it passes through point B at 0.5 seconds. Where is point B and C?


The friend gave the following answer, where A is accelleration.


Iv = 5.0 u/s
A = -1.0 u/s/s

x_pos at 0.0 Sec
Final Velocity = 5.0 + (-1.0 * 0) = 5.0
Distance = .5 * (5.0 * 5.0) * 0 = 0

x_pos at 0.5 Sec
Final Velocity = 5.0 + (-1.0 * 0.5) = 4.5
Distance = .5 * (5.0 + 4.5) * (0.5) = 2.375

x_pos at 1.0 Sec
Final Velocity = 5.0 + (-1.0 * 1) = 4.0
Distance = .5 * (5.0 + 4.0) * (1) = 4.5


relevant: http://en.wikipedia.org/wiki/Equations_of_motion
 
caibbor said:
The problem (long story short) to use an analogy... if I stand here, and then immediately run 5mph for an hour, after 30 minutes I have run 2.5 miles. But if I instead linearly drop from 5mph to 1mph over the course of that hour, where do I stand after 30 minutes?

The speed is linear so I don't think this quite breaks into calculus, but I've been banging my head over this for a while.
As long as acceleration is constant, as here, the "average speed" is just the arithmetic average of the speeds at the beginning and ending. If speed drops linearly from 5 to 1 mph then the average speed over that time is (5+1)/2= 3 mph. In 1/2 hour you will have gone 3/2 mile.

Reasoning:

I'm trying to program a particle engine and calculate movement without storing origins since they won't be drawn on screen unless they're within the view frustum and therefore particles off screen that are moving around that suddenly come on screen would not be in the proper place. So the calculations have to be made without any state variables.
 
So my friend was wrong. How did you calculate that?
 
HallsofIvy said:
As long as acceleration is constant, as here, the "average speed" is just the arithmetic average of the speeds at the beginning and ending. If speed drops linearly from 5 to 1 mph then the average speed over that time is (5+1)/2= 3 mph. In 1/2 hour you will have gone 3/2 mile.

Close, but no cigar! :smile:

The average speed for 1 hour is 3 mph so you go 3 miles in the full hour.

But, the average speed for the first half hour is 4 mph and the average for the second half hour is 2 mph. So you go 2 miles in the first half hour, and 1 mile in the second.
 
caibbor said:
Iv = 5.0 u/s
A = -1.0 u/s/s
etc

The method is OK.
But A = -4.0, not - 1.0.
 
AlephZero said:
The method is OK.
But A = -4.0, not - 1.0.

x_pos at 0.0 Sec
Velocity = 5.0 + (-4.0 * 0.0) = 5.0
Distance = .5 * (5.0 + 5.0) * (0.0) = 0

x_pos at 0.5 Sec
Velocity = 5.0 + (-4.0 * 0.5) = 3.0
Distance = .5 * (5.0 + 3.0) * (0.5) = 2

x_pos at 1.0 Sec
Velocity = 5.0 + (-4.0 * 1.0) = 1.0
Distance = .5 * (5.0 + 1.0) * (1.0) = 3

yes? if this method is "okay," is there a better one? more accurate or, perhaps simpler?
 

Similar threads

Replies
38
Views
5K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
60
Views
5K
  • · Replies 23 ·
Replies
23
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K