Where did the waste energy go to? A ball rolls off the ramp on the edge of a table heading downward and hits the ground. Was the energy lost or gained a direct relation to the distance that the metal ball travelled along the ramp?

heat

depends how far vertically down the ramp
d sin theta