🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #3719

Re: Halftoning Algorithm

#3719
From: Taed Nelson
Date: Sun, 18 Nov 1990 22:50
31 lines
2282 bytes
If you don't get other responses, I can go into more detail...

Essentially, it uses a thing called the "spot function" which gives an ordering
  of the pixels in an area around the nearest dot of the halftoning grid.

Imagine a 300dpi printer and a 30dpi halftoning screen at 0 degrees (look in
  the red book if you don't see what I mean).  That means that each halftoning
  dot is responsible for a 10 x 10 area, or 100 pixels (I picked those numbers
  to work out nice; the default grid is usually 53dpi at 45 degrees).

The spot function orders the 100 pixels so that the ones closest to the dot
  have a value of 0 and the ones in the corners have a value of 1, ie the
  distance function.

It then asks what shade of gray you want.  Say 87%.  It then colors 87% of
  those pixels, in increasing order, black.  Thus a big halftone dot.  If you
  said 23%, it would be a small halftone dot.

Note that if we reversed the spot function so the 1 values were in the center
  and the 0 were farthest away, we would NOT get an inverse of the same value
  (as I thought before I understood it), but 87% would give you a small
  white dot (using "white halftoning"), and not the 13% gray that you might
  expect.

The size of the screen and the angle give you the banding effects that you
  see if you print a postScript rainbow.  Higher screen values give you much
  nicer grays, but much larger banding effects.  This is due to the fact that
  at, say, a 150dpi halftone screen, each dot is only for a 2 x 2 pixel
  area, and thus the only values are 0%, 25%, 50%, 75%, and 100% -- any
  other value of gray will be represented as one of these, thus giving large
  bands.  But it does give very crisp (not dotty) grays...
Technical Details
Message-ID: <1990Nov18.225043.680@julius.cs.uiuc.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!julius.cs.uiuc.edu!melodian.cs.uiuc.edu!nelson
References: <3245@isaak.isa.de>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!julius.cs.uiuc.edu!melodian.cs.uiuc.edu!nelson
From: nelson@melodian.cs.uiuc.edu (Taed Nelson)
Newsgroups: comp.lang.postscript
Subject: Re: Halftoning Algorithm
Message-ID: <1990Nov18.225043.680@julius.cs.uiuc.edu>
Date: 18 Nov 90 22:50:43 GMT
References: <3245@isaak.isa.de>
Sender: news@julius.cs.uiuc.edu (USENet News)
Reply-To: nelson@melodian.cs.uiuc.edu (Taed Nelson)
Organization: Picasso Group, University of Illinois at Urbana-Champaign
Lines: 31