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.

Let's say I have a projectile being thrown by a player in my 2-D game. I want to work backwards and find the initial velocity to apply to the projectile such that it passes through a target point in space given that the launch point might not be at $y=0$.

Some applications of this would be a basketball shot simulator or a pub darts simulation.

Given:

  • initial or launch angle: $\theta_o$
  • initial or launch height: $y_o$
  • target point: ($x_f$, $y_f$)
  • constant acceleration due to gravity ($g$)
  • air resistance ignored

I need to find:

  • initial launch velocity: $v_o$

Here's an image of what I'm talking about.

enter image description here

I am interested in learning the derivation of the answer not just a formula that I plug-and-chug. Thanks!

share|improve this question

closed as too localized by David Z Mar 14 '13 at 19:39

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Hi z8000, and welcome to Physics Stack Exchange! Why wouldn't your result be correct? I don't mean that as a rhetorical question - on this site we like to see questions about the "whys." If all you're looking for is for someone to check your work, that's not the sort of thing we do here, but if you have some reason to believe that your formula is wrong and you want to understand that reason in more detail, just edit your question to reflect that and I'll be happy to reopen it. –  David Z Mar 14 '13 at 19:39
    
You can check it by just plugging it in to your original equation, you know. Sometimes answers look a little hairy in physics. Another way to check would be to enter some obvious cases and see if it works, like if $y_0$ is 0 it becomes simpler. –  krs013 Mar 14 '13 at 19:45
    
Hi z8000. If you haven't already done so, please take a minute to read the definition of when to use the homework tag, and the Phys.SE policy for homework-like problems. –  Qmechanic Mar 14 '13 at 22:20
    
I dove deeper and figured this out myself. If you open up the question, I'd be happy to post my answer. –  z8000 Mar 17 '13 at 3:55
    
Determine the initial velocity $v_0$ of a projectile launched from $(x_0, y_0)$ at angle $\ \theta$ such that its trajectory passes through point $(x_f, y_f)$ while traveling under constant acceleration due to gravity, ignoring air resistance, ignoring Earth's rotation. Note: $a$ is acceleration, $v_0$ initial velocity, $r$ position, $g$ gravity, $x(t)$ and $y(t)$ refer to the position of the projectile at time $t$. –  z8000 Mar 17 '13 at 5:23
show 3 more comments