Begin forwarded message:

From: Jerry Bauck <[EMAIL PROTECTED]>
Date: November 18, 2008 1:40:20 PM MST
To: plplot_general <plplot-general@lists.sourceforge.net>
Subject: Fwd: [Plplot-general] peculiar "segmented" fills using shade  
plots / plplot 5.8.0 & 5.9.0



Begin forwarded message:

From: Jerry <[EMAIL PROTECTED]>
Date: November 18, 2008 1:11:07 AM MST
To: plplot_general <plplot-general@lists.sourceforge.net>
Subject: Re: [Plplot-general] peculiar "segmented" fills using shade  
plots / plplot 5.8.0 & 5.9.0


On Nov 14, 2008, at 7:06 PM, Hezekiah M. Carty wrote:

> On Fri, Nov 14, 2008 at 7:59 PM, David Seery <[EMAIL PROTECTED]> wrote:
>> I would like to produce contour plots in which the contours are  
>> filled
>> with a solid colour. Although the documentation implies that this is
>> not possible, I gather from reading the examples that it is achieved
>> by calling plpsty(0). Unfortunately, subsequent calls to plshades
>> produce weirdly segmented images, in which the solid fill is  
>> broken up
>> with unwanted lines, like this:
>>
>> http://www.damtp.cam.ac.uk/user/djs61/figures.pdf
>
> This is, at least in part, due to the fact the the plshade functions
> in PLplot draw the filled contours as a series of polygons.  Depending
> on the output device settings used and (in the case of SVG, PS and PDF
> output) the viewer used, you may see gaps between these individual
> polygons.  You can see this in the PNG output for example 21 on the
> PLplot web site (see the middle image at the bottom of the page)::
>
> http://plplot.sourceforge.net/examples.php?demo=21

I have seen this phenomenon routinely when looking at Postscript or  
PDF using Apple's PDFkit rendering. I have no idea if it shows up on  
other platforms or file formats. Typically there is a hairline gap  
between polygons which does _not_ scale when zoomed--the hairline  
remains a hairline at all zoom levels. With a surface plot in which a  
front surface made of many polygons hides a hidden surface, the front  
surface actually appears translucent because of the many "cracks."  
The first time I saw this I thought that PLplot had an alpha channel.  
(This was before it _did_ have an alpha channel.) Here is a screen  
shot (from Skim, which uses PDFkit) of Example 21 from my Mac's  
screen--note that the red grid lines are visible behind the surface,  
too.

(Go to http://public.me.com/oscarruitt and open PDFkit screen shot.pdf)


I have assumed in the past that this is a rounding bug in Apple's  
rendering routine. However, since the cracks disappear when  
antialiasing is turned off (as Hez noted earlier in this thread), it  
seems that it is an artifact of the antialiasing. Indeed, one can  
easily see where it comes from if each polygon is individually  
rendered against the dark or differently-colored background without  
regard to the adjoining polygons. The edge of each polygon is  
smoothed with the background, forming the dark (or colored) edge.  
Then the adjoining polygon is rendered the same way, making its own  
dark edge. Then the two images are laid next to one another and the  
two dark edges line up (maybe with one obscuring the other) and form  
the dark crack. The reason that they don't appear on prints is that  
either they are much smaller since printer resolution is much better  
than screen resolution and/or printers don't use antialiasing.

For comparison, this is a screen shot from Adobe Reader 8.1.2 (which  
I rarely use because, well, just look at Preview or Skim.) The  
problem is better but still noticeable.

(Go to http://public.me.com/oscarruitt and open Adobe Reader screen  
shot.pdf)


I believe that Adobe bypasses Apple's antialiasing routines in favor  
of their own which are less aggressive.


I zoomed in on David's plot at http://www.damtp.cam.ac.uk/user/djs61/ 
figures.pdf, specifically the lines to the left. I was surprised to  
see that they have an unusual appearance:

Antialiased:
(Go to http://public.me.com/oscarruitt and open David's plot  
antialiased.pdf)

Not antialiased:
(Go to http://public.me.com/oscarruitt and open David's plot no  
antialiased.pdf)


Not sure what is going on here. Surely a line is represented  
mathematically as a line and not a bunch of squiggles.

Jerry



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Plplot-general mailing list
Plplot-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-general

Reply via email to