- #1
Nagransham
- 5
- 0
Hi there guys.
As the title implies I'm trying to draw a trajectory on the screen (yes, this is indeed about programing :P) involving multiple sources of gravity.
Here is my dilemma: Since I'm working with an update loop there would be no problem to just simulate an object and having it leave a trail. However it would have to travel the whole relevant distance in order to show the complete trajectory. This is problematic because the trajectory depents on input, so it has to be able to change instantly (as in a few ms / a single update) and needs to be drawn completely, instantly.
I found some formulas that looked promising, which seem to be able to do a lot of stuff with very little information and calculation, however I'm pretty sure i didn't find anything involving multiple sources of gravity. And frankly I'm not sure if there even is such a thing.
Luckily the only thing i need to make this work is the ability to find out where an object will be after a given time. And this, at least to me, sounds like it's far easier to do. Because then i can just play connect the dots and I'm ready to go.
Unfortunately I'm not really sure how to do this :/
So... i guess my question is this:
How could i figure out where a given object (providing it's starting position, velocity and direction) is after a given time, while beeing affected by multiple sources of gravity ?
Also: it's a little hard to figure out where to post this since it's math and also physics... so... if I'm totally off here, feel free to tell me.
I hope i was able to get my question across, since I'm terrible at talking about things i don't fully understand in the first place ;) Also english is not my native language, so show mercy :)
As the title implies I'm trying to draw a trajectory on the screen (yes, this is indeed about programing :P) involving multiple sources of gravity.
Here is my dilemma: Since I'm working with an update loop there would be no problem to just simulate an object and having it leave a trail. However it would have to travel the whole relevant distance in order to show the complete trajectory. This is problematic because the trajectory depents on input, so it has to be able to change instantly (as in a few ms / a single update) and needs to be drawn completely, instantly.
I found some formulas that looked promising, which seem to be able to do a lot of stuff with very little information and calculation, however I'm pretty sure i didn't find anything involving multiple sources of gravity. And frankly I'm not sure if there even is such a thing.
Luckily the only thing i need to make this work is the ability to find out where an object will be after a given time. And this, at least to me, sounds like it's far easier to do. Because then i can just play connect the dots and I'm ready to go.
Unfortunately I'm not really sure how to do this :/
So... i guess my question is this:
How could i figure out where a given object (providing it's starting position, velocity and direction) is after a given time, while beeing affected by multiple sources of gravity ?
Also: it's a little hard to figure out where to post this since it's math and also physics... so... if I'm totally off here, feel free to tell me.
I hope i was able to get my question across, since I'm terrible at talking about things i don't fully understand in the first place ;) Also english is not my native language, so show mercy :)