in reply to Re: circular area in a coordinates grid (AoA)
in thread circular area in a coordinates grid (AoA)
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*
|
|---|
| 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 |