When one object sits in front of another in space, what happens at the location where the contours intersect each other? How can you create a sense of space between the object in front and the one behind?
Here’s a gray rectangle in front of a cross of white lines. All the edges are kept sharp. The result is that the rectangle appears to be sitting atop the lines, but it lies on the same two-dimensional plane.
If you soften all the edges of the white lines to an equal degree, the gray rectangle floats upward. This is how a camera would interpret a situation where two objects are on separate focal planes, assuming the camera was focused on the rectangle.
Instead, if you soften the edges of the rectangle and keep the white lines sharp, it looks like the camera has shifted its focus to the back plane. This creates a perceptual ambiguity. The gray rectangle still comes forward because it is superimposed, but the white lines also want to come forward because they’re in sharper focus.
Neither of these “photographic” interpretations is quite like the way we perceive things with our eyes. We don’t really see an entire area of a scene out of focus; we’re constantly adjusting our focus to create a sharp impression of the world.
Here is how I would suggest we might simulate our visual perception in paint. It’s similar to the photographic mode in #2, but this time the lines get progressively more out of focus as they pass behind the rectangle.
In addition, the vertical white line is softened to a greater degree than the horizontal line. The reason for this is the stereoscopic effect of our eyes. Since our eyes are set on a horizontal plane, vertical lines seen behind an object are doubled (and effectively blurred) more than the horizontal bars. You demonstrate this if you focus both of your eyes on your fingertip held in front of the mullions of a window.
In this detail from a Bouguereau, the contour of the farther leg of the angel figure is softened where it crosses the nearer leg.
In another of his paintings, the landscape lines are softened where they intersect the woman’s lower back.
And finally in this detail from a Waterhouse, the line of the green hill and the blue dress are softer where they cross behind the heads.