when a wave , whether it be light or sound , transitions from one medium to another where the speed of the wave is significantly different , the wave is diffracted in a different direction than it was previously moving .