title: example of point-based gravity in c++
body: <p>I am trying to figure out how to implement gravity into my application i'm creating. I have a sphere in Opengl and im wanting to give it gravity like a planet. so any small objects near it will &quot;fall&quot; to the surface of it.</p>
  <p>Im wondering if anyone could point me in the direction of a example in c++.</p>