Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make color 0 black, and make points "in the set" be colored black.

  • Loading branch information...
commit 52097d1d3ea6de70197f013b02fecdfca2cd05cf 1 parent ac5d650
@colomon authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 mandelbrot-color.pl
View
6 mandelbrot-color.pl
@@ -1,6 +1,6 @@
use v6;
-my $height = 35;
+my $height = 31;
my $width = $height;
my $max_iterations = 50;
@@ -231,10 +231,10 @@
sub mandel(Complex $c) {
my $z = 0i;
for ^$max_iterations {
- return $_ if ($z.abs > 2);
+ return $_ + 1 if ($z.abs > 2);
$z = $z * $z + $c;
}
- return $max_iterations;
+ return 0;
}
sub subdivide($low, $high, $count) {
Please sign in to comment.
Something went wrong with that request. Please try again.