Refraction at a Plane Surface

Animation shows two rays originating from a source ( white dot ) in a denser medium undergoing refraction at the interface with air. The refracted rays (yellow) are produced backwards (dotted lines) to locate the point of divergence (yellow dot) of the rays. The rays refracting from two very close points on the surface when received by an observer make him perceive the object to be at the position of the yellow dot.
Swipe/drag to the left of the the object in the blue area to change objects location.
Swipe/drag in the grey area to change both angles of incidence.
Swipe/drag any where else to change the refractive index.