what factors affect potential and kinetic energies