http://qs321.pair.com?node_id=1231489


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.