RosettaCodeData/Task/Constrained-random-points-on-a-circle/Perl-6/constrained-random-points-on-a-circle-2.pl6
2015-11-18 06:14:39 +00:00

5 lines
221 B
Raku

(say ~.map: { $_ // ' ' } for my @matrix) given do
-> [$x, $y] { @matrix[$x][$y] = '*' } for pick 100, do
for ^32 X ^32 -> ($x, $y) {
[$x,$y] when 100..225 given [+] ($x,$y X- 15) X** 2;
}