In the video below you see two lines that are alternately shifted a bit to the left and the right relative to each other. Or are they? When the lines are presented continuously, you can clearly see that they are not shifted at all. They are perfectly aligned!
This is a variation of the Flash Grab illusion, designed by Patrick Cavanagh and Stuart Anstis, the same duo that is responsible for this illusion. Below you can see another animation, which shows the same Flash Grab illusion in a very different way. This one is more like the original, in which the two lines appear to be alternately rotated slightly clockwise and counterclockwise, even though they are perfectly horizontal/ vertical.
So what's going on here? According to Cavanagh and Anstis, there are two phenomena that together result in the illusion. It's a bit of a challenge to follow the logic, but here we go.
The first factor is illusory trajectory shortening: We tend to perceive movement trajectories as being a bit shorter than they really are. In the case of the first video, this means that we perceive the background figure to reverse its direction just before it actually does. In the case of the second video, this means that the disc appears to rotate slightly less than the 90 degrees that it actually rotates.
The second factor is assimilation: The flashed lines are assimilated by the moving background figure. They somehow melt into a single percept. This effect is particularly pronounced when the lines are flashed right on top of an edge, or some other landmark, of the background figure, which is the case in the videos. The consequence of this assimilation is that the trajectory shortening that affects the background figure is transferred to the flashed lines.
Now for the tricky part: An important aspect of the illusion is that the lines are flashed exactly at the moment that the movement reverses. And because movement trajectories appears to be shorter than they are, the edges of the figure appear to be displaced at the moment of the movement reversal. More specifically, they appear to be displaced in the direction opposite from the movement prior to the reversal. And that's what causes the illusion!
Cavanagh, P., & Anstis, S. (2012). The Flash Grab Effect. Poster presented at the annual meeting of the Vision Science Society, Naples, FL, United States. [Link: Abstract]