I've always been fond of:
for y = 0 to ScreenHeight
for x = 0 to ScreenWidth
if (((x - CenterX) ^ 2 + (y - CenterY) ^ 2) <= Radius ^ 2) then
pset (x, y), fillColor
end if
next x
next y
It's got a little less overdraw, but it checks every pixel on the screen.
doneFlag = false
while (!doneFlag)
# reseed random so our new points aren't dependent on our old points
random.seed()
# get a random point on the screen
x = random.randint(0, screenWidth)
y = random.randint(0, screenHeight)
# check if it's within the circle
if (((x - CenterX)**2) + ((y - CenterY)**2) <= r ** 2)
# get a second random point on the screen
x2 = random.randint(0, screenWidth)
y2 = random.randint(0, screenHeight)
# check if it's also within the circle
if (((x2 - CenterX)**2) + ((y2 - CenterY)**2) <= r ** 2)
# draw a line between the points
drawLine((x, y), (x2, y2), fillColor)
# check if the circle has been filled
doneFlag = true
# iterate over every pixel on the screen
for y = 0 to ScreenHeight
for x = 0 to ScreenWidth
# check if the pixel is part of the circle
if (((x - CenterX) ** 2 + (y - CenterY) ** 2) <= r ** 2)
# check if the pixel is the correct color
if (getPix(x,y) != fillcolor)
#if not, we aren't done
doneFlag = false