Find acceleration component to hit target in 2D plane

Click For Summary

Discussion Overview

The discussion revolves around determining the acceleration component required for a ship to hit a defined target point in a 2D plane, given an initial velocity and constant acceleration, without the influence of gravity. The context includes considerations for maximum speed and the complexities introduced by multiple particles in a game-like scenario.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant suggests transforming the problem into the initial rest frame of the ship, noting that non-constant acceleration may complicate finding an analytical solution.
  • Another participant mentions that under constant acceleration, an object follows a parabolic trajectory and proposes constructing a parametric representation to find a trajectory that intersects the target point, while also acknowledging that a speed limit complicates this approach.
  • A later reply indicates that solving a quartic equation may be necessary, even without a speed limit, and expresses a preference for a pursuit curve method due to the complexity of simulating thousands of particles at a high frame rate.

Areas of Agreement / Disagreement

Participants express differing views on the feasibility of analytical solutions, particularly in the context of speed limits and the nature of acceleration. The discussion remains unresolved regarding the best approach to take.

Contextual Notes

Limitations include the potential for no analytical solution under certain conditions, the dependence on the definitions of acceleration and velocity, and the challenges posed by simulating multiple particles in real-time.

nook79
Messages
2
Reaction score
0
Hi. Me and my dad (math teacher) are having some trouble finding the answer to a seemingly fairly easy problem.

It is somewhat similar to projectile trajectory math but with the difference that the projectile have an initial velocity and there's no gravity, only acceleration.

Imagine the game Asteroids. The ship is floating at a certain velocity (x, y).
The ship can accelerate in any direction to move. The acceleration force is constant.
What I want is to find the acceleration component (or angle of acceleration vector) so that the ship will hit a defined target point (x, y).

I can offset all positions and angles so that the ship is at position (0, 0) and the target is at (x, 0) to make calculation easier.
One tricky part is that the ship has a maximum speed (magnitude of velocity component), but the initial velocity can be anything between 0 and maximum speed.

I'd be really happy to see some solution for this, with or without maximum speed of the ship.

Please ask if I'm unclear!

Thanks
Mattias
 
Physics news on Phys.org
I would transform the problem into the initial rest frame of the ship. But with acceleration, especially non constant acceleration (speed limit) there might be no analytical solution. If this is for a computer game, you can solve it numerically by iteration.
 
Under constant acceleration, an object always follows a parabolic trajectory. Just construct the parametric representation of a general parabolic trajectory that has the pre-defined initial position and velocity, and then solve which one of these parabolas goes through the target point.

EDIT: if there's a speed limit, this does not work in all cases
 
Last edited:
Thanks! Sorry for the late reply, the response notification ended up in my trash box.

We came to the conclusion that I would have to solve a quartic equation (even without speed limit), and since it's not really one ship but thousands of particles updating at 60 fps I think I'll have to stick with my current pursuit curve like method.

I'll check out the parabolic trajectory suggestion first though. :)

cheers
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 47 ·
2
Replies
47
Views
5K
  • · Replies 17 ·
Replies
17
Views
19K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K