2
¿Por qué obtengo este patrón de color particular cuando uso rand ()?
Traté de crear un archivo de imagen, así: uint8_t raw_r[pixel_width][pixel_height]; uint8_t raw_g[pixel_width][pixel_height]; uint8_t raw_b[pixel_width][pixel_height]; uint8_t blue(uint32_t x, uint32_t y) { return (rand()%2)? (x+y)%rand() : ((x*y%1024)%rand())%2 ? (x-y)%rand() : rand(); } uint8_t green(uint32_t x, uint32_t y) { return (rand()%2)? (x-y)%rand() : ((x*y%1024)%rand())%2 ? (x+y)%rand() : rand(); } uint8_t red(uint32_t x, uint32_t …