Julia set: Difference between revisions
Content added Content deleted
m (→{{header|Perl}}: minor code simplification) |
m (→{{header|Perl}}: mor code simplifications) |
||
Line 95:
my $maxIter = 255;
my ($cX, $cY) = (-0.7, 0.27015);
my ($moveX, $moveY) = (0, 0);
my $color = Imager::Color->new('#000000');
foreach my $x (0 .. $w - 1) {
Line 103 ⟶ 105:
my $zy = (($y - $h / 2) / (0.5 * $zoom * $h) + $moveY);
my $i = $maxIter;
($zy, $zx) = (2
}
$img->setpixel(x => $x, y => $y, color => $color);
}
|