Brownian tree: Difference between revisions

Content deleted Content added
Thundergnat (talk | contribs)
SqrtNegInf (talk | contribs)
m →‎{{header|Perl 6}}: less 'interactive' for easier testing
Line 2,489:
 
This solution spawns new Particles at a growing square border and displays the Tree every 50 particles and at the end using unicode UPPER/LOWER HALF BLOCK and FULL BLOCK.
 
With the given size of 100 and particle count of 1000, this takes about 25 seconds with Niecza on my notebook.
 
{{works with|Rakudo|2015.12}}
Line 2,555 ⟶ 2,553:
}
set($x,$y);
display if $progress %% 50;
if $spawnradius < mid && abs(($x|$y) - mid) > $spawnradius - 5 {
$spawnradius = $spawnradius + 1;
Line 2,561 ⟶ 2,558:
}
 
display;</lang>
say "";
display;
say "";
say "time elapsed: ", (now - BEGIN { now }).Num.fmt("%.2f"), " seconds";
say "";</lang>
 
=={{header|Phix}}==