How does the frequency of a wave relate to the energy of the wave?