How can energy be transferred back forth between kinetic energy and potential energy?