Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 24th, 2012  |  syntax: AutoIt  |  size: 0.90 KB  |  hits: 89  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. ;ported from: http://nerdworld.de/programmierung/ascii-mandelbrot-mit-php-und-html-in-farbe.html
  2. ;--------Change here-----------------------------
  3. Dim $SEED[2]=[2,15]
  4. ;--------End changing----------------------------
  5.  
  6. Opt("GUIOnEventMode", 1)
  7. $Form1 = GUICreate("ASCII",600,600,-1,-1,0x02000000)
  8. GUISetBkColor(0)
  9. GUISetOnEvent(-3,"Bye")
  10. $width = 600
  11. $height = 600
  12. $maxiteration = $SEED[1]
  13. for $py = 0 to $height step 10
  14. for $px = 0 to $width Step 10
  15. $x0 = (4/$width)*$px-2
  16. $y0 = (4/$height)*$py-2
  17. $x = $x0
  18. $y = $y0
  19. $iteration = 0
  20. While (($x*$x + $y*$y) < 4  AND  $iteration < $maxiteration)
  21. $xtemp = $x*$x - $y*$y + $x0
  22. $y = $SEED[0]*$x*$y + $y0
  23. $x = $xtemp
  24. $iteration+= 1
  25. WEnd
  26. GUICtrlCreateLabel(Chr(Random(65,90,1)),$px,$py,15,15)
  27. GUICtrlSetColor(-1,($iteration/$maxiteration)*0xFFFF)
  28. GUICtrlSetFont(-1,8)
  29. Next
  30. Next
  31. GUISetState()
  32. While 1
  33.     Sleep(100)
  34. WEnd
  35. Func Bye()
  36.     Exit
  37. EndFunc