added refraction!

much bugs, many error, such inefecient. but refraction.