/* Checkers -------- This script generates a tilable texture with black and white checkers. Author : Andreas Jonsson Created: May 15th, 2003 Updated: July 28th, 2005 Texture Generator version 1.1.0 */ const int endSize = 256; const int numCheckers = 8; void main() { image @img = @image(numCheckers, numCheckers); int y = 0, x; float cy = 1.0; while( y < numCheckers ) { if( cy == 1.0 ) cy = 0.0; else cy = 1.0; x = 0; float c = cy; while( x < numCheckers ) { if( c == 1.0 ) c = 0.0; else c = 1.0; img.Pixel(x, y) = pixel(1.0, c, c, c); x++; } y++; } img.Resize(endSize, endSize); img.Show(); }