Dark Bit Factory & Gravity

PROGRAMMING => Other languages => Yabasic => Topic started by: bikemadness on October 31, 2021

Title: Multi Colour Snail Trail
Post by: bikemadness on October 31, 2021
Another screen saver.


open window 640,512
x=300
y=240
s=20
h=36
i=360
j=pi/180
repeat
go=go+1
if go>5 go=1
if go>4 setrgb 1,int(ran(256)),int(ran(256)),int(ran(256))
pause 0.05
b=a
label worm
a=int(ran(h))
if a>b-h-2 and a<b-2 goto worm
if a>b+2 and a<b+h-2 goto worm
if x>640 x=0
if x<0 x=640
if y>512 y=0
if y<0 y=512
x=x+cos((i/h)*j*a)*s/4
y=y+sin((i/h)*j*a)*s/4
fill circle x,y,5
until (1=0)