($width / 2), 'y' => 10); $corners[1] = array('x' => 0, 'y' => ($height - 10)); $corners[2] = array('x' => $width, 'y' => ($height - 10)); $red = imagecolorallocate($gd, 255, 0, 0); for ($i = 0; $i < $howmany; $i++) { ourimagesetpixel($gd, round($x),round($y), $red); if (1 == 1) { $x = rand(0, $width); $y = rand(0, $height); $red = imagecolorallocate($gd, rand(0, 255), rand(0, 255), rand(0, 255)); } else { $a = rand(0, 2); $x = ($x + $corners[$a]['x']) / 2; $y = ($y + $corners[$a]['y']) / 2; } } header('Content-Type: image/png'); imagepng($gd); ?>