Take the 2-minute tour ×
Physics Stack Exchange is a question and answer site for active researchers, academics and students of physics. It's 100% free, no registration required.

How can I determine the needed initial velocity to make a 2d wind resistance free projectile (in computer simulation) reach maximum height at a certain x distance away, with launch position and target position on uneven ground?

share|improve this question

closed as off-topic by Dilaton, Manishearth Aug 12 '13 at 13:25

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Homework-like questions should ask about a specific physics concept and show some effort to work through the problem. We want our questions to be useful to the broader community, and to future users. See our meta site for more guidance on how to edit your question to make it better" – Dilaton, Manishearth
If this question can be reworded to fit the rules in the help center, please edit the question.

    
You can use the fact that when it reaches max height, it will be travelling horizontally, i.e. it will stop moving further up. –  udiboy1209 Aug 12 '13 at 4:49
    
You will have to calculate multiple trajectories based on varying initial conditions, and adjust according to the results. –  Bernhard Aug 12 '13 at 5:44

1 Answer 1

As I understand your question, you have a projectile, and, given target x and y coordinates and an x coordinate of your trajectory's peak, you want to vary the angle and speed of your launch to hit both locations. Is that correct?

I did the math out myself, so someone may want to double check (and I may have picked a very inefficient/inconvenient way to do this, so don't take my word as the holy gospel of physics problems), but my method was this:

If we say the projectile starts out above the target coordinates, and we know that it will take an equal amount of time to reach the trajectory's peak as it will to fall back to our starting level, then the total time in the air will be twice the time to reach the peak, plus an additional period of time to fall past the starting height to the target point. Call this (2t_max + t_height).

Since you can break a projectile's motion into components, you can also analyze your target's horizontal motion at a constant velocity. Given your target x coordinate, and a constant horizontal velocity, you can solve for the time it takes to travel that distance at that speed. Call that (t_x).

Now, obviously, the amount of time it takes to rise and fall to the target point is the same as the time it takes to travel horizontally to the target point. Mathematically, (2t_max + t_height = t_x). I went about this by solving for each of those three terms separately, and plugging in the results to get an equation in terms of initial velocity, angle of launch, and the x and y target coordinates. Next, you note that, since the horizontal component of velocity is constant, the x distance to the maximum is easy to solve for in terms of that component of velocity and the t_max term you solved for previously. Doing that gives you a system of equations with the max x coordinate and target x and y coordinates as knowns, and the initial launch speed and angle as unknowns.

If you've gotten there, solving the rest should just be algebra. I plugged into Wolfram Alpha because I didn't feel like solving and got a pretty unpleasant looking result, so it's possible there's a more elegant way to solve this that gives a more reasonable answer, or that my method doesn't actually work at all, but I hope this helps a bit.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.