Bending Of Waves Around An Object In Javascript