Find acceleration component to hit target in 2D plane

In summary: MattiasIn summary, Mattias' dad and he are having trouble finding the answer to a problem that is somewhat similar to projectile trajectory math, but with the difference that the projectile has an initial velocity. To solve the problem, Mattias suggests transforming it into the initial rest frame of the ship, but with acceleration, especially non constant acceleration, there might not be an analytical solution. If this is for a computer game, Mattias suggests solving it numerically by iteration. Under constant acceleration, an object always follows a parabolic trajectory.
  • #1
nook79
2
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
  • #2
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.
 
  • #3
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:
  • #4
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
 
  • #5


Hello Mattias,

Thank you for reaching out to us with your question. The problem you are describing is a common one in physics and can be solved using the principles of projectile motion.

To find the acceleration component needed to hit a target in a 2D plane, we can use the following steps:

1. Define the initial position and velocity of the ship: As you mentioned, we can set the initial position of the ship to (0,0) and the initial velocity to (vx, vy), where vx and vy are the x and y components of the initial velocity.

2. Define the target position: Let the target position be (xt, yt).

3. Calculate the displacement vector: The displacement vector is the distance and direction from the ship's initial position to the target. We can calculate this vector by subtracting the initial position from the target position: (xt - 0, yt - 0) = (xt, yt).

4. Calculate the time needed to reach the target: We can use the equation t = d/v, where t is time, d is distance, and v is velocity. In this case, the distance is the magnitude of the displacement vector, and the velocity is the maximum speed of the ship. So we have t = √(xt^2 + yt^2)/v.

5. Calculate the acceleration vector: The acceleration vector is the change in velocity over time. We can use the equation a = (vf - vi)/t, where a is acceleration, vf is the final velocity, vi is the initial velocity, and t is the time calculated in the previous step. Since we want the ship to reach the target, the final velocity should be equal to the velocity needed to hit the target, which is the displacement vector divided by the time calculated in step 4: vf = (xt, yt)/t. Substituting this into the equation, we get a = (xt, yt)/(√(xt^2 + yt^2)/v).

6. Calculate the angle of the acceleration vector: The angle of the acceleration vector can be found using the equation θ = tan^-1(ay/ax), where θ is the angle, ay is the y component of the acceleration vector, and ax is the x component of the acceleration vector.

By following these steps, you should be able to find the acceleration component or angle needed to hit the target in a 2D plane. Keep
 

1. How do you find the acceleration component to hit a target in a 2D plane?

The acceleration component can be found by first determining the initial velocity and position of the object, as well as the position of the target. Then, using the equations of motion, the acceleration component can be calculated by considering the time it takes for the object to hit the target.

2. What is the importance of finding the acceleration component in hitting a target in a 2D plane?

The acceleration component is crucial in predicting the trajectory of an object and ensuring it reaches the target accurately. Without calculating the correct acceleration component, the object may miss the target or hit it with the wrong velocity.

3. Can the acceleration component be negative in this scenario?

Yes, the acceleration component can be negative if the object is slowing down in the direction towards the target. This can occur if there is a force acting against the motion of the object, such as friction or air resistance.

4. What other factors besides acceleration affect hitting a target in a 2D plane?

Other factors that can affect hitting a target in a 2D plane include the initial velocity, the position and velocity of the target, as well as external forces acting on the object, such as gravity or wind.

5. Can the equations of motion be used to find the acceleration component in all scenarios?

While the equations of motion can be used to find the acceleration component in most scenarios, there may be certain cases where other equations or methods may be needed. It is important to carefully consider all factors and variables involved in order to accurately determine the acceleration component.

Similar threads

Replies
4
Views
870
Replies
17
Views
17K
Replies
4
Views
1K
Replies
14
Views
1K
  • Introductory Physics Homework Help
Replies
9
Views
231
Replies
4
Views
1K
Replies
14
Views
2K
Replies
6
Views
3K
Replies
4
Views
1K
Replies
3
Views
899
Back
Top