title: 2D Projectile tracing path clarification
body: <p>Projectile tracing path Problem in 2D game:</p>
  
  <p>Assumption:</p>
  
  <p>We make the simplifying assumption that gravity is constant and that there is no wind or drag. The motion of the projectile is given by the following equations:</p>
  
  <p>x = x0 + v0t cos(theta)</p>
  
  <p>y = y0 + v0t sin(theta) + .5 g t^2</p>
  
  <p>where (x0, y0) is the initial position, v0 the initial velocity (magnitude only), theta the angle of discharge, and g the gravitational acceleration. Solving the first equation for v0t and substituting into the second, we get equation [1]:</p>
  
  <p>y = y0 + (x-x0) tan(theta) + .5 (g/v0^2) (x-x0)^2 / cos(theta)^2</p>
  
  <p>Calibration:</p>
  
  <p>Calibration is the process of determining the value of g from an actual projectile. To do that, we shoot a random projectile and capture:</p>
  
  <ol>
  <li>The starting point (x0, y0)</li>
  <li>The aim vector (v0, theta)</li>
  <li>A random point on the curve (x1, y1)</li>
  </ol>
  
  <p>Substituting the values into the equation [1] and solving for g, we get:</p>
  
  <p>g = (v0^2) * {[2 cos(theta)^2 (y1-y0) / (x1-x0)^2] - [sin(2theta) / (x1-x0)]}</p>
  
  <p>Application:</p>
  
  <p>Now that we have g, we can substitute it back into equation [1], which now can be used to trace the path of a projectile from any starting point and initial velocity. <strong>(this is the part I don’t understand)</strong></p>
  
  <p><strong>g=5.89</strong></p>
  
  <p><strong>(x0,y0) starting position = 0,0</strong></p>
  
  <p><strong>Initial velocity = 1-100</strong></p>
  
  <p><strong>Discharge Angle = 0-360</strong></p>
  
  <p><strong>can someone please explain how to get the full plotted path of the parabola for any initial velocity between 1-100, and for any discharge angle between 0-360, if the acceleration due to gravity is 5.89 (in this game), and the starting position is 0,0?</strong></p>
  
  <p><strong>I am a complete newb at math, all of this stuff not in bold lettering I found elsewhere and have been racking my brain over. Please assume I know nothing.</strong></p>