Path: utzoo!utgpu!water!watmath!clyde!att!rutgers!rochester!pt.cs.cmu.edu!andrew.cmu.edu!sg1q+ From: sg1q+@andrew.cmu.edu (Simon Peter Gatrall) Newsgroups: comp.lang.postscript Subject: Re: Screening Procedures Message-ID:Date: 9 Jul 88 05:39:34 GMT Organization: Carnegie Mellon Lines: 42 In-Reply-To: <248@oha.UUCP> For those of you that tuned in late, I posted a request for screening procedures that generated random patterns to create interesting textures. (where _interesting_ is defined by the eye of the beholder :-) I recieved the following reply from tony@oha.UUCP (Tony Olekshy): >Here, here! The following code will generate a random-patterned grey scale >with the probability of any pixel being white being proportional to the grey >level: > > 1 45 { pop pop rand 1073741824 div 1 sub } setscreen > >The problem is that when you use this, the maximum area that gets patterned >is 0.1" x 0.1", and THAT pattern is replicated over the whole area being >painted. CAN halftoning be used to randomly pattern the entire area being >painted? I should have been clearer in my original request, but Tony's question is exactly the one I wanted answered in the first place. I have written screening procedures very similar to his. If your halftone cell is smaller than 0.1" then each cell of a specific gray value over the entire image is screened exactly the same. If you try setting the cell size larger (I haven't tried this myself, I'm just interpreting Tony's message) then you get a maximum of a 0.1" x 0.1" pattern. I realize that in general the screening procedures that you can make (ie various dots and lines) are adequite for most applications, I really want to duplicate some of the texture effects that someone with a texture screen and a stat camera can make. I can think of one brute force method. First you take your grey-scale image and turn it into a dithered black and white image, and then print it out with the standard screening methods. I don't know how to write the dithering procedure off-hand to get any interesting textures, but I imagine this approach would work. What I would prefer is to just be able to write some screening procedure that has the same effect. I guess that if you could customize the low-level routines that do the screening, you could make PostScript recompute each halftone cell. Then the only problem is writing _interesting_ screening procedures. Is there anybody out there who knows more about this stuff? -Simon Gatrall sg1q+@andrew.cmu.edu