Previous: Statistics, Up: Hidden surface removal

##### 4.4.3.2 Bugs and anomalies

Polygon and line splitting can both cause anomalies in the output. `PSTricks` dash patterns, specified with `linestyle=dashed`, can be disrupted by splitting. This occurs when the depth sort gives up too early and splits a line where it is not really necessary. A workaround is to use gray or finely dotted lines instead. If your drawing is small, you can also edit the `sketch` output by hand to merge the pieces of the offending line.

Another anomaly is tiny (or in degenerate cases not-so-tiny) notches in the lines that border split polygons. These derive from the way each polygon is painted: first, all pixels within the boundary are filled with color (perhaps white), then the same boundary is stroked (a Postscript term) with a line. The result is that half the line lies inside the boundary and half outside, while the Painter's algorithm assumes the polygon lies entirely within its boundary. The notches are due to one polygon fill operation overwriting the already-drawn inside of the border of another polygon.1 One workaround is to make border lines very thin. In fact `linewidth=0pt` is guaranteed to eliminate this problem, though this results in the thinnest line your output device can draw, which is usually too thin. You might get lucky by merely reordering things in the input file, which is likely to move the splits to different places. The only sure-fire solution is pretty terrible: custom fit `special` overlay lines (with `\psline`) to cover the notches.

Polygon splitting also breaks `PSTricks` hatch patterns. The only known workaround is to substitute a solid fill for the hatch.

#### Footnotes

[1] I know how to fix this problem, but I don't like my solution, and I'm interested in yours.