|
From: Petr M. <mi...@ph...> - 2005-07-21 12:16:03
|
Well, it looks to me that it must be a bug in ghostscript -- some rounding
of positions or whatever. Below is a simplest postscript code that
demonstrates spurious lines in a pm3d-like image:
%!
/M {moveto} bind def
/L {lineto} bind def
/R {rmoveto} bind def
/V {rlineto} bind def
/C {closepath} def
% Change the position, and spurious lines may move!!!
-50 20 translate
1 1 translate
1 setlinewidth
0.5 setgray
/y {100} def
newpath 100 y M 100 0 V 0 100 V -100 0 V closepath fill
newpath 200 y M 100 0 V 0 100 V -100 0 V closepath fill
newpath 300 y M 100 0 V 0 100 V -100 0 V closepath fill
newpath 400 y M 100 0 V 0 100 V -100 0 V closepath fill
newpath 500 y M 100 0 V 0 100 V -100 0 V closepath fill
/y {300} def
newpath 100 y M 100 0 V 0 100 V -100 0 V 0 -100 V closepath fill
newpath 200 y M 100 0 V 0 100 V -100 0 V 0 -100 V closepath fill
newpath 300 y M 100 0 V 0 100 V -100 0 V 0 -100 V closepath fill
newpath 400 y M 100 0 V 0 100 V -100 0 V 0 -100 V closepath fill
newpath 500 y M 100 0 V 0 100 V -100 0 V 0 -100 V closepath fill
showpage
You can change the resolution "-r50" and see how the spurious lines are
moving.
a=demo2.ps
A="-dGraphicsAlphaBits=4"
D=png16m
#D=png256
gs -q -r50 $A -sDEVICE=$D \
-dSAFER -dNOPAUSE -dBATCH -sOutputFile=$a.png $a -quit
gqview $a.png
Questions to postscript gurus:
1. Is it a gs bug?
2. Can gnuplot overcome it? (Ignore antialiasing, ...)
---
PM
|