RosettaCodeData/Task/Chaos-game/Run-BASIC/chaos-game.basic
2023-07-01 13:44:08 -04:00

21 lines
318 B
Text

x = int(rnd(0) * 200)
y = int(rnd(0) * 173)
graphic #g, 200,200
#g color("green")
for i =1 TO 20000
v = int(rnd(0) * 3) + 1
if v = 1 then
x = x/2
y = y/2
end if
if v = 2 then
x = 100 + (100-x)/2
y = 173 - (173-y)/2
end if
if v = 3 then
x = 200 - (200-x)/2
y = y/2
end if
#g set(x,y)
next
render #g