Article View: comp.lang.postscript
Article #7154Re: Continuous tones
From: Edward J. Ede
Date: Thu, 12 May 1988 14:10
Date: Thu, 12 May 1988 14:10
38 lines
2220 bytes
2220 bytes
In article <3923@gryphon.CTS.COM> richard@gryphon.CTS.COM (Richard Sexton) writes:
>Assuming you are all familiar with the continuous tone greyscale
>in the headings of the examples in the 'Blue' Book, does anybody
>have some code that will do this with lines at an arbitrary angle ?
>
>I have this ominous feeling I've missed the boat on this, if so,
>please be polite.
>richard@gryphon.CTS.COM rutgers!marque!gryphon!richard
The box at the top of each example is generally called a fountain.
Here's the code.
/InBuf 256 string def
144 700 translate % move near the top of the page
360 72 scale % make the fountain 5 inches long and 1 inch high
% xx rotate % arbitrary andge here...
256 1 8 [256 0 0 1 0 0]
{0 1 255 {InBuf exch dup put} for Inbuf} bind image
% add code here to outline with box if desired...
The last line creates a 256 x 1 image and scales it to be one point in
size. (The scale statement above it selectes the printed size.) The
256 pixels in the images range from 0 to 255, and are stored in the
string InBuf.
When you say 'lines at an arbitrary angle' do you mean rotating the
entire fountain, or changing those very fine veriticle lines that are
within the fountain? If you want to rotate the entire fountain, use
the rotate command above that is commented out. If you want to change
those very fine lines (which aren't so fine when printed on a 300dpi
printer), you'll need to play around with the setscreen operator.
** Ramble mode on **
By the way, those verticles lines in the fountain, between the
changing shades, really aren't there. They are an example of the Mach
band phenomenon of the human visual system.
** Ramble mode off **
Technical Details
Message-ID:
<31717@linus.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!husc6!uwvax!oddjob!ncar!gatech!linus!mbunix!tedReferences:
<3923@gryphon.CTS.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!husc6!uwvax!oddjob!ncar!gatech!linus!mbunix!ted From: ted@mitre-bedford.ARPA (Edward J. Ede) Newsgroups: comp.lang.postscript Subject: Re: Continuous tones Keywords: transitions Message-ID: <31717@linus.UUCP> Date: 12 May 88 14:10:25 GMT References: <3923@gryphon.CTS.COM> Sender: news@linus.UUCP Reply-To: ted@mbunix (Ede) Organization: The MITRE Corporation, Bedford, Mass. Lines: 38