Re: Polygons filled with many lines

From: Mary Haley (haley@XXXXXX)
Date: Tue Sep 21 1999 - 16:16:55 MDT


>
> NCAR Folks,
>
> I've noticed in a PostScript file (generated by NCAR Graphics / ctrans)
> that one of the larger polygon shapes is filled with many many lines,
> instead of being outined and filled. Not only does this create larger
> PostScript files, but it also occasionally causes us problems when
> printing.
>
> Upon researching this, under man ctrans, the description of the '-soft'
> option seems to explain this. It says that if the limit on the number
> of vertices describing a polygon is known, it may perform the
> soft-fill without user specification. My intuition tells me that this
> is what is happening. However we are running on UNIX platforms
> IBM RISC/6000 and SGI workstations, and I believe there is plenty
> of memory available. So is there some way I can specify the limit
> on the number of vertices describing a ploygon before soft-fill
> kicks in ?? or some other option I can use to disable the soft-fill ??
> Or am I entirely out in left-field on this one ??
>
> Any and all suggestions are appreciated.
>
> Thanx !!
>
> Jeffrey Jonas

Dear Mr. Jonas,

If you have version 4.0 or later of the NCAR Graphics software
package, then we recommend that you use the direct PostScript driver
rather than ctrans to create PostScript files. The PostScript driver
allows you to write your graphical output directly to a PostScript
file (rather than an NCGM file) from your C or Fortran program or NCL
script.

The reasons we recommend this method over ctrans are as follows:

  1) you have more control over PostScript specific things like the
     software fill you mentioned (see more on this below), line style
     features, using the entire page for output, and increasing the
     resolution of the output for printers that can utilize that;

  2) it produces file sizes that are on average 10-30% smaller than
     the ones produced by ctrans;

  3) you should see improved interpretation times;

  4) You can produce EPS and EPSI files; and

  5) the PS produced conforms to the PostScript Document Structuring
     Conventions, which is required by some PS interpreters and helps
     with independent applications (like psplit) that require the DSC.
 
For information on how to use the direct PostScript driver, go to:

    http://ngwww.ucar.edu/ngdoc/ng/gks/ps.html

For your soft-fill problem, it is important to note that there is a
limit in the PostScript driver as well which is imposed by the
PostScript language (1500 points). This is described as the minimum
number of points that a PostScript interpreter has to accommodate. In
fact, most PostScript interpreters will accommodate more and you can
set a parameter in our package to increase this limit in the direct
PostScript output (it does software fill when you go over the limit).
For details on all of this, see:
 
    http://ngwww.ucar.edu/ngdoc/ng/gks/ps.html#MaximumPathSize
 
Unfortunately, this parameter is only available for programs that call
the low-level utilities, and not for programs that call the high-level
utilities or for NCL scripts. If you happen to be working with an HLU
program or an NCL script, then send me email and let me know.

Some examples
-------------
To generate an NCAR Graphics Fortran example that writes its graphical
output to a PS file, type:

   ncargex agex01 -W ps

This will create a PostScript file called "agex01.ps". In the
"agex01.f" file, the third argument of the call to GOPWK is what
changes the output to PostScript.

To generate an example where the PostScript output covers most of an
8-1/2 x 11 page, type:

   ncargex wmex14

This example sends the PostScript output to a file called "wmex14.ps".

For an NCL example, type:

    ng4ex cn15n

This sends the graphical output to a PS file called "cn15n.ps", as
well as to an X11 window and an NCGM called "cn15n.ncgm".

If you have any further questions about PostScript output, feel free to
send us email.

--Mary Haley



This archive was generated by hypermail 2b29 : Wed Jun 28 2000 - 09:45:44 MDT