🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #5049

PostScript setscreen quantization

#5049
From: Tomas G. Rokicki
Date: Sat, 16 Mar 1991 00:14
24 lines
1446 bytes
The PostScript setscreen operator works by `tiling the plane' with a
rectangular tile filled with threshold values from the spot function.
Thus, to figure out how the different values are quantized, simply
convert them to rectangular coordinates (from polar), round then, and
convert them back.  Given an lpi and an angle, we have

   x = round(resolution / lpi * cos(angle))
   y = round(resolution / lpi * sin(angle))
   real-angle = arctan(y, x)
   real-lpi = resolution / sqrt(x * x + y * y)

So, for the most common case, at 300 dpi, 60 lpi, 45 degrees, we get

   x = round(5 * sqrt(.5)) = 4
   y = round(5 * sqrt(.5)) = 4
   real-angle = arctan(4, 4) = 1
   real-lpi = 300 / sqrt(32) = 53

You can do the math for the Linotronic.

The number of possible shades of gray is equal to the tile size, which
is (x * x) + (y * y) + 1.  For the example above, we have 33 total possible
shades; on many printers, some of these shades might appear the same (like
the very black ones on Canon engines.)
Technical Details
Message-ID: <1991Mar16.001421.6381@neon.Stanford.EDU>
Path: arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker.mit.edu!stanford.edu!neon.Stanford.EDU!rokicki

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker.mit.edu!stanford.edu!neon.Stanford.EDU!rokicki
From: rokicki@neon.Stanford.EDU (Tomas G. Rokicki)
Newsgroups: comp.lang.postscript
Subject: PostScript setscreen quantization
Message-ID: <1991Mar16.001421.6381@neon.Stanford.EDU>
Date: 16 Mar 91 00:14:21 GMT
Organization: Computer Science Department, Stanford University, Ca , USA
Lines: 24