Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!asuvax!ncar!midway!msuinfo!kira.egr.msu.edu!crain From: crain@kira.egr.msu.edu (Steven Crain) Newsgroups: comp.sys.amiga.graphics Subject: Re: "4096 in a row" again... Message-ID: <1991Mar29.171557.9750@msuinfo.cl.msu.edu> Date: 29 Mar 91 17:15:57 GMT References: <18310002@hplsla.HP.COM> Sender: news@msuinfo.cl.msu.edu Organization: Michigan State University Lines: 26 tomb@hplsla.HP.COM (Tom Bruhns) writes: >swildner@channelz.gun.de (Sascha Wildner) writes: >>000,001,002,003...00F,01F,01E,01D...010,020,021,022...0F2,0F1,0F0,1F0,1F1,1F2, >>1F3,1F4,1F5,1F6...1FF,1EF... >> >>Quite simple, eh? Don't know if that's what many people who answered called >>"grey code", but that's exactly what I was looking for. Thanks to all who >>answered, anyway (I am working on my ability to describe things in english, >>lads!). >No, that's not Gray code. Gray code would also have worked, but given >different results: only one color would change going from pixel n to >pixel n+1, but with gray code, it wouldn't step through the sequence >of each color in a monotonic order as your result does. Actually it is a hexadecimal (base 16) Gray code. Likewise a decimal Gray code would go as follows: 0,1,2,3,4,5,6,7,8,9,19,18,17,16,15,14,13,12,11,10,20... For more information on Gray codes see _Knotted_Doughnuts_, by Martin Gardiner (ISBN 0-7167-1799-9) Steve