Reader Robert wrote in to say, “As I drive across the Panhandle of Texas, I am wondering why the highway looks wet and shiny off in the distance but normal as one gets closer.”

For the same reason that cartoon characters lost in the desert often think they see an oasis: a mirage caused by refraction.

First, a quick physics lesson. Light moves slower through denser mediums and faster through less dense ones. As it travels through a given medium—say, air—it moves in a straight line. When it passes from one medium to another, though, and there’s a difference in density—say from air to water—the light waves change speed, which causes them to also change direction or refract, and then continue in a straight line on their new path.

An easy way to see refraction in action is to put a straw into a glass half-filled with water. From the top, it looks like the straw is bent or broken. From the side, depending on where in the glass the straw is, it might look like it grows wider below the water line or even detaches from the part above the water line.

Remember that you see objects because light reflects off of them and then travels to your eye. What’s happening here is light from the straw is reflecting and traveling to your eye through two different mediums—the air and the water. Above the water line, light travels directly from the straw to your eye through the air and doesn’t refract (technically it travels through air into the glass and back into air, but the refraction into and out of the glass causes little enough deviation to not matter). Below the water line, though, the light reflecting off the straw has to travel through the water into glass and then into air. This light changes medium and speed, so it refracts or bends on its way to you. Your eye and brain don’t account for refraction when looking at the straw (stupid brain), and assume the object to be where the light waves appear to originate from along a straight line. The top and bottom parts of the straw are in line with each other, but the light from them comes along two different lines, making the straw look broken after your visual system gets done with it.

What Robert is describing is also the work of refraction. Maybe you were driving around one day and thought you saw a puddle on the pavement a little ways down the road. Once you got to the spot where you thought you saw the water, it was gone. Looking farther down the road, you see another puddle, but that one also disappears as you get closer to it. You can chase the puddles all day, but you’ll never actually find one.

Light refracts not just when it moves through two different mediums like air and water, but also when it moves through different layers of the same medium that have different densities. As the sun beats down on the blacktop, it heats it up. The road, in turn, heats the air immediately surrounding it, keeping the air just above it warmer and less dense than the air farther up.

As light from the sky travels downward toward the hot road, it moves through these increasingly warm and less dense layers of air, changing speed and refracting as it moves through each one. It winds up taking a sort of u-shaped path down toward the road, then parallel to it and finally back up into the sky—where it may meet the eye of someone standing up the road.

When this refracted light reaches you, your brain and eye—like they did with the straw in the water—don’t account for all the bending it did along the way. They trace it back along a straight line and interpret that point as its origin and the location of the object. What you see, then, is a little bit of sky that appears to be sitting on the ground—an inferior mirage where the mirage is under the real object. Even as your brain and eye try to quickly make sense of what you’re seeing, the brain knows that sky on the ground doesn’t make sense, so you often wind up perceiving the mirage as water on the road reflecting the sky. Turbulence of the air also distorts the mirage, strengthening the effect.

Sand, like highways, is really good at holding onto heat and warming up the air near it, so these types of watery mirages often happen in deserts and can fool people into thinking there’s water nearby.