# How come we see a line when there isn't one in this picture?

I got this picture I generated myself and I don't understand how come we can see two diagonal lines when, I think, there is no actual lines.

Zooming in:

Center: Just another 2px wide square…

After thinking about it, I think it might come from the fact that, if you zoom really closely, it is only a succession of square, each time 2px smaller and of a different color.

Although there is no actual line directly built, we can see the corners of each square clearly and, together, our brain understand this as two diagonal lines. … I might just have answered my own question but I would appreciate your opinion/confirmation on this.

• That is so cool! I'm not sure what's going on any more... Jul 12, 2015 at 3:07
• What is supposed to be in the center? Also what format are the pictures in and is there any compression? Jul 12, 2015 at 15:09
• @StrongBad Added a picture of the center, just a 2px wide square. I generated it using PhotoImage in tkinter in Python, assigned each pixel one by one, creating the bigger square first then smaller and smaller (not very efficient, but pretty to watch it being built) then saved it as a png with PhotoImage.write, I don't know the compression or anything else, I left it by default. Jul 12, 2015 at 17:05
• My guess is it is a rendering artifact. The corner pixels have a different number of same color pixel neighbors from edge pixels, so they are in fact a different color when draw on the screen. Jul 12, 2015 at 17:25
• @StrongBad I checked, it isn't. When I zoomed on the rendered picture (from a screenshot for instance) it looks exactly the same as when zoomed on the actual picture. Nice guess though, I didn't think about that. Jul 13, 2015 at 4:24

I can't zoom in on the picture, but what I see is bleeding from one color into the next along the diagonals (most evident in the green to blue and purple to red transitions). Are you saying that they are not there when you zoom in? I would think that because there is a gradient in the color transition, the gradient has to be emphasized in an angled meeting, more pronounced the sharper the angle (e.g.if it were a triangle, the angle would be 120° as opposed to 90°). It's not an optical illusion.

In short, you see two transecting lines on the diagonal because they are strongly suggested. The mind sees this accurately and reads the suggestion.

It is kind of like asking, why, in the following picture, do I read all the dotted lines as lines, where only two of them are actually solid lines?

Or, if you will, why do I see curves here?

Because the color differences in the offset squares are really there, suggesting a familiar curve, though in this question, it would be fair to ask Why do the curves appear smooth? In fact, the curves are not smooth.

If you do want to see interesting optical phenomenons,

• stare at the center of your image for 30 seconds, then scroll down to the blank area next to my diagrams. You will see squares of reciprocal colors not in your original (like a bright yellow.) Also interesting is that as the image fades, blinking will "refresh" it.

• after staring directly at the center for a minute or two, switch the focus very slightly to one side then back; you'll be pleasantly surprised by bursts of vibrant color parallel to each other each time you change.

Edited to add: This may be an optical illusion, but if it is, I'm unsure of what type it is. Looking at the zoomed image, clearly the impression is that there is some bleeding, but that's not the reality. Sorry I can't help more on this one. But it does get much more intriguing!

• Hi, thanks! I provided a zoom in in my question as suggested. Jul 12, 2015 at 2:59