Exponentielles Wachstum

  • Hallo erstmal, hier stelle ich mein erstes GDI+ Skript vor (Ich glaub auch mein erstes Skript im Forum :D ).
    Dieses Skript zeichnet einen Graphen zu einem exponentiellen Wachstum.(Haben wir grad in der Schule)

    Die Formel ist: B(t) = B(0) * k ^ t

    -B(0) ist der Grundwert auf der Y-Achse/Anfangsbestand
    -k ist der Wachstumsfaktor
    -t ist der jeweilige X-Achsen Wert


    Ursprüngliches Skript:

    Skript
    [autoit]


    #cs ----------------------------------------------------------------------------

    [/autoit] [autoit][/autoit] [autoit]

    AutoIt Version: 3.3.4.0
    Author: ClezZ

    [/autoit] [autoit][/autoit] [autoit]

    Script Function:
    Stellt ein exponentielles Wachstum dar

    [/autoit] [autoit][/autoit] [autoit]

    #ce ----------------------------------------------------------------------------

    [/autoit] [autoit][/autoit] [autoit]

    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <GUIConstants.au3>
    #include <GDIPlus.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Global $Wert[11]
    Global $i = 0

    [/autoit] [autoit][/autoit] [autoit]

    #Region ### START Koda GUI section ### Form=
    Global $Eingabefenster = GUICreate("Informationen", 535, 229, -1, -1)
    Global $Beschreibung = GUICtrlCreateLabel("Bitte geben Sie die Gleichung des exponentiellen Wachstums ein:", 16, 8, 314, 17)
    Global $B_von_t_gleich = GUICtrlCreateLabel("B(t) = ", 16, 72, 58, 24)
    GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
    Global $Term_Input1 = GUICtrlCreateInput("", 80, 72, 89, 28)
    GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
    Global $Term_Input2 = GUICtrlCreateInput("", 208, 72, 89, 28)
    GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
    Global $Klammer_zu = GUICtrlCreateLabel(")", 300, 72, 20, 24)
    GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
    Global $mal = GUICtrlCreateLabel("x (", 184, 72, 24, 24)
    GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
    Global $Hoch_t = GUICtrlCreateLabel(" t", 307, 64, 16, 20)
    GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
    Global $Beschreibung_B_von_0 = GUICtrlCreateLabel("B(0)", 96, 112, 38, 24)
    GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
    Global $Beschreibung_k = GUICtrlCreateLabel(" k", 208, 112, 38, 24)
    GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
    Global $Bestaetigungsbutton = GUICtrlCreateButton("Bestätigen", 72, 152, 201, 57, 0)
    Global $Infobutton = GUICtrlCreateButton("Info", 440, 16, 49, 33, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    GUIDelete($Eingabefenster)
    MsgBox(64, "", "Programm wurde beendet")
    Exit
    Case $Infobutton
    MsgBox(64, "Informationsbox", "Dieses Programm dient zur Veranschaulichung, von exponentiellem Wachstum. In den einzelnen Eingabefeldern dürfen auch Rechnungen ausgeführt werden. Das Koordinatensystem geht in der Y-Achse von etwas weniger als 0 bis etwas mehr als 90. In der X-Achse geht es von 0 in einser Schritten bis 10.")
    Case $Bestaetigungsbutton
    $Term1_String = GUICtrlRead($Term_Input1)
    $Term2_String = GUICtrlRead($Term_Input2)
    If $Term1_String = "" Then
    MsgBox(64, "Fehler", "Sie haben das erste Feld nicht ausgefüllt!")
    ElseIf $Term2_String = "" Then
    MsgBox(64, "Fehler", "Sie haben das zweite Feld nicht ausgefüllt!")
    Else
    $Term1_String = StringReplace($Term1_String, ",", ".")
    $Term2_String = StringReplace($Term2_String, ",", ".")
    $Term1 = Execute($Term1_String)
    $Term2 = Execute($Term2_String)
    GUIDelete($Eingabefenster)

    [/autoit] [autoit][/autoit] [autoit]

    Do
    $Wert[$i] = (($Term2) ^ $i) * ($Term1)
    $i = $i + 1
    Until $i = 11

    [/autoit] [autoit][/autoit] [autoit]

    ExitLoop

    [/autoit] [autoit][/autoit] [autoit]

    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    ;====================================================================================================== Ende der Berechnungen. Koordinatensysten:

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $Koordinatensystem = GUICreate("Koordinatensystem", 400, 400, -1, -1)
    GUISetState(@SW_SHOW)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_Startup()

    [/autoit] [autoit][/autoit] [autoit]

    Global $GDIPlus_GUI = _GDIPlus_GraphicsCreateFromHWND($Koordinatensystem)
    _GDIPlus_GraphicsSetSmoothingMode($GDIPlus_GUI, 0)
    Global $Bitmap = _GDIPlus_BitmapCreateFromGraphics(400, 400, $GDIPlus_GUI)
    Global $Buffer = _GDIPlus_ImageGetGraphicsContext($Bitmap)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Global $Pen = _GDIPlus_PenCreate(0xFF000000, 1)

    [/autoit] [autoit][/autoit] [autoit]

    ;Achsen zeichnen:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 30, 390, 30, 1, $Pen) ;Y-Achse, Länge: 389
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 10, 370, 390, 370, $Pen) ;X-Achse, Länge: 380
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 26, 6, 30, 1, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 34, 6, 30, 1, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 383, 374, 390, 370, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 383, 366, 390, 370, $Pen)

    [/autoit] [autoit][/autoit] [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    [/autoit] [autoit][/autoit] [autoit]

    ;Y-Achsen Striche:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 25, 330, 35, 330, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 25, 290, 35, 290, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 25, 250, 35, 250, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 25, 210, 35, 210, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 25, 170, 35, 170, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 25, 130, 35, 130, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 25, 90, 35, 90, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 25, 50, 35, 50, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 25, 10, 35, 10, $Pen)

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    [/autoit] [autoit][/autoit] [autoit]

    ;X-Achsen Striche:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 60, 365, 60, 375, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 95, 365, 95, 375, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 130, 365, 130, 375, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 165, 365, 165, 375, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 200, 365, 200, 375, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 235, 365, 235, 375, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 270, 365, 270, 375, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 305, 365, 305, 375, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 340, 365, 340, 375, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 375, 365, 375, 375, $Pen)

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    [/autoit] [autoit][/autoit] [autoit]

    ;Y-Achsen Zahlen:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    GUICtrlCreateLabel("0", 10, 375, 7, 12)
    GUICtrlCreateLabel("10", 10, 325, 13, 12)
    GUICtrlCreateLabel("20", 10, 285, 13, 12)
    GUICtrlCreateLabel("30", 10, 245, 13, 12)
    GUICtrlCreateLabel("40", 10, 205, 13, 12)
    GUICtrlCreateLabel("50", 10, 165, 13, 12)
    GUICtrlCreateLabel("60", 10, 125, 13, 12)
    GUICtrlCreateLabel("70", 10, 85, 13, 12)
    GUICtrlCreateLabel("80", 10, 45, 13, 12)
    GUICtrlCreateLabel("90", 10, 5, 13, 12)

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    [/autoit] [autoit][/autoit] [autoit]

    ;X-Achsen Zahlen;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    GUICtrlCreateLabel("1", 58, 375, 7, 12)
    GUICtrlCreateLabel("2", 93, 375, 7, 12)
    GUICtrlCreateLabel("3", 128, 375, 7, 12)
    GUICtrlCreateLabel("4", 163, 375, 7, 12)
    GUICtrlCreateLabel("5", 198, 375, 7, 12)
    GUICtrlCreateLabel("6", 233, 375, 7, 12)
    GUICtrlCreateLabel("7", 268, 375, 7, 12)
    GUICtrlCreateLabel("8", 303, 375, 7, 12)
    GUICtrlCreateLabel("9", 338, 375, 7, 12)
    GUICtrlCreateLabel("10", 369, 375, 13, 12)

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;====================================================================================================== Ende des Koordinatensystems. Punkte einzeichnen:

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 25, 370 - (4 * $Wert[0]) + 5, 35, 370 - (4 * $Wert[0]) - 5, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 25, 370 - (4 * $Wert[0]) - 5, 35, 370 - (4 * $Wert[0]) + 5, $Pen)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 55, 370 - (4 * $Wert[1]) + 5, 65, 370 - (4 * $Wert[1]) - 5, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 55, 370 - (4 * $Wert[1]) - 5, 65, 370 - (4 * $Wert[1]) + 5, $Pen)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 90, 370 - (4 * $Wert[2]) + 5, 100, 370 - (4 * $Wert[2]) - 5, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 90, 370 - (4 * $Wert[2]) - 5, 100, 370 - (4 * $Wert[2]) + 5, $Pen)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 125, 370 - (4 * $Wert[3]) + 5, 135, 370 - (4 * $Wert[3]) - 5, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 125, 370 - (4 * $Wert[3]) - 5, 135, 370 - (4 * $Wert[3]) + 5, $Pen)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 160, 370 - (4 * $Wert[4]) + 5, 170, 370 - (4 * $Wert[4]) - 5, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 160, 370 - (4 * $Wert[4]) - 5, 170, 370 - (4 * $Wert[4]) + 5, $Pen)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 195, 370 - (4 * $Wert[5]) + 5, 205, 370 - (4 * $Wert[5]) - 5, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 195, 370 - (4 * $Wert[5]) - 5, 205, 370 - (4 * $Wert[5]) + 5, $Pen)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 230, 370 - (4 * $Wert[6]) + 5, 240, 370 - (4 * $Wert[6]) - 5, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 230, 370 - (4 * $Wert[6]) - 5, 240, 370 - (4 * $Wert[6]) + 5, $Pen)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 265, 370 - (4 * $Wert[7]) + 5, 275, 370 - (4 * $Wert[7]) - 5, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 265, 370 - (4 * $Wert[7]) - 5, 275, 370 - (4 * $Wert[7]) + 5, $Pen)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 300, 370 - (4 * $Wert[8]) + 5, 310, 370 - (4 * $Wert[8]) - 5, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 300, 370 - (4 * $Wert[8]) - 5, 310, 370 - (4 * $Wert[8]) + 5, $Pen)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 335, 370 - (4 * $Wert[9]) + 5, 345, 370 - (4 * $Wert[9]) - 5, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 335, 370 - (4 * $Wert[9]) - 5, 345, 370 - (4 * $Wert[9]) + 5, $Pen)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 370, 370 - (4 * $Wert[10]) + 5, 380, 370 - (4 * $Wert[10]) - 5, $Pen)
    _GDIPlus_GraphicsDrawLine($GDIPlus_GUI, 370, 370 - (4 * $Wert[10]) - 5, 380, 370 - (4 * $Wert[10]) + 5, $Pen)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    _GDIPlus_BitmapDispose($Bitmap)
    _GDIPlus_GraphicsDispose($Buffer)
    _GDIPlus_GraphicsDispose($GDIPlus_GUI)
    _GDIPlus_PenDispose($Pen)
    _GDIPlus_Shutdown()
    Exit
    EndSwitch
    WEnd

    [/autoit]

    Skript mit Fotofunktion:

    Spoiler anzeigen
    [autoit]


    #cs ----------------------------------------------------------------------------

    [/autoit] [autoit][/autoit] [autoit]

    AutoIt Version: 3.3.4.0
    Author: ClezZ

    [/autoit] [autoit][/autoit] [autoit]

    Script Function:
    Stellt ein exponentielles Wachstum dar

    [/autoit] [autoit][/autoit] [autoit]

    #ce ----------------------------------------------------------------------------

    [/autoit] [autoit][/autoit] [autoit]

    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <GUIConstants.au3>
    #include <ScreenCapture.au3>
    #include <GDIPlus.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Global $Wert[11]
    Global $i = 0

    [/autoit] [autoit][/autoit] [autoit]

    #Region ### START Koda GUI section ### Form=
    Global $Eingabefenster = GUICreate("Informationen", 535, 229, -1, -1)
    Global $Beschreibung = GUICtrlCreateLabel("Bitte geben Sie die Gleichung des exponentiellen Wachstums ein:", 16, 8, 314, 17)
    Global $B_von_t_gleich = GUICtrlCreateLabel("B(t) = ", 16, 72, 58, 24)
    GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
    Global $Term_Input1 = GUICtrlCreateInput("", 80, 72, 89, 28)
    GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
    Global $Term_Input2 = GUICtrlCreateInput("", 208, 72, 89, 28)
    GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
    Global $Klammer_zu = GUICtrlCreateLabel(")", 300, 72, 20, 24)
    GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
    Global $mal = GUICtrlCreateLabel("x (", 184, 72, 24, 24)
    GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
    Global $Hoch_t = GUICtrlCreateLabel(" t", 307, 64, 16, 20)
    GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
    Global $Beschreibung_B_von_0 = GUICtrlCreateLabel("B(0)", 96, 112, 38, 24)
    GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
    Global $Beschreibung_k = GUICtrlCreateLabel(" k", 208, 112, 38, 24)
    GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
    Global $Bestaetigungsbutton = GUICtrlCreateButton("Bestätigen", 72, 152, 201, 57, 0)
    Global $Infobutton = GUICtrlCreateButton("Info", 440, 16, 49, 33, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    GUIDelete($Eingabefenster)
    MsgBox(64, "", "Programm wurde beendet")
    Exit
    Case $Infobutton
    MsgBox(64, "Informationsbox", "Dieses Programm dient zur Veranschaulichung, von exponentiellem Wachstum. In den einzelnen Eingabefeldern dürfen auch Rechnungen ausgeführt werden. Das Koordinatensystem geht in der Y-Achse von etwas weniger als 0 bis etwas mehr als 90. In der X-Achse geht es von 0 in einser Schritten bis 10.")
    Case $Bestaetigungsbutton
    $Term1_String = GUICtrlRead($Term_Input1)
    $Term2_String = GUICtrlRead($Term_Input2)
    If $Term1_String = "" Then
    MsgBox(64, "Fehler", "Sie haben das erste Feld nicht ausgefüllt!")
    ElseIf $Term2_String = "" Then
    MsgBox(64, "Fehler", "Sie haben das zweite Feld nicht ausgefüllt!")
    Else
    $Term1_String = StringReplace($Term1_String, ",", ".")
    $Term2_String = StringReplace($Term2_String, ",", ".")
    $Term1 = Execute($Term1_String)
    $Term2 = Execute($Term2_String)
    GUIDelete($Eingabefenster)

    [/autoit] [autoit][/autoit] [autoit]

    Do
    $Wert[$i] = (($Term2) ^ $i) * ($Term1)
    $i = $i + 1
    Until $i = 11

    [/autoit] [autoit][/autoit] [autoit]

    ExitLoop

    [/autoit] [autoit][/autoit] [autoit]

    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    ;====================================================================================================== Ende der Berechnungen. Koordinatensysten:

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $Koordinatensystem = GUICreate("Koordinatensystem", 400, 400, -1, -1)
    GUISetState(@SW_SHOW)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_Startup()

    [/autoit] [autoit][/autoit] [autoit]

    Global $GDIPlus_GUI = _GDIPlus_GraphicsCreateFromHWND($Koordinatensystem)
    _GDIPlus_GraphicsSetSmoothingMode($GDIPlus_GUI, 0)
    Global $Bitmap = _GDIPlus_BitmapCreateFromGraphics(400, 400, $GDIPlus_GUI)
    Global $Buffer = _GDIPlus_ImageGetGraphicsContext($Bitmap)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Global $Pen = _GDIPlus_PenCreate(0xFF000000, 1)

    [/autoit] [autoit][/autoit] [autoit]

    ;Achsen zeichnen:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawLine($Buffer, 30, 390, 30, 1, $Pen) ;Y-Achse, Länge: 389
    _GDIPlus_GraphicsDrawLine($Buffer, 10, 370, 390, 370, $Pen) ;X-Achse, Länge: 380
    _GDIPlus_GraphicsDrawLine($Buffer, 26, 6, 30, 1, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 34, 6, 30, 1, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 383, 374, 390, 370, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 383, 366, 390, 370, $Pen)

    [/autoit] [autoit][/autoit] [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    [/autoit] [autoit][/autoit] [autoit]

    ;Y-Achsen Striche:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawLine($Buffer, 25, 330, 35, 330, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 25, 290, 35, 290, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 25, 250, 35, 250, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 25, 210, 35, 210, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 25, 170, 35, 170, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 25, 130, 35, 130, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 25, 90, 35, 90, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 25, 50, 35, 50, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 25, 10, 35, 10, $Pen)

    [/autoit] [autoit][/autoit] [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    [/autoit] [autoit][/autoit] [autoit]

    ;X-Achsen Striche:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawLine($Buffer, 60, 365, 60, 375, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 95, 365, 95, 375, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 130, 365, 130, 375, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 165, 365, 165, 375, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 200, 365, 200, 375, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 235, 365, 235, 375, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 270, 365, 270, 375, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 305, 365, 305, 375, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 340, 365, 340, 375, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 375, 365, 375, 375, $Pen)

    [/autoit] [autoit][/autoit] [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    [/autoit] [autoit][/autoit] [autoit]

    ;Y-Achsen Zahlen:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlCreateLabel("0", 10, 375, 7, 12)
    GUICtrlCreateLabel("10", 10, 325, 13, 12)
    GUICtrlCreateLabel("20", 10, 285, 13, 12)
    GUICtrlCreateLabel("30", 10, 245, 13, 12)
    GUICtrlCreateLabel("40", 10, 205, 13, 12)
    GUICtrlCreateLabel("50", 10, 165, 13, 12)
    GUICtrlCreateLabel("60", 10, 125, 13, 12)
    GUICtrlCreateLabel("70", 10, 85, 13, 12)
    GUICtrlCreateLabel("80", 10, 45, 13, 12)
    GUICtrlCreateLabel("90", 10, 5, 13, 12)

    [/autoit] [autoit][/autoit] [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    [/autoit] [autoit][/autoit] [autoit]

    ;X-Achsen Zahlen;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlCreateLabel("1", 58, 375, 7, 12)
    GUICtrlCreateLabel("2", 93, 375, 7, 12)
    GUICtrlCreateLabel("3", 128, 375, 7, 12)
    GUICtrlCreateLabel("4", 163, 375, 7, 12)
    GUICtrlCreateLabel("5", 198, 375, 7, 12)
    GUICtrlCreateLabel("6", 233, 375, 7, 12)
    GUICtrlCreateLabel("7", 268, 375, 7, 12)
    GUICtrlCreateLabel("8", 303, 375, 7, 12)
    GUICtrlCreateLabel("9", 338, 375, 7, 12)
    GUICtrlCreateLabel("10", 369, 375, 13, 12)

    [/autoit] [autoit][/autoit] [autoit]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;====================================================================================================== Ende des Koordinatensystems. Punkte einzeichnen:

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawLine($Buffer, 25, 370 - (4 * $Wert[0]) + 5, 35, 370 - (4 * $Wert[0]) - 5, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 25, 370 - (4 * $Wert[0]) - 5, 35, 370 - (4 * $Wert[0]) + 5, $Pen)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawLine($Buffer, 55, 370 - (4 * $Wert[1]) + 5, 65, 370 - (4 * $Wert[1]) - 5, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 55, 370 - (4 * $Wert[1]) - 5, 65, 370 - (4 * $Wert[1]) + 5, $Pen)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawLine($Buffer, 90, 370 - (4 * $Wert[2]) + 5, 100, 370 - (4 * $Wert[2]) - 5, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 90, 370 - (4 * $Wert[2]) - 5, 100, 370 - (4 * $Wert[2]) + 5, $Pen)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawLine($Buffer, 125, 370 - (4 * $Wert[3]) + 5, 135, 370 - (4 * $Wert[3]) - 5, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 125, 370 - (4 * $Wert[3]) - 5, 135, 370 - (4 * $Wert[3]) + 5, $Pen)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawLine($Buffer, 160, 370 - (4 * $Wert[4]) + 5, 170, 370 - (4 * $Wert[4]) - 5, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 160, 370 - (4 * $Wert[4]) - 5, 170, 370 - (4 * $Wert[4]) + 5, $Pen)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawLine($Buffer, 195, 370 - (4 * $Wert[5]) + 5, 205, 370 - (4 * $Wert[5]) - 5, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 195, 370 - (4 * $Wert[5]) - 5, 205, 370 - (4 * $Wert[5]) + 5, $Pen)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawLine($Buffer, 230, 370 - (4 * $Wert[6]) + 5, 240, 370 - (4 * $Wert[6]) - 5, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 230, 370 - (4 * $Wert[6]) - 5, 240, 370 - (4 * $Wert[6]) + 5, $Pen)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawLine($Buffer, 265, 370 - (4 * $Wert[7]) + 5, 275, 370 - (4 * $Wert[7]) - 5, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 265, 370 - (4 * $Wert[7]) - 5, 275, 370 - (4 * $Wert[7]) + 5, $Pen)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawLine($Buffer, 300, 370 - (4 * $Wert[8]) + 5, 310, 370 - (4 * $Wert[8]) - 5, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 300, 370 - (4 * $Wert[8]) - 5, 310, 370 - (4 * $Wert[8]) + 5, $Pen)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawLine($Buffer, 335, 370 - (4 * $Wert[9]) + 5, 345, 370 - (4 * $Wert[9]) - 5, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 335, 370 - (4 * $Wert[9]) - 5, 345, 370 - (4 * $Wert[9]) + 5, $Pen)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawLine($Buffer, 370, 370 - (4 * $Wert[10]) + 5, 380, 370 - (4 * $Wert[10]) - 5, $Pen)
    _GDIPlus_GraphicsDrawLine($Buffer, 370, 370 - (4 * $Wert[10]) - 5, 380, 370 - (4 * $Wert[10]) + 5, $Pen)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsDrawImageRect($GDIPlus_GUI, $Bitmap, 0, 0, 400, 400)

    [/autoit] [autoit][/autoit] [autoit]

    HotKeySet("{p}","_Photo")
    HotKeySet("{P}","_Photo")

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    _GDIPlus_BitmapDispose($Bitmap)
    _GDIPlus_GraphicsDispose($Buffer)
    _GDIPlus_GraphicsDispose($GDIPlus_GUI)
    _GDIPlus_PenDispose($Pen)
    _GDIPlus_Shutdown()
    Exit
    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func _Photo()
    Local $BildSpeicherPfad = FileSaveDialog("Bild speichern",@DesktopDir, "JPEG (*.jpg)", 2+16, "Exponentielles Wachstum-Schaubild") & '.jpg'
    _ScreenCapture_CaptureWnd($BildSpeicherPfad, $Koordinatensystem, 10, 24, 400, 410, False)
    EndFunc

    [/autoit]

    Bitte nicht zu streng sein, ist ja mein erstes Skript :D

  • hammer script ich bin echt neidisch dass du sowas drauf hast!

    'Applause'!!!

    also ich nehm den Hut ab!

    du bist mein Vorbild! ;)

  • Willst du die Formel für Exponentielles Wachstum Klasse 13 wissen? e-FUnktionen ftw ;)

    Spoiler anzeigen

    f(t) = a * e ^ (kt)
    a = Anfangsbestand
    e = eulersche Zahl
    k = Wachstumskonstante (was anderes als der Wachstumsfaktor)
    t = Zeit t

  • hmmm... wenn ich mir das so anschaue, eher nicht :D
    Außerdem bin ich G8 (muss man jetzt ja :cursing: ), und da geht es nur bis zur 12ten Klasse :P

    Edit: Ja Name22, das ist mir schon klar :P

  • Da kannst du einen drauf lassen, dass das noch unterrichtet wird ;)

    Nur mal so als Wink, jedes exponential-Funktion lässt sich als e-Funktion schreiben, was eigentlich immer gemacht wird, um u.a. eine bessere (oder überhaupt) eine Vergleichbarkeit zu ermöglichen.

    F(x) = a * b ^x ist das gleiche wie
    F(x) = a* e ^ (ln (b)*x )
    da x = e^ln(x) für alle x aus R+ ;)
    Die e-Funktion hat natrülich noch andere Besonderheiten, die sprech ich hier aber mal nicht an.

  • Quatsch, wenn ihr das noch nicht hattet, ist klar.
    Wenn ihr grad erst mit exponetiellen Funktionen angefangen habt ist deine Programm doch super !
    Ein Logarithmus ist die Umkehr der Potenz.
    Der bekannteste Logarithmus ist der dekadische, zur Basis 10.
    Der bringt uns hier aber nicht weiter, da unsere Basis e und nicht 10 ist.
    Hier kommt der Ln ins Spiel, dieser hat als Basis e.
    Der Ln wird dabei Logarithmus naturalis genannt.
    (Wobei e die eulersche Zahl ist).
    Und wenn man Basis hoch Logarithmus hat (und der Logarithmus zur Basis ist), dann hat man Funktion und Umkehrfunktion, die Wirkungen heben sich folglich auf ;)

  • aha, und e ist also:
    [Blockierte Grafik: http://upload.wikimedia.org/math/a/9/5/a95e225cdb902ddc030c5459598934d1.png
    ...und so weiter.

  • *Was hab ich nur wieder angefangen?* :S
    Nein im Ernst, das Programm ist doch gut.

    Den natürlichen Logarithmus und e-Funktionen bekommst du noch früh genug, zusammen mit Vektoren und anderem Kram wie Integralen. Alles Kursstufenstoff, den du (noch) nicht benötigst.

    PS: @SlowlyDead: gib mir mal den ln(0) oder ln(-1). x = e^ln(x) gilt also nur für positive x, was für exp. Wachstum auch völlig ausreicht.

  • Nur noch ganz kurz etwas:

    Zu Vektoren, in der Hilfe steht, dass:

    [autoit]

    4*ATan(1)

    [/autoit]


    Pi ist. Hat das nicht irgendwas mit (Kreis) Vektoren zu tun, oder ist das wieder was anderes?


    ENDE
    :D

  • PI brauchst Du zur Berechnung von Kreisen:
    Inhalt eines Kreises: r²*pi (wenn ich mich nicht irre)
    //Edit:
    Kennst Du Dich mit Blender aus?

  • Mit Blender nicht so richtig, hab aber mein (//Edit: altes) Avatar mit Blender gemacht ( vor 1 1/2 Jahren).
    Aber so richtig kenn ich mich da jetzt auch nicht mehr so aus. :(
    Edit: Wenn es dir nur um 3D Bilder geht nimm diese "Testversion" von Google Sketchup, wenn du nicht allzu viel gegen Google hast. :D
    Allerdings musst du ein bissl (glaub 200€) Zahlen, wenn du Modelle in andere Formate als *.skp exportieren willst.

  • Ich hab nicht gesagt, dass Blender sch**** ist, ich hab ihm nur einen vorschlag gemacht!!! X(
    Und nein, ich kenn mich nicht mit Python aus.