def circle(im, center, radius)

      lower = ImageCoordinate[center[0]-radius-1, center[1]-radius-1, 0,0,0]
      upper = ImageCoordinate[center[0]+radius+1, center[1]+radius+1, 0,0,0]

      im.box_conservative(lower, upper, [:x, :y])

      draw(im) do |ic|
        
        xdiff = ic[:x] - center[0]
        ydiff = ic[:y] - center[1]

        if (Math.hypot(xdiff, ydiff) - radius).abs <= Math.sqrt(2) then
          true
        else
          false
        end

      end

      lower.recycle
      upper.recycle
        
    end
def circle(im, center, radius)

      lower = ImageCoordinate[center[0]-radius-1, center[1]-radius-1, 0,0,0]
      upper = ImageCoordinate[center[0]+radius+1, center[1]+radius+1, 0,0,0]

      im.box_conservative(lower, upper, [:x, :y])

      draw(im) do |ic|
        
        xdiff = ic[:x] - center[0]
        ydiff = ic[:y] - center[1]

        if (Math.hypot(xdiff, ydiff) - radius).abs <= Math.sqrt(2) then
          true
        else
          false
        end

      end

      lower.recycle
      upper.recycle
        
    end
Draws a circle into an image.

 @param [WritableImage] im the image into which to draw
 @param [Array] center an array containing the x,y coordinates of the circle's center
 @param [Numeric] radius the radius of the circle in pixels

 @return [void]