Hallo,
ich blicke in deisem Script nicht so ganz durch aber weiß jemand wie ich hier zoomen kann. Also z.b alles doppelt so groß darstellen usw?
Spoiler anzeigen
#include <GUIConstants.au3>
[/autoit] [autoit][/autoit] [autoit]Opt("GUIOnEventMode", 1)
[/autoit] [autoit][/autoit] [autoit]$Form1 = GUICreate("lokster's Mandelbrot Set example", 200, 200)
GUISetState(@SW_SHOW)
GUISetOnEvent($GUI_EVENT_CLOSE, "Bye")
$user32 = DllOpen("user32.dll")
$gdi32 = DllOpen("gdi32.dll")
Mandelbrot()
[/autoit] [autoit][/autoit] [autoit]While 1
Sleep(100)
WEnd
Func Bye()
Exit
EndFunc ;==>Bye
Func pix($dc, $x, $y, $color)
DllCall($gdi32, "long", "SetPixel", "long", $dc, "long", $x, "long", $y, "long", $color)
EndFunc ;==>pix
Func GetDC($handle)
$dc = DllCall($user32, "int", "GetDC", "hwnd", $handle)
Return $dc[0]
EndFunc ;==>GetDC
Func Mandelbrot()
$dc = GetDC(WinGetHandle($Form1))
$width = 200
$height = 200
$maxiteration = 80 ; Die Schärfe
For $py = 0 To $height Step 1
For $px = 0 To $width Step 1
$x0 = (4 / $width) * $px - 2
$y0 = (4 / $height) * $py - 2
$x = $x0
$y = $y0
$iteration = 0
While (($x * $x + $y * $y) < 4 And $iteration < $maxiteration)
$xtemp = $x * $x - $y * $y + $x0
$y = 2 * $x * $y + $y0
$x = $xtemp
$iteration += 1
WEnd
pix($dc, $px , $py, ($iteration / $maxiteration) * 0xFF) ; I did't had time to implement some fancy colouring
Next
Next
EndFunc ;==>Mandelbrot