2D trajectory calculation with constant force

Click For Summary

Discussion Overview

The discussion revolves around calculating the trajectory of an object in a 2D game environment, where a constant force is applied towards a selected point in space. Participants explore the complexities of predicting the object's motion, particularly when it exhibits orbital behavior due to its velocity and the nature of the applied force.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant describes the scenario of a spaceship controlled by a constant force directed at a chosen point, seeking to predict its trajectory over time.
  • Another participant points out that a constant force does not create closed elliptical orbits in general, suggesting a misunderstanding of orbital mechanics.
  • A different participant acknowledges that while the motion may not be a closed ellipse, it can still exhibit an "elliptic" behavior within a specific distance from the point.
  • A participant shares that they successfully implemented the Runge-Kutta order 4 integration algorithm, which resolved their trajectory prediction issue.

Areas of Agreement / Disagreement

There is no consensus on the nature of the object's motion, as participants express differing views on whether the trajectory can be classified as elliptical. The discussion includes both agreement on the utility of the Runge-Kutta method and ongoing debate about the characteristics of the trajectory.

Contextual Notes

Participants reference the complexity of the motion and the limitations of traditional kinematic formulas in this context. There is also a mention of the dependency on the definitions of orbital behavior and the specific conditions of the force applied.

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   Reactions: 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.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 24 ·
Replies
24
Views
4K
  • · Replies 3 ·
Replies
3
Views
8K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 2 ·
Replies
2
Views
5K