Small 25 line program
#10
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
Reply


Messages In This Thread
Small 25 line program - by Gadgetjack - 11-15-2022, 06:40 PM
RE: Small 25 line program - by bplus - 11-15-2022, 07:15 PM
RE: Small 25 line program - by Gadgetjack - 11-15-2022, 07:19 PM
RE: Small 25 line program - by bplus - 11-15-2022, 07:20 PM
RE: Small 25 line program - by CharlieJV - 11-15-2022, 07:30 PM
RE: Small 25 line program - by bplus - 11-15-2022, 08:06 PM
RE: Small 25 line program - by CharlieJV - 11-15-2022, 08:10 PM
RE: Small 25 line program - by Gadgetjack - 11-15-2022, 08:20 PM
RE: Small 25 line program - by mnrvovrfc - 11-15-2022, 08:56 PM
RE: Small 25 line program - by mnrvovrfc - 11-15-2022, 09:07 PM
RE: Small 25 line program - by dbox - 11-15-2022, 11:24 PM
RE: Small 25 line program - by bplus - 11-15-2022, 11:33 PM
RE: Small 25 line program - by CharlieJV - 11-16-2022, 12:09 AM
RE: Small 25 line program - by SMcNeill - 11-15-2022, 11:58 PM
RE: Small 25 line program - by bplus - 11-20-2022, 09:49 AM
RE: Small 25 line program - by CharlieJV - 11-20-2022, 05:09 PM
RE: Small 25 line program - by Pete - 11-20-2022, 11:22 AM
RE: Small 25 line program - by bplus - 11-20-2022, 04:33 PM
RE: Small 25 line program - by bplus - 11-20-2022, 06:05 PM
RE: Small 25 line program - by CharlieJV - 11-20-2022, 06:20 PM
RE: Small 25 line program - by bplus - 11-20-2022, 07:05 PM
RE: Small 25 line program - by CharlieJV - 11-20-2022, 07:41 PM
RE: Small 25 line program - by bplus - 11-21-2022, 10:10 AM



Users browsing this thread: 9 Guest(s)