Julia set: Difference between revisions
m
→{{header|Raku}}: concurrency is a bigger win than caching
Thundergnat (talk | contribs) m (→{{header|Raku}}: concurrency is a bigger win than caching) |
|||
Line 2,546:
sub julia ( $png ) {
^$w .race.map: -> $x {
for ^$h -> $y {
my $z = Complex.new(($x - $w / 2) / $w * 3, ($y - $h / 2) / $h * 2);
Line 2,557:
}
}
sub hsv2rgb ( $h, $s, $v ){
[(do given $h {
▲ my $x = $c * (1 - abs( (($h*6) % 2) - 1 ) );
▲ } ).map: ((*+$m) * 255).Int]
}</lang>
|