From: Hans-Bernhard B. <br...@ph...> - 2004-07-15 12:49:14
|
Hello, all, a newsgroup poster just found out a problem with (at least) post.trm pm3d output exposed by turning on antialiasing (type 'a' in gv or ghostview) --- there's a Moir'e pattern of very thin (single-pixel) white lines exposed at the border between neighboring rectangles of pm3d plots. The colour scale box displays incorrectly in both 4.0.2 and 4.1, as soon as antialiasing is turned on: there's a rather visible ripple in it. To give you something to look at: the seventh plot of 'pm3d.dem' exposes the problem. At 64x magnification (in gv) of 4.0.2 output it becomes obvious that ghostscript leaves thin white margins between any two polygons --- whether they appear at normal display scales or not is a spatial aliasing effect. Mysteriously, although there's no ChangeLog entry pointing to a bug having been found and fixed in this area --- it seems like this difference is just an lucky side-effect of Ethan's changes to support pattern fills for term->polygon(). Looking at the generated postscript, it seems as if the only significant difference between 4.0.2 and 4.1 is the order of output points, and, of course, the PostScript macro being used: ---------4.0: --------------- .3293 g 5148 927 N 0 -114 114 0 0 114 h .3148 g 5033 927 N 0 -114 115 0 0 114 h .2934 g 4918 927 N 0 -114 115 0 0 114 h /h {rlineto rlineto rlineto fill} bind def ---------4.1: --------------- .3293 g 5148 927 N 0 114 V 114 0 V 0 -114 V 1.0 PolyFill .3148 g 5033 927 N 0 114 V 115 0 V 0 -114 V 1.0 PolyFill .2934 g 4918 927 N 0 114 V 115 0 V 0 -114 V 1.0 PolyFill /V {rlineto} bind def /PolyFill { gsave /Fillden exch def currentrgbcolor /ColB exch def /ColG exch def /ColR exch def /ColR ColR Fillden mul Fillden sub 1 add def /ColG ColG Fillden mul Fillden sub 1 add def /ColB ColB Fillden mul Fillden sub 1 add def ColR ColG ColB setrgbcolor fill grestore } def ------- end excerpts ------ Expanding the macros a bit, this becomes 4.0: .3293 g 5148 927 N 0 -114 114 0 0 114 rlineto rlineto rlineto fill 4.1: .3293 g 5148 927 N 0 114 rlineto 114 0 rlineto 0 -114 rlineto \ [... colour stuff ...] fill Now, I'm certainly no PostScript guru, but to my understanding, the above should render the same result. -- Hans-Bernhard Broeker (br...@ph...) Even if all the snow were burnt, ashes would remain. |