REM *********************************************** REM Title: circle outline REM Author: Phaelax REM Downloaded from: http://dbcc.zimnox.com/ REM *********************************************** REM ************************************************** REM Draws the outline of a circle given the center REM co-ordinates [cx,cy] and its inner and outer radii REM ************************************************** function circleOutline(cx,cy,outerRadius,innerRadius) for x = cx-outerRadius to cx+outerRadius for y = cy-outerRadius to cy+outerRadius sqDistance = (cx-x)^2 + (cy-y)^2 if sqDistance <= outerRadius*outerRadius and sqDistance >= innerRadius*innerRadius p# = (((x-cx)^2 + (y-cy)^2+0.0) - innerRadius^2) / (outerRadius^2-innerRadius^2) if p# > 1 then p#=1.0 box x,y,x+1,y+1 endif next y next x endfunction