Mandelbrot set: Difference between revisions
→{{header|Raku}}: simplifying first version and commenting the second one
(→{{header|UNIX Shell}}: cleaning and try to use COLUMNS and LINES) |
(→{{header|Raku}}: simplifying first version and commenting the second one) |
||
Line 11,411:
[[File:mandelbrot-raku-1.2.png|300px|thumb|right]]
<syntaxhighlight lang="perl6" line>
my $width = my $height = +(@*ARGS[0] // 800);
Line 11,425 ⟶ 11,423:
sub mandelbrot(Complex $z is copy, Complex $c --> Int) {
for 1 .. MAX_ITERATIONS {
}
return 0;
Line 11,432 ⟶ 11,430:
say "P3";
say "{+@re
say "255";
use Color;
}.rotor(+@im).map(&put)
<!-- # Not sure this version is that much modern or faster now.
▲ put .map({ (255 * sqrt($_/(MAX_ITERATIONS + 1))).Int })
▲ (state @)[$i] //= Color.new(hsv => $i xx 3).rgb
▲}</syntaxhighlight>
Alternately, a more modern, faster version.
Line 11,496 ⟶ 11,492:
}
}</syntaxhighlight>
-->
=={{header|REXX}}==
|