Why zebras have stripes has long been something of a mystery. We have a pretty good idea they’re used as protection, but the exact mechanism isn’t totally understood. I mean, why would evolution pick out that? The black on white is like a semaphore for savannah predators, saying Eat at Joe’s wherever the zebras go. (Charles Darwin himself mentioned that the “stripes cannot afford any protection in the open plains of South Africa.”) Thanks to a computer simulation, researchers now have a better idea.

With a motion-detecting algorithm, a pair of researchers from the University of Queensland and the University of London simulated the movements of a herd, and determined that the stripes provide zebras with not one, but two, optical illusions that keep other animals from chowing down on them.

The first is what’s called the wagon wheel effect. Imagine a spinning helicopter blade. When the spin of the blade reaches a certain speed, you get the illusion that it starts spinning in the opposition direction. The same goes for any spoked wheel (hence the name).

The second optical illusion zebras use is what’s known as the barberpole illusion. Even though barbershop poles move horizontally, when you watch them, it looks like the stripes are moving down vertically. (Which, you know, isn’t possible.)

The stripes on zebras, the researchers suggest, induce both of these illusions, which can ward off insects and possibly predators. From the study: “We suggest that the observer’s visual system is flooded with erroneous motion signals that correspond to two well-known visual illusions: (i) the wagon-wheel effect (perceived motion inversion due to spatiotemporal aliasing); and (ii) the barber-pole illusion (misperceived direction of motion due to the aperture problem), and predict that these two illusory effects act together to confuse biting insects approaching from the air, or possibly mammalian predators during the hunt, particularly when two or more zebras are observed moving together as a herd.”

So there you go! Advice: if you’re trying to avoid someone, gather in a crowd and wrap yourselves in black-and-white shawls and run as fast as you can.