- #1

- 7

- 0

I want to calculate a body x and y position at a particular z value in 3D space when applying particular force and impulse.

Appreciates all the help!

Tnx

Dona

You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Thread starter Dona123
- Start date

- #1

- 7

- 0

I want to calculate a body x and y position at a particular z value in 3D space when applying particular force and impulse.

Appreciates all the help!

Tnx

Dona

- #2

- 7

- 0

Thanks

- #3

rcgldr

Homework Helper

- 8,749

- 553

For each time step, you calculate

new_velocity = old_velocity + time_step x average_acceleration

One way to do this is to use trapezoidal method

average_accleration = 1/2 (acceleration0 + acceleration1)

where acceleration0 is the acceleration at the start of a time step and acceleration1 is the acceleration at the end of a time step. This requires you be able to calculate acceleration1 directly or to be able to predict it via an iterative method (see below)

You can then calculate position once you calculate the new velocity, using the same method:

new_position = old_position + time_step x 1/2 x (old_velocity + new_velocity)

An iterative corrector method will improve the results. In the algorithm shown below, a

v

p

a

v

p

a

v

p

a

v

p

a

v

p

...

v(t) = v

p(t) = p

a(t) = F(p

time += Δt

t += 1

This is a predictor-corrector type algorithm:

http://en.wikipedia.org/wiki/Predictor-corrector_method#Euler_trapezoidal_example

Share:

- Replies
- 1

- Views
- 1K