Actually, this is the same old Ducky, rendered to grayscale, split apart by gray-scale level, vectorized with POTrace, and then recombined. We are going to use this PDF to demonstrate some other ways to make shades of gray; this time using tiling Patterns. The key to this is this illusion:
In this illusion we have a gray background upon which are white lines and black lines; in the square delineated with the black lines we see a darker gray than the outer square with its white lines, hence the illusion. But if you think of this printed on paper, gray is essentially created by varying the density of ink in an area, so if this illusion were printed on paper, your eyes would correctly be reporting that the inner square has a higher ink density than the area around it.
So now, what we are going to do with old-time Ducky is replace the deviceGray fills with tiling patterns whose content fills the tile with roughly the same amount of (black) ink as an entirely gray tile.
In this first variation, we are going to create a pattern of lines, varying the line width to control how much black will be in the tile.
The result (click to see full-size):
In this next variation, instead of using straight lines, we are going to draw sawtoothed lines.
And finally, instead of lines, we’ll draw rectangles to fill the tile area:
The code for replacing DeviceGray fills with Pattern fills is basically the same:
Note that this code takes advantage that the recombined color shapes are all grouped together by color value, so it starts a new pattern when the grayscale color value changes. If this assumption does not apply, then you would want another method of re-using patterns for a given color value.