graphic-processing-algorithm-Ch02-p49c-p49c.pde / pde
size(360,180); for(int x = 0; x<360; x++){ for(int y = 0; y<180; y++){ int red = (int)(255. * cos( PI/180. * x) ); int green = (int)(255. * sin( PI/180. * y)); int blue = 0; red = abs(red) % 255; green = abs(green) % 255; blue = abs(blue) % 255; stroke(red, green, blue); rect(x, y,1,1); } }
(C) Æliens 04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.