Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Small 25 line program
#13
My little tweak to this routine.  I think this gives me the prettiest little snow globe you guys ever did see!

Code: (Select All)
SCREEN 12
RANDOMIZE TIMER
pi = 3.1415
n = 200
r = (2 * pi) / 100
sz = 200
scrw = 640: scrh = 480
sw = scrw / sz: sh = scrh / sz
offset = scrh / 4.5
PSET (320, 240), RND * 256
DO
    CLS
    FOR i = 50 TO n
        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), RND * 256
            lastq = q: lasta = a
        NEXT j
    NEXT i
    t = t + .001
    _DISPLAY
    _LIMIT 30
LOOP
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: 7 Guest(s)