4) { return True; } } return False; } function mandel($xstep, $ystep, $iters) { $output = ""; for($yc=0; $yc<$ystep; $yc++) { $y = $yc*(YMAX-YMIN)/$ystep + YMIN; for($xc=0; $xc<$xstep; $xc++) { $x = $xc*(XMAX-XMIN)/$xstep + XMIN; if (escapes($x, $y, $iters)) { $output .= ' '; } else { $output .= 'X'; } } $output .= "\n"; } echo $output; } mandel(intval($argv[1]), intval($argv[2]), intval($argv[3]));