Understanding ray vs wave optics with a simple example