// generates a PPM file with an RGB cube pattern for Povray's "cube" mapping #include #include const unsigned CellSize = 512; const unsigned Width = CellSize*4; const unsigned Height = CellSize*3; int main() { printf("P6\n%u %u 255\n", Width, Height); uint8_t r,g,b; for(unsigned y=0; y