Orbit Cloud Fractal
#1
Hey All,

I stumbled onto this fractal looking for cloud formation fractals (or recursive drawing).

Code:
_TITLE "orbit cloud fractal.bas by bplus 2017-10-15"
'
''' cloud.bas
'' From "Fractals" by Hans Lauwerier
'' Shows Orbits of a dynamical system
'' by Tim Corcoran 2001
'' modified by ML 4/1/07

CONST xmax = 800
CONST ymax = 600

SCREEN _NEWIMAGE(xmax, ymax, 32)
_DELAY .5 'sorry, my system needs .5 delay for _MIDDLE, yours may NOT
_SCREENMOVE _MIDDLE

xoffs = xmax / 2
yoffs = ymax / 2
WHILE 1
   CLS
   a = 3.5 'orig 3.5
   b = -3 'orig -3
   x = 3.14 'orig 3.21
   y = 6.85 'orig 6.54
   IF x > 1 THEN
       w = a * x + b * (x - 1)
   ELSEIF x < -1 THEN
       w = a * x + b * (x + 1)
   ELSE
       w = a * x
   END IF
   plasmaR = RND ^ 2: plasmaG = RND ^ 2: plasmaB = RND ^ 2: plasmaN = 0
   FOR n = 0 TO 20000
       plasmaN = plasmaN + .05
       COLOR _RGB(127 + 127 * SIN(plasmaR * plasmaN), 127 + 127 * SIN(plasmaG * plasmaN), 127 + 127 * SIN(plasmaB * plasmaN))

       PSET ((x * 4) + xoffs, (y * 4) + yoffs)
       z = x: x = y + w
       IF x > 1 THEN
           w = a * x + b * (x - 1)
       ELSEIF x < -1 THEN
           w = a * x + b * (x + 1)
       ELSE
           w = a * x
       END IF
       y = w - z
   NEXT
   _LIMIT 1
WEND


Attached Files Thumbnail(s)

B += x
Reply
#2
Nice! I like fractal a lot! Big Grin
Reply
#3
Cool.  I too like fractals a lot... Big Grin

J
May your journey be free of incident.

Live long and prosper.
Reply
#4
Nice work, BPlus.
Reply