2D trajectory calculation with constant force

In summary, the player controls an object in open space by selecting a point in space and a constant force is applied to the object. The predicted trajectory is based on the object's current velocity and a chosen point in space. If the velocity is greater than zero, the object orbits around the chosen point with an elliptic orbit.
  • #1
orcishhorde
3
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
  • #3
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.
 
  • #4
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.
 

FAQ: 2D trajectory calculation with constant force

What is a 2D trajectory calculation with constant force?

A 2D trajectory calculation with constant force is a mathematical calculation that predicts the path of an object in a two-dimensional space when a constant force is applied to it. This calculation takes into account the initial position, velocity, and acceleration of the object, as well as the magnitude and direction of the constant force.

What is the formula for calculating a 2D trajectory with constant force?

The formula for calculating a 2D trajectory with constant force is: x(t) = x0 + v0x*t + (1/2)*a*x*t^2 y(t) = y0 + v0y*t + (1/2)*a*y*t^2 where x0 and y0 are the initial positions, v0x and v0y are the initial velocities in the x and y directions, a is the constant force, and t is the time.

How accurate is a 2D trajectory calculation with constant force?

The accuracy of a 2D trajectory calculation with constant force depends on the accuracy of the initial parameters and the assumptions made in the calculation. Generally, the calculation can provide a good estimation of the object's path, but it may not account for external factors such as air resistance or friction.

Can a 2D trajectory calculation with constant force be used for real-world applications?

Yes, a 2D trajectory calculation with constant force can be used for various real-world applications, such as predicting the trajectory of a projectile, calculating the motion of a satellite in orbit, or designing a roller coaster.

What are the limitations of a 2D trajectory calculation with constant force?

A 2D trajectory calculation with constant force assumes that the force remains constant throughout the object's motion, which may not be the case in real-world situations. Additionally, it does not take into account other factors such as air resistance, wind, or changing gravitational forces.

Similar threads

Back
Top