- #1
amn
- 1
- 0
Hi all,
I am trying to code a simulation that pins two bodies against each other and animates their motion. I am using Sun and Earth as example, with preset positions and velocities, and Newtons Law of Universal Gravitation formula. It all works quite alright, up until I have decided to link my animation to a real clock source, which immediately presented the problem of obtaining acceleration, velocity and position vectors not just iteratively as I was used to, but at an arbitrary point in the future. We're talking delta-T here. I am not sure how to approach this problem.
Formally, say I have masses, position, acceleration, velocity vectors for both bodies and want to calculate position after a time interval T in the future.
Will there be definite integration involved?
I am trying to code a simulation that pins two bodies against each other and animates their motion. I am using Sun and Earth as example, with preset positions and velocities, and Newtons Law of Universal Gravitation formula. It all works quite alright, up until I have decided to link my animation to a real clock source, which immediately presented the problem of obtaining acceleration, velocity and position vectors not just iteratively as I was used to, but at an arbitrary point in the future. We're talking delta-T here. I am not sure how to approach this problem.
Formally, say I have masses, position, acceleration, velocity vectors for both bodies and want to calculate position after a time interval T in the future.
Will there be definite integration involved?