Simulating the transition between two media in the Shive wave machine