The distortion/waving effect is made by mapping a circle, and changing it's position with a sine and cosine formula for each scanline. Feel free to mess around with this project and maybe create your own.