25 lines
522 B
Text
25 lines
522 B
Text
w = 320
|
|
h = 320
|
|
dim canvas(w,h)
|
|
for pts = 1 to 1000
|
|
x = (rnd(1) * 31) - 15
|
|
y = (rnd(1) * 31) - 15
|
|
r = x * x + y * y
|
|
if (r > 100) and (r < 225) then
|
|
x = int(x * 10 + w/2)
|
|
y = int(y * 10 + h/2)
|
|
canvas(x,y) = 1
|
|
end if
|
|
next pts
|
|
|
|
' -----------------------------
|
|
' display the graphic
|
|
' -----------------------------
|
|
graphic #g, w,h
|
|
for x = 1 to w
|
|
for y = 1 to h
|
|
if canvas(x,y) = 1 then #g "color green ; set "; x; " "; y else #g "color blue ; set "; x; " "; y
|
|
next y
|
|
next x
|
|
render #g
|
|
#g "flush"
|