Theory
Calculate the next position with an Euler step
In an Euler step, you use the current velocity to estimate the position one time step later.
The displacement in that step is velocity × time step.
Use: new position = current position + velocity × time step.
- Read position, velocity and time stepTake the current position, current velocity and time step from the problem.
- Calculate velocity × time stepWork out the intermediate step using the values from the problem.
- Add it to the positionWork out the intermediate step using the values from the problem.
A model has x = 10 m, v = 4 m/s and dt = 0,2 s. Calculate the next position.
- Read position, velocity and time stepPosition = 10 m. Velocity = 4 m/s. Time step = 0,2 s.
- Calculate velocity × time step4 × 0,2 = 0,8 m.
- Add it to the position10 + 0,8 = 10,8 m.