SHARE
TWEET

TinyBasic Fixed Point Mandelbrot

a guest Sep 15th, 2019 147 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 1 rem Fixed point character mandelbrot - VinCBR900
  2. 2 let B = 15000: rem Right Edge = 1.5
  3. 3 let C = 15000: rem Top Edge = 1.5
  4. 4 let D =-15000: rem Bottom Edge = -1.5
  5. 5 let E = 200: rem Max Iteration Depth
  6. 6 let F = 350: rem X Step Size
  7. 7 let G = 750: rem Y Step Size
  8. 8 let A =-21000: rem Left Edge = -2.1
  9. 9 rem Tweaked from RosettaCode
  10. 10 goto 100
  11. 32 Print " "; : Return
  12. 48 Print "0"; : Return
  13. 49 Print "1"; : Return
  14. 50 Print "2"; : Return
  15. 51 Print "3"; : Return
  16. 52 Print "4"; : Return
  17. 53 Print "5"; : Return
  18. 54 Print "6"; : Return
  19. 55 Print "7"; : Return
  20. 56 Print "8"; : Return
  21. 57 Print "9"; : Return
  22. 64 Print "@"; : Return
  23. 70 goto 1000
  24. 100 For L = C To D Step -G: rem Y0
  25. 110 For K = A To B-1 Step F: rem X0
  26. 120 let V = 0: rem Y
  27. 130 let U = 0: rem X
  28. 140 let I = 32: rem Char To Be Displayed
  29. 150 For O = 0 To E-1: rem Iteration
  30. 160 let X = (U/10 * U) / 1000: rem X*X
  31. 170 let Y = (V/10 * V) / 1000: rem Y*Y
  32. 180 If (X + Y > 40000) then goto 200
  33. 190 goto 250
  34. 200 let I = 48 + O: rem Print Digit 0...9
  35. 210 If (O > 9) then let I=64: rem If Iteration Count > 9,
  36. 220 goto 290
  37. 250 let Z = X - Y + K: rem Temp = X*X - Y*Y + X0
  38. 260 let V = (U/10 * V) / 500 + L: rem Y = 2*X*Y + Y0
  39. 270 let U = Z: rem X = Temp
  40. 280 Next O
  41. 290 Gosub I: rem  Ins_char(I)
  42. 300 Next K
  43. 310 Print
  44. 320 Next L
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top