in reply to Re: circular area in a coordinates grid (AoA)
in thread circular area in a coordinates grid (AoA)
very nice, thanks for the code and for the patience Marshall,
I noticed your code get some Use of uninitialized value in join or string if the circle goes outside of the AoA for high values of row.
I fixed it with a condition more in the nested for loop:
$aoa[$x][$y] = 'x' if ( (($x-$circle_x)**2 + ($y-$circle_y)**2 <= ($ci +rcle_radius**2) ) # and $x >=0 and $y >=0 ) + and $x >=0 and $y >=0 and $x <= $max )
L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: circular area in a coordinates grid (AoA)
by Marshall (Canon) on Mar 21, 2019 at 21:17 UTC |
In Section
Seekers of Perl Wisdom