🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #8156

Re: Getting 255 Grey Levels

#8156
From: Nancy Durgin
Date: Fri, 24 Mar 1989 22:13
50 lines
3122 bytes
In article <854@draken.nada.kth.se> jmr@nada.kth.se (Jan Michael Rynning)
writes:
>The default screen frequency is 60 dots/inch on an Apple LaserWriter,
>which has a resolution of 300 pixels/inch.  300/60=5, so each screen
>dot has a maximum size of 5 by 5 pixels.  Making all those 25 pixels
>black, gives you a black printout.  Making 0 of them black, gives you
>a white printout.  That means you can achieve 26 grey levels at this
>screen frequency.  If you want more grey levels, you will either have
>to lower the frequency or use a printer with a higher resolution.  As
>you need at least 16 by 16 pixels to get 256 grey levels, the screen
>frequency to use on the Apple LaserWriter is 300/16=19.
>

Actually, that's not quite right...

The LaserWriter screen frequency of 60 dots/inch is quoted for a 45
degree screen, and is only approximate.  If you actually measure it,
you'll find that it is more like 53 (measured along the diagonal). 
Since this is for a 45 degree angle, divide by sqrt(2)/2, which gives
75dpi along the horizontal, 300/75=4, so each screen dot is a maximum of
4 by 4 pixels.  But, since there are actually two dots to each tile
(think of the 50% gray level, with a white dot and a black dot next to each
other), this is actually a 8x4 grid.  Or, it's actually easier to
visualize as an 8x8 grid, where you add 2 dots for each gray level:

       So the 50% gray             XXXXOOOO
       pattern would               XXXXOOOO
       look like this:             XXXXOOOO
                                   XXXXOOOO
                                   OOOOXXXX
                                   OOOOXXXX
                                   OOOOXXXX
                                   OOOOXXXX

Counting 0 for all white, and 32 for all black, we get a total of
33 gray levels.

A 16x16 grid will yield only 128 (actually, 129) gray levels, and would
give you a 300/16 * sqrt(2) = 26.5 dot/inch screen.

There's not really a clean way to get 256 gray levels for a 45 degree
screen, since you'd need to use approximately a 23x23 grid
(sqrt(512) = 22.6).  The reason the LaserWriter uses the default screen
that it uses (53 dots/inch, 45 degree screen) is because it is easy (and
fast) to implement with 8-bit grids.

==============================================================================
Nancy Durgin           | (Usual disclaimers    | Tegra-Varityper, Inc.
tegra!nad@ulowell.edu  |  apply...)            | Billerica, Massachusetts
==============================================================================
Technical Details
Message-ID: <441@deimos.tegra.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ulowell!tegra!nad
References: <1597@murdu.oz> <854@draken.nada.kth.se>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ulowell!tegra!nad
From: nad@tegra.UUCP (Nancy Durgin)
Newsgroups: comp.lang.postscript
Subject: Re: Getting 255 Grey Levels
Summary: How (and why) the LaserWriter has 33 gray levels
Keywords: Apple LaserWriter, image operator, setscreen
Message-ID: <441@deimos.tegra.UUCP>
Date: 24 Mar 89 22:13:49 GMT
References: <1597@murdu.oz> <854@draken.nada.kth.se>
Reply-To: tegra!nad@ulowell.edu (Nancy Durgin)
Organization: Tegra-Varityper, Inc. Billerica, MA
Lines: 55