_TITLE "Fernerator, press spacebar for new landscape, esc to quit" 'b+ 2020-08-06
' f& = _LOADIMAGE("clipartkey_1043733.png") ' the code isn't working with the image anymore???
initFerns
wind = 0: dw = .01: dir = 1
LINE (-5, i
)-(5, i
+ .2), _RGB32(60, (1 - i
/ 11) * 150 + 60, (1 - i
/ 11) * 75 + 180), BF
LINE (-5, i
)-(5, i
+ .2), _RGB32(i
/ 4 * 90 + 10, i
/ 4 * 45 + 5, i
/ 4 * 22 + 2), BF
''''''''''''''''''''''''''''''''''''''''''''_PUTIMAGE (-5, 0), f&, 0 ' the code isn't working with the image anymore???
drawFern fern(i).x, fern(i).y, fern(i).scale, fern(i).c, wind
wind = wind + dir * dw
IF wind
> .06 OR wind
< -.72 THEN dir
= -dir
fern
(i
).scale
= RND * .7 + .3
yAdj = yoff0 + (1 - scale) * 5
FOR i
= 1 TO 90000 'enough dots to get idea nextX = 0
nextY = .16 * y
nextX = .2 * x - .26 * y
nextY = .23 * x + .22 * y + 1.6
nextX = -.15 * x + .28 * y
nextY = .26 * x + .24 * y + .44
nextX = .85 * x + .04 * y
nextY = -.04 * x + .85 * y + 1.6
x = nextX + w * nextY / 10
y = nextY
LINE (x
* scale
+ xoff0
, y
* scale
+ yAdj
)-STEP(0, 0), c
, BF