functioncircle(x,y,radius,func)local r = radiuslocal xorig = xlocal yorig = ylocal iterations =2* r -1local i = iterationslocal left = r -1local right =0while i >0dolocal cx = xorig - left;local cy = yorig + r - i;while cx <= xorig + right dofunc(cx,cy) cx = cx +1end--inc/decsif right == r -1then left = left -1else right = right +1end i = i -1endend