11-15-2022, 11:58 PM
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