Kronecker product based fractals: Difference between revisions
Content deleted Content added
m added whitespace to the simple matrices and used a better glyph, added whitespace and highlighting to the task preamble, added whitespace before the table of contents (TOC) . |
SqrtNegInf (talk | contribs) m →{{header|Perl 6}}: added .race for concurrency |
||
Line 1,837:
=={{header|Perl 6}}==
{{works with|Rakudo|
<lang perl6>sub kronecker-product ( @a, @b ) { (@a X @b).map: { (.[0].list X* .[1].list).Array } }
Line 1,860:
my @img = kronecker-fractal( @shape, $order );
my $png = Image::PNG::Portable.new: :width(@img[0].elems), :height(@img.elems);
$png.set: $x, $y, |( @img[$y;$x] ?? <255 255 32> !! <16 16 16> );
}
|