title: Ballistic curve problem
body: <p>Ok i know this is quite off-topic for programmers but still I need this for app, so here it is:</p>
  
  <p>Ballistic curve (without wind or any other conditions) is specified by these 2 lines:</p>
  
  <p><img src="https://upload.wikimedia.org/math/5/3/5/535f985cd3cd8eb7102226011d19d54c.png" alt="x coordinate"></p>
  
  <p><img src="https://upload.wikimedia.org/math/5/8/5/585fd34041ba67ec4b72a311de7aa974.png" alt="y coordinate"></p>
  
  <p>So, there is a problem that you got 3 unknown values: x,y and time t, but only 2 equations.
  You can't really compute all 3 with just these values, I got:</p>
  
  <ul>
  <li>velocity v</li>
  <li>angle Alpha</li>
  <li>origin coordinates</li>
  </ul>
  
  <p>Thus, you have to decide which one to specify.</p>
  
  <p>Now you have 2D tanks game, or anything like that, you know you have tank and using ballistic you have to shoot opponent down with setting angle and power.</p>
  
  <p>I need to know when the bullet hit the ground, it can be on-air as it fly, or precomputed.
  There comes up my problem. Which way to use? Pre-compute or check for hitting the ground in each step.</p>
  
  <p>If I would like to pre-compute, I would need to know height of terrain, which, logically would have to be constant as I don't know in which x coord. If I would know the X, it would mean that just in front of my turret is wall. So only way to get to result, when I hit the ground, would be with checking in intervals of time for hitting the ground. This is also good because the terrain doesn't have top be static yay! But isn't that too great overhead which could be made much simpler? Have you encountered with such problem/solution? </p>
  
  <p>Thanks in advance, btw the terrain can be flat, using lines or NURBS so I please for general solution, not specific as in which height you shoot in that will be impact.</p>