richard@gryphon.CTS.COM (Richard Sexton) (05/10/88)
(*I* wrote this) 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. (In spite of the fact there are no typos, hah!) -- noalias went. it really wasn't negotiable richard@gryphon.CTS.COM rutgers!marque!gryphon!richard
ted@mitre-bedford.ARPA (Edward J. Ede) (05/12/88)
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 **