ForrestFox

IFS Fern

Feb 19th, 2021 (edited)
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QBasic 0.54 KB | None | 0 0
  1. SCREEN 13
  2.  
  3. WINDOW (-5, 0)-(5, 10)
  4. RANDOMIZE TIMER
  5.  
  6. DO
  7.  
  8.   SELECT CASE RND
  9.  
  10.     CASE 0 TO .01
  11.       nextx = 0
  12.       nexty = .16 * y
  13.     CASE .01 TO .08
  14.       nextx = .2 * x - .26 * y
  15.       nexty = .23 * x + .22 * y + 1.6
  16.     CASE .08 TO .15
  17.       nextx = -.15 * x + .28 * y
  18.       nexty = .26 * x + .24 * y + .44
  19.     CASE ELSE
  20.       nextx = .85 * x + .04 * y
  21.       nexty = -.04 * x + .85 * y + 1.6
  22.  
  23.   END SELECT
  24.  
  25.   IF RND < .5 THEN c = 2 ELSE c = 10
  26.   PSET (x, y), c
  27.  
  28.   x = nextx
  29.   y = nexty
  30.   i = i + 1
  31.  
  32. LOOP WHILE INKEY$ = ""
Add Comment
Please, Sign In to add comment