Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ncr-tp.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!bellcore!decvax!ittvax!dcdwest!sdcsvax!ncr-tp!carl From: carl@ncr-tp.UUCP (Carl Kuck) Newsgroups: net.graphics Subject: Area-fill algorithm summary Message-ID: <209@ncr-tp.UUCP> Date: Mon, 20-May-85 11:04:20 EDT Article-I.D.: ncr-tp.209 Posted: Mon May 20 11:04:20 1985 Date-Received: Thu, 23-May-85 03:31:24 EDT Expires: Wed, 19-Jun-85 19:00:00 EDT References: none Reply-To: carl@ncr-tp.UUCP (Carl Kuck) Followup-To: net.graphics Distribution: net Organization: NCR Corporation, Torrey Pines Lines: 46 Keywords: area-filling " As you read the scroll you become confused. Call it: UNIX (*) manual " Here is the promised summarization of the results of my area-fill posting. 1. Good reference book: "Principles of Interactive Computer Graphics" by Newman and Sproull 2. Simple area fill algorithm: (written in Pascal) (* assumes SET_PIXEL(X,Y) to turn on a pixel, and PIXEL_OFF(X,Y) which returns "true" if the pixel at (X,Y) is off *) procedure FILL (X,Y : integer); begin SET_PIXEL(X,Y); if PIXEL_OFF(X-1,Y) then FILL(X-1,Y); if PIXEL_OFF(X+1,Y) then FILL(X+1,Y); if PIXEL_OFF(X,Y-1) then FILL(X,Y-1); if PIXEL_OFF(X,Y+1) then FILL(X,Y+1); end; (* FILL *) 3. Acknowledgements: Thanks (and a tip o' the chapeau) to Bill Ingogly, Joel Wittels, Conor Rafferty, all the people who requested this summary, and anyone else I might have forgotten in the heat of trying to get all of this done before the Pyramid here at SE-SD/TP goes away! This will be my last posting, as ncr-tp leaves the net (not for too long, I hope) on May 22nd! Don't bother replying, we'll be long gone by the time it gets here... ***************** Thanks again, to one and all !!! ********************* -- Carl " 2 days and counting " Kuck (soon-to-be formerly ncr-tp!carl) (*) If there's anyone reading this who doesn't know that UNIX is a trademark, get in touch with me immediately. You need help. " Ask me no questions and I might not tell you any lies ... fnord ... "