I couldn't resist changing it for "guided" randomization:
Code: (Select All)
dim pr(1 to 10) as _byte
dim as integer rr, gg, bb, rc, gc, bc
scrw = 640: scrh = 480
for i = 1 to 10
read pr(i)
next
rr = 32: gg = 32: bb = 32
rc = 1: gc = 4: bc = 7
Screen _newimage(scrw, scrh, 32)
n = 255
r = (2 * _PI) / 235
x = 0
v = 0
t = 0
sz = 200
s = 0
sw = scrw / sz: sh = scrh / sz
offset = scrh / 4.5
for o = 1 to 8
Cls
For i = 50 To n
rr = rr + pr(rc)
if rr > 255 then rr = rr - 224
rc = rc + 1
if rc > 10 then rc = 1
gg = gg + pr(gc)
if gg > 255 then gg = gg - 224
gc = gc + 2
if gc > 10 then gc = gc - 2
bb = bb + pr(bc)
if bb > 255 then bb = bb - 224
bc = bc + 3
if bc > 10 then bc = bc - 3
if rc = bc then
gc = gc + 1
if gc > 10 then gc = 1
end if
For j = 50 To n
u = Sin(i + v) + Sin(r * i + x)
v = Cos(i + v) + Cos(r * i + x)
x = u + t
q = scrw / 2 + u * offset
a = scrh / 2 + v * offset
PSet (q, a), _RGB(rr, gg, bb)
Next j
Next i
t = t + .025
_delay 1
next
data 5, 7, 11, 13, 17, 19, 23, 29, 31, 37