Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!sri-unix!hplabs!hpcea!hpfcdc!hpfcrj!bayes From: bayes@hpfcrj.UUCP Newsgroups: comp.graphics Subject: wanted: 16x16 or larger dither matrix Message-ID: <3960001@hpfcrj.HP.COM> Date: Fri, 6-Feb-87 14:23:30 EST Article-I.D.: hpfcrj.3960001 Posted: Fri Feb 6 14:23:30 1987 Date-Received: Mon, 9-Feb-87 02:29:32 EST References: <17010@ucbvax.BERKELEY.EDU> Organization: HP Ft. Collins Lines: 48 Re generating 16x16 dither matrix from 8x8: One method is to replicate the 8x8 4 times into a 16x16 array, after multiplying the original by 4. Viz: +---+---+ |x4 |x4 | +---+---+ |x4 |x4 | +---+---+ Now add 0 to each value in the upper left quadrant, 1 to each in lower right, 3 to each in upper right, and 2 to each in lower left. You can swap the values to add diagonally, but not along a row or column. An example of expanding 2x2 to 4x4 follows. The original: 0 3 2 1 Replicate, multiplying by 4: 0 12 0 12 8 4 8 4 0 12 0 12 8 4 8 4 Add: 0 12 3 15 8 4 11 7 2 14 1 13 10 6 9 5 This process is completely recursive, and you can start at a 1x1 dither matrix [0], and work up to any 2^n x 2^n. I don't know a non-recursive formula for any n, but am sure it's not hard to figure out. Scott Bayes hpfcla!bayes This algorithm was independently arrived at by me, and I am not representing Hewlett-Packard or any company in this note.