Eigentlich war das Script nur ein Langeweile Projekt eines freien Nachmittages, aber weil es (meiner Meinung nach) doch recht gut aussieht stell ich es mal hier rein.
Spoiler anzeigen
Global $iFrames = 150
Global $iFPS = 20
Global $iStars = Random(500,3000,1)
Global $iSeed = Random(1,1000000,1)
Global $iRadius = Random(50,200,1)
Opt("GUIOnEventMode",1)
Local Const $iRtoD = ACos(-1)/180
#include<GDIPlus.au3>
_GDIPlus_Startup()
Local $hGUI = GUICreate("Grafik User Interface",500,500,-1,-1)
GUISetOnEvent(-3,"_exit",$hGUI)
$hCMenue = GUICtrlCreateContextMenu()
$hCMenue_Neu = GUICtrlCreateMenu("Neu",$hCMenue)
$hCMenue_Neu_Neu = GUICtrlCreateMenuItem("Neu",$hCMenue_Neu)
GUICtrlSetOnEvent($hCMenue_Neu_Neu,"Neu")
$hCMenue_Neu_Zufaellig = GUICtrlCreateMenuItem("Zufällig",$hCMenue_Neu)
GUICtrlSetOnEvent($hCMenue_Neu_Zufaellig,"Zufallig")
$hCMenue_FPS = GUICtrlCreateMenu("Bildrate",$hCMenue)
$hCMenue_FPS_5 = GUICtrlCreateMenuItem("5",$hCMenue_FPS)
GUICtrlSetOnEvent($hCMenue_FPS_5,"FPS_05")
$hCMenue_FPS_10 = GUICtrlCreateMenuItem("10",$hCMenue_FPS)
GUICtrlSetOnEvent($hCMenue_FPS_10,"FPS_10")
$hCMenue_FPS_15 = GUICtrlCreateMenuItem("15",$hCMenue_FPS)
GUICtrlSetOnEvent($hCMenue_FPS_15,"FPS_15")
$hCMenue_FPS_20 = GUICtrlCreateMenuItem("20",$hCMenue_FPS)
GUICtrlSetOnEvent($hCMenue_FPS_20,"FPS_20")
$hCMenue_FPS_25 = GUICtrlCreateMenuItem("25",$hCMenue_FPS)
GUICtrlSetOnEvent($hCMenue_FPS_25,"FPS_25")
$hCMenue_FPS_30 = GUICtrlCreateMenuItem("30",$hCMenue_FPS)
GUICtrlSetOnEvent($hCMenue_FPS_30,"FPS_30")
$hCMenue_FPS_Mehr = GUICtrlCreateMenuItem("Mehr...",$hCMenue_FPS)
GUICtrlSetOnEvent($hCMenue_FPS_Mehr,"FPS_")
$hCMenue_Copy = GUICtrlCreateMenuItem("Kopieren",$hCMenue)
GUICtrlSetOnEvent($hCMenue_Copy,"Copy")
$hCMenue_Paste = GUICtrlCreateMenuItem("Einfügen",$hCMenue)
GUICtrlSetOnEvent($hCMenue_Paste,"Paste")
Local $hGrafik = _GDIPlus_GraphicsCreateFromHWND($hGUI)
Local $hBufferBitmap = _GDIPlus_BitmapCreateFromGraphics(500,500,$hGrafik)
Local $hBufferContext = _GDIPlus_ImageGetGraphicsContext($hBufferBitmap)
GUISetState(1,$hGUI)
Global $aBitmaps = Create($iFrames,$iStars,$iSeed,$iRadius)
Local $iTimer = TimerInit()
Local $iFrame = 0
Do
$iFrame = Mod(Timerdiff($iTimer)/(1000/$iFPS),$iFrames)
_GDIPlus_GraphicsDrawImage($hGrafik,$aBitmaps[$iFrame],0,0)
Until 0
Func Create($iFrames,$iStars,$iSeed,$iRadius)
GUICtrlSetState($hCMenue_Neu,128)
GUICtrlSetState($hCMenue_Paste,128)
Local $iSSeed = 0, $iDistanz = 0, $iWinkel = 0,$iTife = 0, $iFarbe = 0, $hContext = 0x00
Local $aBrush[7]
Local $aBitmap[$iFrames]
$aBrush[0] = _GDIPlus_BrushCreateSolid(0x999999FF)
$aBrush[1] = _GDIPlus_BrushCreateSolid(0x99FFFF99)
$aBrush[2] = _GDIPlus_BrushCreateSolid(0x99FFFFFF)
$aBrush[3] = _GDIPlus_BrushCreateSolid(0x99FF9999)
$aBrush[4] = _GDIPlus_BrushCreateSolid(0xFFFF9999)
$aBrush[5] = _GDIPlus_BrushCreateSolid(0x99FF4444)
$aBrush[6] = _GDIPlus_BrushCreateSolid(0xFF774444)
If $iSeed = 4474194 Then
$hBrush = _GDIPlus_BrushCreateSolid(0x88FF0000)
Else
$hBrush = _GDIPlus_BrushCreateSolid(0xFFFFFFFF)
EndIf
$hPen = _GDIPlus_PenCreate(0xFFFFFFFF,2)
_GDIPlus_GraphicsClear($hBufferContext,0xFF000000)
_GDIPlus_GraphicsClear($hGrafik,0xFF000000)
Local $iSeed2 = Mod(Round($iSeed,2),ACos(-1))*(100/ACos(-1))
For $i = 0 to $iFrames-1
$aBitmap[$i] = _GDIPlus_BitmapCreateFromGraphics(500,500,$hGrafik)
$hContext = _GDIPlus_ImageGetGraphicsContext($aBitmap[$i])
_GDIPlus_GraphicsClear($hContext,0xFF000000)
For $ii = 1 to $iStars
$iSSeed = $iSeed2*$ii
$iDistanz = Mod($iSSeed,1)*$iRadius
$iWinkel = Mod(Mod($iSSeed,0.36)*1000 + ($i+1)/$iFrames*360,360)
$iTife = (Mod($iSSeed,0.5)-0.25)*Mod($iSSeed,100);$iSSeed/100
If $iSeed = 4474194 Then
$iFarbe = Int($iDistanz / $iRadius*2)+5
Else
$iFarbe = Int($iDistanz / $iRadius*5)
EndIf
_GDIPlus_GraphicsFillRect($hContext,250 + Sin($iRtoD*$iWinkel)*$iDistanz,250 + Cos($iRtoD*$iWinkel)*$iDistanz*0.50 + $iTife,1,1,$aBrush[$iFarbe])
Next
_GDIPlus_GraphicsDispose($hContext)
If $i = 0 Then
_GDIPlus_GraphicsDrawImage($hBufferContext,$aBitmap[0],0,0)
_GDIPlus_GraphicsDrawRect($hBufferContext,175,240,150,20,$hPen)
Local $aArray[5][2] = [[4]]
$aArray[1][0] = 174
$aArray[1][1] = 227
$aArray[2][0] = 190+30
$aArray[2][1] = 227
$aArray[3][0] = 325
$aArray[3][1] = 227+12
$aArray[4][0] = 174
$aArray[4][1] = 227+12
_GDIPlus_GraphicsFillPolygon($hBufferContext,$aArray,$hBrush)
_GDIPlus_GraphicsDrawString($hBufferContext,"Laden...",180,227,"Arial",8)
EndIf
_GDIPlus_GraphicsFillRect($hBufferContext,177,242,($i+1)/$iFrames*146,16,$hBrush)
_GDIPlus_GraphicsDrawImage($hGrafik,$hBufferBitmap,0,0)
Next
For $i = 0 to 6
_GDIPlus_BrushDispose($aBrush[$i])
Next
_GDIPlus_BrushDispose($hBrush)
_GDIPlus_PenDispose($hPen)
GUICtrlSetState($hCMenue_Neu,64)
GUICtrlSetState($hCMenue_Paste,64)
Return $aBitmap
EndFunc
Func Zufallig()
For $i = 0 to UBound($aBitmaps)-1
_GDIPlus_BitmapDispose($aBitmaps[$i])
Next
$iStars = Random(500,3000,1)
$iSeed = Random(1,1000000,1)
$iRadius = Random(50,200,1)
$aBitmaps = Create($iFrames,$iStars,$iSeed,$iRadius)
EndFunc
Func Neu()
Opt("GUIOnEventMode",0)
Local $hGUI2 = GUICreate("Neu",300,124,-1,-1)
GUICtrlCreateLabel("Seed:",0,12,100,19,2)
Local $hInput_Seed = GUICtrlCreateInput($iSeed,110,10,150,19,1)
GUICtrlCreateLabel("Frames:",0,32,100,19,2)
Local $hInput_Frames = GUICtrlCreateInput($iFrames,110,30,150,19,1)
GUICtrlCreateLabel("Sterne:",0,52,100,19,2)
Local $hInput_Stars = GUICtrlCreateInput($iStars,110,50,150,19,1)
GUICtrlCreateLabel("Radius:",0,72,100,19,2)
Local $hInput_Radius = GUICtrlCreateInput($iRadius,110,70,150,19,1)
Local $hButton_Ok = GUICtrlCreateButton("Erstellen",100,95,100,22)
GUISetState(1,$hGUI2)
Do
$msg = GUIGetMsg()
sleep(25)
If $msg = -3 Then
Opt("GUIOnEventMode",1)
GUIDelete($hGUI2)
Return
EndIf
Until $msg = $hButton_Ok
Opt("GUIOnEventMode",1)
$iSeed = GUICtrlRead($hInput_Seed)
If StringRegExp($iSeed,"[^0-9]") Then $iSeed = Int(StringToBinary($iSeed))
$iFrames = GUICtrlRead($hInput_Frames)
$iStars = GUICtrlRead($hInput_Stars)
$iRadius = GUICtrlRead($hInput_Radius)
GUIDelete($hGUI2)
For $i = 0 to UBound($aBitmaps)-1
_GDIPlus_BitmapDispose($aBitmaps[$i])
Next
$aBitmaps = Create($iFrames,$iStars,$iSeed,$iRadius)
EndFunc
Func FPS_05()
$iFPS = 5
EndFunc
Func FPS_10()
$iFPS = 10
EndFunc
Func FPS_15()
$iFPS = 15
EndFunc
Func FPS_20()
$iFPS = 20
EndFunc
Func FPS_25()
$iFPS = 25
EndFunc
Func FPS_30()
$iFPS = 30
EndFunc
Func FPS_()
Local $iNewFPS = InputBox("Bildrate","",$iFPS)
If @error > 0 Then Return
$iNewFPS = Int($iNewFPS)
If $iNewFPS <= 0 Then
Msgbox(16,"Fehler","Der Eingabewert muss über 0 sein")
Else
$iFPS = $iNewFPS
EndIf
EndFunc
Func Copy()
ClipPut(String($iSeed)&"+"&String($iFrames)&"+"&String($iStars)&"+"&String($iRadius))
EndFunc
Func Paste()
Local $aArray = StringSplit(ClipGet(),"+")
If Not IsArray($aArray) or $aArray[0] <> 4 Then
msgbox(16,"Fehler","String konnte nicht eigefügt werden")
Return
EndIf
$iSeed = Int($aArray[1])
$iFrames = Int($aArray[2])
$iStars = Int($aArray[3])
$iRadius = Int($aArray[4])
For $i = 0 to UBound($aBitmaps)-1
_GDIPlus_BitmapDispose($aBitmaps[$i])
Next
$aBitmaps = Create($iFrames,$iStars,$iSeed,$iRadius)
EndFunc
Func _Exit()
For $i = 0 to UBound($aBitmaps)-1
_GDIPlus_BitmapDispose($aBitmaps[$i])
Next
_GDIPlus_GraphicsDispose($hBufferContext)
_GDIPlus_BitmapDispose($hBufferBitmap)
_GDIPlus_GraphicsDispose($hGrafik)
_GDIPlus_Shutdown()
exit
EndFunc
Dies ist einfach nur eine grafische Spielerei, welche ich heute nebenbei geschrieben habe.
Wenn man das Script startet einfach einen Moment warten bis es fertig geladen hat.
Über das Kontextmenü(Rechtsklick) bekommt man folgende Optionen:
[Neu]
Lädt eine neue Grafik mit zufälligen oder festgelegten Daten.
[Bildrate]
Über dieses Menü stellt man ein wie oft die Bilder pro Sekunde gewechselt werden.
[Kopieren]
Kopiert einen String aus welchem die Grafik Rekonstruiert werden kann.
[Einfügen]
Rekonstruiert anhand des durch [Kopieren] erhaltenen Strings eine Grafik
Und wenn jemand gute Seeds findet, könnte wir sie ja hier auch sammeln, dann geht der Thred auch hoffentlich nicht so schnell unter^^
Interessante Seeds
;---------------------------------------------------------------
Seed: AutoIt
Sterne: 500 - 1000
Radius: 151
Code: 127858751337793+150+1000+151
;----------------{Xorianator-Flügel }-------------------------
Autor: Xorianator
Seed: 881111141059711097116111114
Sterne: 1000
Radius: 150
Code: 881111141059711097116111114+150+1000+150
;-------------------------------------------------------------------
Autor: Xorianator
Seed:
66928340
Sterne: 2513
Radius: 164
Code: 66928340+150+2513+164
;-------------------------------------------------------------------
Autor: Xorianator
Seed: 20348746193
Sterne: 2513
Radius: 164
Code: 20348746193+150+2513+164
;-------------------------------------------------------------------
Autor: James1337
Seed: 477907
Sterne: 2513
Radius: 164
Code: 477907+150+2513+164
;-------------------------------------------------------------------
Autor: James1337
Seed: 204327
Sterne: 1108
Radius: 140
Code: 204327+150+1108+140
;--------------------------{ enormis }---------------------------
Autor:
chesstiger
Seed: 845034036
Sterne: 1108
Radius: 140
Code:
845034036+150+1108+140
;-------------------------------------------------------------------
Autor: chesstiger
Seed: 9223372036854775807
Sterne: 1405
Radius: 195
Code: 9223372036854775807+150+1405+195
[Edit:] Ich schreib einfach mal alle Seeds die hier gepostet werden in den Spoiler