Solving for Projectile Velocity for Intercepting A Moving Target

AI Thread Summary
The discussion focuses on calculating the initial velocity of a projectile to intercept a moving target while accounting for gravitational acceleration. The projectile has a fixed speed and experiences downward acceleration, while the target moves at a constant velocity. The key challenge is to determine the direction in which to aim the projectile so that it hits the target, which involves solving for the time of interception and the projectile's trajectory. Various equations are presented to model the motion of both the projectile and the target, emphasizing the need to calculate the time it takes for the projectile to reach the target's position. The scenario is likened to a hunter shooting an arrow at a bird in flight, illustrating the practical application of the physics involved.
QuaternionKid
Messages
3
Reaction score
0

Homework Statement



Find \vec{v}_{P} (initial velocity) for a projectile with an arbitrary\left\|\vec{v}_{P}\right\| (fixed initial speed), constant acceleration \vec{a}_{P}, and starting position \vec{p}_P so that it will intercept an object whose movement is described by the equation T(t) =\vec{v}_{T}\cdot t + \vec{p}_{T}.

All vectors are elements of R^{3}.

Homework Equations



Position of projectile:

P(t) = \frac{1}{2} \cdot \vec {a}_{P} \cdot {t}^{2} + \vec {v}_{P} \cdot t + \vec {p}_{P}

Position of target object:

T(t) =\vec{v}_{T}\cdot t + \vec{p}_{T}.

Unknowns:

\vec{v}_{P} (Projectile velocity)

Knowns:

\left\|\vec{v}_{P}\right\| (Projectile speed)

\vec{a}_{P} (Projectile acceleration)

\vec{v}_{T} (Target velocity)

\vec{p}_{P,T} (Both Projectile and Target initial positions)For a general solution, the projectile's acceleration would be <{a}_{x}, {a}_{y}, {a}_{z}>, but I've been letting it be <0, 0, -9.8m/{s}^{2}> for my own convenience.

The Attempt at a Solution


I'm trying to give the AI of a video game I'm making the ability to "lead" moving targets with arrows which experience gravity drop. The arrows always come out at the same initial speed, so I need to solve for the direction in which to shoot them in order for them to hit a moving target.

I've solved the problem for projectiles which have a constant velocity by letting \left\| \vec{v}_{T}\cdot t + \vec{p}_{T} \right\| = \left\|{v}_{P}\right\| \cdot t + \left\|\vec{p}_{P}\right\|, simplifying, then finding the time of interception using the quadratic equation. You can basically just plug the time of interception into the target's position function to get the direction vector you have to aim into score a hit.

I don't know how to set up the solution for projectiles which have acceleration (gravity drop) though. So far I've tried to solve for each of the components individually, but that leads me to a place from where I don't know how to continue.
 
Last edited:
Physics news on Phys.org


Woo! My kind of question.

First, I'm not sure what you're asking, exactly, so I've answered with what I would do. I hope this helps, tell me if it doesn't.

So, I'm understanding that you have a flying object dropping some kind of bomb on a walking object.

Both of these objects move with constant velocity; that velocity is variable.

I'm also assuming that the ground is parallel to the motion of flight; if it's not, then this needs more work.

No matter what, we have to start by finding out how long it's going to take for the bomb to hit the ground, and I don't believe yours is the most efficient way. Once we find that time, then we can determine how far the target moves in that time and thus designate out \vec{v}_x and \vec{v}_z to garuntee collision.

But first, time.

Under constant acceleration, we may use:

y_f = y_o + \frac{1}{2}(v_{yo} + v_{yf}) * t

Where t = time for the object to hit the ground
(y_f - y_o) = the total height the object falls
\frac{1}{2}(v_{yo} + v_{yf}) = average velocity of the fall under constant acceleration (remember that change in velocity is linear under constant acceleration, making averages as acurate as anything).

t = \frac{(y_f - y_o) * 2}{v_{yo} + v_{yf}}

This is nice, but v_{yf} needs help.we can use the following to keep the variables simple.

v_{yf}^2 = v_{yo}^2 + 2a(y_f - y_o)

v_{yf} = \sqrt{v_{yo}^2 + 2a(y_f - y_o)}

thus, the time that it will take for the bomb to reach the ground, given its initial velocity, height and acceleration under gravity is:

t = \frac{(y_f - y_o) * 2}{v_{yo} +\sqrt{v_{yo}^2 + 2a(y_f - y_o)}}This means you can shoot the bomb down how ever fast you like and still find out how long it will take.

If we ignore movement in the y direct, for the sake example, then all we need to do now is solve for the x and z components of the bombs' velocity such that they will be over the target at time t.

This also means that we'll need to know where the target will have moved in time t, given it's initial velocity in the x and z direction, shall we work that out aswell?
 


Thanks for your response!

Only the target will be moving with a constant velocity, however. I probably wasn't clear enough in my statement of the problem. The projectile itself will have a fixed initial speed, but will undergo constant acceleration.

An example situation closer to what I'm going for would be a hunter with a bow and arrow trying to shoot a bird that is mid-flight, assuming the bird is flying at a constant velocity. When the hunter shoots his arrow, the arrow's initial speed must be set to, say, 30 m/s. However, during its flight towards the bird, gravity will pull down on the arrow and will reduce the z component of its velocity. I would need to find \vec {v}_{i} for the arrow so that its \left\|\vec {v}_{i}\right\| = 30 m/s and so that it will also hit the bird, who is moving.
 


I see.

My equation does solve for the case of vertical acceleration, but I was confused on the initial conditions that you're looking to solve in, can you please describe that?

Is it the hunter scenario?
 


AJKing said:
I see.

My equation does solve for the case of vertical acceleration, but I was confused on the initial conditions that you're looking to solve in, can you please describe that?

Is it the hunter scenario?

Sure, sorry for the confusion. Yes, the hunter scenario best describes what I'm aiming for. I've edited the original post to make it clearer to anyone else who sees it.

Here are the equations governing the motions of the projectile and the target, and below those, the unknown and known variables.

Position of projectile:

P(t) = \frac{1}{2} \cdot \vec {a}_{P} \cdot {t}^{2} + \vec {v}_{P} \cdot t + \vec {p}_{P}

Position of target object:

T(t) =\vec{v}_{T}\cdot t + \vec{p}_{T}.

Unknowns:

\vec{v}_{P} (Projectile velocity)

Knowns:

\left\|\vec{v}_{P}\right\| (Projectile speed)

\vec{a}_{P} (Projectile acceleration)

\vec{v}_{T} (Target velocity)

\vec{p}_{P,T} (Both Projectile and Target initial positions)
 
Kindly see the attached pdf. My attempt to solve it, is in it. I'm wondering if my solution is right. My idea is this: At any point of time, the ball may be assumed to be at an incline which is at an angle of θ(kindly see both the pics in the pdf file). The value of θ will continuously change and so will the value of friction. I'm not able to figure out, why my solution is wrong, if it is wrong .
TL;DR Summary: I came across this question from a Sri Lankan A-level textbook. Question - An ice cube with a length of 10 cm is immersed in water at 0 °C. An observer observes the ice cube from the water, and it seems to be 7.75 cm long. If the refractive index of water is 4/3, find the height of the ice cube immersed in the water. I could not understand how the apparent height of the ice cube in the water depends on the height of the ice cube immersed in the water. Does anyone have an...
Back
Top