title: Trying to incorporate the mass of a ball
body: <p>I'm having trouble trying to incorporate mass into my program (specifically, the mass of a basketball).</p>
  
  <p>So, first off, I used an equation to determine what the ball's velocity has to be in order to go through the hoop (with gravity factored in).  When I ran my program with just gravity, it went through the hoop perfectly, no problems.</p>
  
  <p>However, when I try an incorporate the mass of the ball, it completely misses the hoop (which, of course, can be expected, I suppose).  I'm just unsure about how I used my equations.  Can anyone here just clear up if I'm on the right track?</p>
  
  <pre><code>rim = ring(pos= vector(-0.6,-0.7,0), radius = 0.46, axis= vector(0,1,0))
  
  basketball = sphere(pos= vector(-4.9,-2,0), radius = 0.12, color = color.orange)
  basketball.velocity = vector(4.53, 6.01, 0)
  
  g = -9.8
  timeStep = 0.005
  basketball.mass = 0.623 #got this from the internet, in kg
  
  
  for x in arange(0, 3, 0.005):
      basketball.velocity.y = basketball.velocity.y + (g/basketball.mass)*timeStep
      basketball.pos = basketball.pos+basketball.velocity*timeStep
      rate(100)
  </code></pre>
  
  <p>Don't mind the position of the rim, there are reasons behind its position not being 0 everywhere.  I guess all I'm really asking is if, given that the velocity of the ball is correct, the mass of the ball is being incorporated in the program correctly.  And if not, what are some steps I can take to make it work right?</p>