Bug/Feature in tiling code (probably in agg)
I have been using a "stack of smoked glass" in a few places for the illusion of depth. e.g. this
appears in my "crystals" design http://www.contextfreeart.org/gallery/view.php?id=1447)
One thing that was bugging me is that the design didn't tile nicely, and that there were dark "seams" at the tiling joins. These are not visible on the uploaded images, as they appear at the edge of the image, but if you tile them (e.g. set to desktop) then they are quite obvious.
It turns out that this is not a problem with the tiling code missing polygons that span the tile join, as I first thought (the crystals code generates 10 000 000 's of polygons, so I thought that some were only being rendered on one side of the seam). Instead, it seems (seams?) to be a problem with polygons such as the SQUAREs above that have two sides that meet perfectly once wrapped around the torus. If you offset each square in the above code like this:
then the joins appear across the middle of the image.
My workaround is to fudge things around so that the seams don't end up on top of each other, but are successively offset by some irrational(ish) numbers:
I don't know whether this gets filed as a feature or a bug, and if it is a bug, whether it is easily fixed - it is likely to be a result of agg trying to do sub-pixel resolution at the boundary, and picking up both edges.
appears in my "crystals" design http://www.contextfreeart.org/gallery/view.php?id=1447)
One thing that was bugging me is that the design didn't tile nicely, and that there were dark "seams" at the tiling joins. These are not visible on the uploaded images, as they appear at the edge of the image, but if you tile them (e.g. set to desktop) then they are quite obvious.
It turns out that this is not a problem with the tiling code missing polygons that span the tile join, as I first thought (the crystals code generates 10 000 000 's of polygons, so I thought that some were only being rendered on one side of the seam). Instead, it seems (seams?) to be a problem with polygons such as the SQUAREs above that have two sides that meet perfectly once wrapped around the torus. If you offset each square in the above code like this:
then the joins appear across the middle of the image.
My workaround is to fudge things around so that the seams don't end up on top of each other, but are successively offset by some irrational(ish) numbers:
I don't know whether this gets filed as a feature or a bug, and if it is a bug, whether it is easily fixed - it is likely to be a result of agg trying to do sub-pixel resolution at the boundary, and picking up both edges.
