2D trajectory calculation with constant force

AI Thread Summary
The discussion focuses on calculating the 2D trajectory of a spaceship in a game, where a constant force is applied towards a chosen point in space. The user seeks to predict the object's future positions to draw its trajectory, noting that the motion resembles an elliptical orbit but is not a closed ellipse due to the nature of constant force. After reviewing kinematic formulas and astrodynamics articles, the user implemented the Runge-Kutta order 4 integration algorithm, which successfully addressed their needs for trajectory prediction. The solution allows for accurate representation of the object's motion over time. The problem has been resolved with the new integration method.
orcishhorde
Messages
3
Reaction score
0
Hello folks, I need some physics help.

Some background to get us on the same rails :)
I am developing a 2D game in my spare time. Player controls an object (aka spaceship) in open space (no gravitation influence) by selecting a point in space. A constant force which is always pointed at the chosen point is applied to the object. You may read it like this: spaceship's engine with variable thrust vector constantly gives its maximum thrust towards the chosen point.
Object's mass never changes and stays the same.

I want to draw a predicted trajectory based on object's current velocity and a chosen point in space. To do that I need to calculate object's position in the future. For example, 10 discreet values - position after 1 second, after 2, 3, ..., 10. It will be enough to draw the line.

Observable object's behaviour:
If velocity is > 0 when a point is chosen, object starts orbiting around that point with elliptic orbit. Cool ^^. I just have no clue how to accurately "predict" that motion.

I revisited kinematic formulas (hello, school), recalled how vectors work (hello again, school) but it seems that this motion is somewhat more complex... I've even looked through some astrodynamics articles on wikipedia but formulas there are for gravitational forces and I can't get my head around them anyway :/
 
Physics news on Phys.org
  • Like
Likes orcishhorde
A.T. said:
Constant force magnitude doesn't create closed ellipses in general.
Well, it is kinda "elliptic". I mean it is not constant enclosed ellipse but the object orbits in elliptic fashion and never travels further than specific distance.

And thanks for the link, I'll see if there is what I seek.
 
A.T. said:
Holy crab, these articles are so freakin' awesome! I have implemented "Runge-Kutta order 4" integration algorithm and it WORKS! It does exactly what I need. I can't thank enough for this link.

My problem is solved.
 
Hi there, im studying nanoscience at the university in Basel. Today I looked at the topic of intertial and non-inertial reference frames and the existence of fictitious forces. I understand that you call forces real in physics if they appear in interplay. Meaning that a force is real when there is the "actio" partner to the "reactio" partner. If this condition is not satisfied the force is not real. I also understand that if you specifically look at non-inertial reference frames you can...
I have recently been really interested in the derivation of Hamiltons Principle. On my research I found that with the term ##m \cdot \frac{d}{dt} (\frac{dr}{dt} \cdot \delta r) = 0## (1) one may derivate ##\delta \int (T - V) dt = 0## (2). The derivation itself I understood quiet good, but what I don't understand is where the equation (1) came from, because in my research it was just given and not derived from anywhere. Does anybody know where (1) comes from or why from it the...
Back
Top