In the image at top left you see the basic effect: the two ends of a straight line segment passing behind an obscuring rectangle appear offset when, in fact, they are aligned. Place your mouse pointer over the image (or tap it) to convince you of this.

On the right is a variation where the width of the occluding rectangles can be varied or they can be made partially transparent. I selected the starting value of the rectangle width so that the oblique lines appeared offset by nearly half of their distance.

This illusion was discovered in 1860 by physicist and scholar JC Poggendorff, editor of Annalen der Physik und Chemie, after receiving a letter from astronomer F. Zöllner. In his letter, Zöllner described an illusion he noticed on a fabric design in which parallel lines intersected by a pattern of short diagonal lines appear to diverge (Zöllner’s illusion). Whilst pondering this illusion, Poggendorff noticed and described another illusion resulting from the apparent misalignment of a diagonal line; an illusion which today bears his name.

Interestingly, the flag of the United Kingdom (picture on the right) is designed with shifted oblique lines, perhaps to compensate (the bottom-left to top-right red line) and to “over-compensate” (the other oblique red line) for this effect? I added the green translucent overlays to bring this out (→more details).