swildner@channelz.gun.de (Sascha Wildner) (03/28/91)
Hi! It seems that my description of what I wanted wasn't that clear. Now that I have found the solution (thanks Holger!) here's what I meant (for all the people who can't sleep at night thinking "what the hell did that guy want?": I searched a way to put all 4096 colors in an order so that Color[n+1] differs from Color[n] by a modification of only ONE of the three components. Here's the solution: 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!). -- +---------------------------------------------------------------+ | Sascha Wildner, Am Druvendriesch 27, W-5030 Huerth 6, Germany | | | | Phone : +49 2233 15571 Zerberus: S.WILDNER@TBC.ZER | | MagicNet: DINO-BOX:BILBO UUCP : swildner@channelz.gun.de | | Fido : 2:241/5008 | +---------------------------------------------------------------+
tomb@hplsla.HP.COM (Tom Bruhns) (03/29/91)
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.
crain@kira.egr.msu.edu (Steven Crain) (03/30/91)
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