6

« Last post by **Galileo ** on* 14. February 2017, 19:13:56* »
`// Effect 5b`

// Developed in Yabasic 2.78.0 by Galileo, 2/2017

// Play with parameters

width = 640 : height = 480

ndrops = 500

sizeletter = 300 : t$ = "B"

dim drop(ndrops, 6)

dim bg(width, height)

dcount = 0

for n = 1 to ndrops

newDrop(n)

next n

open window width,height

backcolor 255,255,255

clear window

color 1,0,0

text 10,15,"Please, wait ...","swiss12"

color 0,0,0

text width/2,height/2,t$,"swiss"+str$(sizeletter),"cc"

for x = 1 to width

for y = 1 to height

if getbit$(x,y,x,y) = "rgb 1,1:000000" bg(x, y) = 1

next y

next x

clear window

do

for n = 1 to ndrops

x = drop(n,1) : y = drop(n,2)

if drop(n,2) > height+3 newDrop(n)

clear fill circle drop(n,1),drop(n,2), 3

if (x > -1) and (x < width + 1) and (y > -1) and (y < height + 1) and bg(x, y) then

if drop(n,3)> .01 then

drop(n,3)=drop(n,3)-.01

else

drop(n,3)=0

end if

end if

drop(n,2) = drop(n,2) + drop(n,3)

color drop(n,4),drop(n,5),drop(n,6)

fill circle drop(n,1),drop(n,2), 3

next n

loop

sub newDrop(n)

drop(n, 1) = ran(width)

drop(n, 2) = -ran(height)

drop(n, 3) = ran(3)+.5

drop(n, 4) = ran(255)

drop(n, 5) = ran(255)

drop(n, 6) = ran(255)

end sub