300, 'y' => 10); $corners[1] = array('x' => 10, 'y' => 590); $corners[2] = array('x' => 590, 'y' => 590); for ($i = 0; $i < 100000; $i++) { $a = rand(0, 2); $x = ($x + $corners[$a]['x']) / 2; $y = ($y + $corners[$a]['y']) / 2; $color = imagecolorallocate($gd, $x%255, ($x*$y)<<2%255, $y<<2%255); imagesetpixel($gd, round($x),round($y), $color); } header('Content-Type: image/png'); imagepng($gd); ?>