Anasayfa Programlama / Kodlar İndir / Download Makale / Yazı Resim / Fotoğraf
E-Learning / Video Matematik Hakkımda Bilgi Ziyaretçi Defteri

FRAKTAL 6 KODLARI - FRACTAL 6 CODES

VERSION 5.00
Begin VB.Form ana
AutoRedraw = -1 'True
BackColor = &H00800000&
Caption = "Fraktal - www.alieskici.com"
ClientHeight = 6060
ClientLeft = 165
ClientTop = 765
ClientWidth = 9870
BeginProperty Font
Name = "Arial"
Size = 9.75
Charset = 162
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFF00&
Icon = "ana.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
ScaleHeight = 404
ScaleMode = 3 'Pixel
ScaleWidth = 658
StartUpPosition = 3 'Windows Default
Begin VB.CheckBox chk_ontem
BackColor = &H00C00000&
Caption = "Temizle"
BeginProperty Font
Name = "Arial"
Size = 8.25
Charset = 162
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 4500
TabIndex = 43
Top = 3900
Value = 1 'Checked
Width = 840
End
Begin VB.CheckBox chk_jontem
BackColor = &H00C00000&
Caption = "Temizle"
BeginProperty Font
Name = "Arial"
Size = 8.25
Charset = 162
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 2475
TabIndex = 42
Top = 3900
Value = 1 'Checked
Width = 840
End
Begin VB.CommandButton cmd_ayar
BackColor = &H008080FF&
Caption = "&Ayarlar"
BeginProperty Font
Name = "Arial"
Size = 8.25
Charset = 162
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 390
Left = 8175
MaskColor = &H000000FF&
Style = 1 'Graphical
TabIndex = 41
Top = 150
Width = 1590
End
Begin VB.CommandButton cmd_p2oniz
BackColor = &H00FFC0C0&
Caption = "On izleme"
BeginProperty Font
Name = "Arial"
Size = 8.25
Charset = 162
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 390
Left = 4500
Style = 1 'Graphical
TabIndex = 40
Top = 3375
Width = 2115
End
Begin VB.PictureBox p2
AutoRedraw = -1 'True
BackColor = &H00000000&
ForeColor = &H0000FFFF&
Height = 2115
Left = 4500
ScaleHeight = 137
ScaleMode = 3 'Pixel
ScaleWidth = 137
TabIndex = 39
Top = 1050
Width = 2115
End
Begin VB.PictureBox p
AutoRedraw = -1 'True
AutoSize = -1 'True
BackColor = &H00000000&
ForeColor = &H0000FFFF&
Height = 1590
Left = 300
ScaleHeight = 102
ScaleMode = 3 'Pixel
ScaleWidth = 202
TabIndex = 35
Top = 1050
Width = 3090
End
Begin VB.CommandButton cmd_kap
BackColor = &H00FFC0C0&
Caption = "G&izle"
Height = 465
Left = 8325
Style = 1 'Graphical
TabIndex = 32
Top = 5100
Width = 1440
End
Begin VB.CommandButton cmd_j_buyut
BackColor = &H00FFC0C0&
Caption = "Buyutme modulu"
BeginProperty Font
Name = "Arial"
Size = 8.25
Charset = 162
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 390
Left = 600
Style = 1 'Graphical
TabIndex = 31
Top = 3825
Width = 1740
End
Begin VB.CommandButton cmd_j_on
BackColor = &H00FFC0C0&
Caption = "On izleme"
BeginProperty Font
Name = "Arial"
Size = 8.25
Charset = 162
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 390
Left = 2475
Style = 1 'Graphical
TabIndex = 30
Top = 3375
Width = 1665
End
Begin VB.TextBox renk_carpani
Height = 390
Left = 3450
TabIndex = 29
Text = "1"
ToolTipText = "Renk carpani"
Top = 2400
Width = 690
End
Begin VB.TextBox z_buyuktur
Height = 390
Left = 3450
TabIndex = 28
Text = "0"
ToolTipText = "Sinir farki"
Top = 1500
Width = 690
End
Begin VB.TextBox x1_ussu
Height = 390
Left = 3450
TabIndex = 27
Text = "1"
ToolTipText = "Us carpani"
Top = 1950
Width = 690
End
Begin VB.TextBox y1_carpani
Height = 390
Left = 3450
TabIndex = 26
Text = "2"
ToolTipText = "Ordinat carpani"
Top = 1050
Width = 690
End
Begin VB.ComboBox cmb_ite
Height = 360
Left = 2475
Style = 2 'Dropdown List
TabIndex = 25
ToolTipText = "Iterasyon sayisi"
Top = 2850
Width = 1665
End
Begin VB.CommandButton cmd_gos
BackColor = &H00FFC0C0&
Caption = "&Goster"
Height = 465
Left = 6825
Style = 1 'Graphical
TabIndex = 24
Top = 5100
Width = 1440
End
Begin VB.CommandButton cmd_sil
BackColor = &H00FFC0C0&
Caption = "&Sil"
Height = 465
Left = 5325
Style = 1 'Graphical
TabIndex = 23
Top = 5100
Width = 1440
End
Begin VB.CommandButton cmd_dur
BackColor = &H00FFC0C0&
Caption = "&Dur"
Height = 465
Left = 3825
Style = 1 'Graphical
TabIndex = 22
Top = 5100
Width = 1440
End
Begin VB.CommandButton cmd_ciz
BackColor = &H00FFC0C0&
Caption = "&Ciz"
Height = 465
Left = 2325
Style = 1 'Graphical
TabIndex = 21
Top = 5100
Width = 1440
End
Begin VB.CommandButton cmd_var
BackColor = &H00FFC0C0&
Caption = "&Varsayilan"
Height = 465
Left = 150
Style = 1 'Graphical
TabIndex = 20
Top = 5100
Width = 1890
End
Begin VB.TextBox tc2
Height = 390
Left = 600
TabIndex = 19
Text = "0"
Top = 3300
Width = 1740
End
Begin VB.TextBox tc1
Height = 390
Left = 600
TabIndex = 17
Text = "-0.8"
Top = 2775
Width = 1740
End
Begin VB.HScrollBar h_yog
Height = 315
LargeChange = 10
Left = 7500
Max = 100
Min = 1
TabIndex = 14
Top = 3825
Value = 20
Width = 2115
End
Begin VB.TextBox ilky
Height = 390
Left = 9075
TabIndex = 11
Text = "0"
Top = 2625
Width = 540
End
Begin VB.TextBox ilkx
Height = 390
Left = 7500
TabIndex = 9
Text = "0"
Top = 2625
Width = 540
End
Begin VB.TextBox ust
Height = 390
Left = 9075
TabIndex = 7
Text = "10"
Top = 2100
Width = 540
End
Begin VB.TextBox alt
Height = 390
Left = 7500
TabIndex = 5
Text = "-10"
Top = 2100
Width = 540
End
Begin VB.HScrollBar h_buy
Height = 315
LargeChange = 10
Left = 7500
Max = 100
Min = 1
TabIndex = 3
Top = 1500
Value = 2
Width = 2115
End
Begin VB.ComboBox cmb_fra
Height = 360
Left = 1350
Style = 2 'Dropdown List
TabIndex = 0
ToolTipText = "Fraktal tipi"
Top = 150
Width = 2940
End
Begin VB.Label lnsay
BackStyle = 0 'Transparent
BorderStyle = 1 'Fixed Single
ForeColor = &H00FFFF00&
Height = 390
Left = 150
TabIndex = 38
Top = 4500
Width = 4740
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Fraktal turu"
ForeColor = &H00FFFFFF&
Height = 240
Left = 150
TabIndex = 37
Top = 225
Width = 1140
End
Begin VB.Label ld
BackColor = &H8000000D&
BackStyle = 0 'Transparent
BeginProperty Font
Name = "Arial"
Size = 9.75
Charset = 162
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFF00&
Height = 315
Left = 150
TabIndex = 34
Top = 5700
Width = 9540
End
Begin VB.Label lsure
BackStyle = 0 'Transparent
BorderStyle = 1 'Fixed Single
ForeColor = &H00FFFFFF&
Height = 390
Left = 5025
TabIndex = 33
Top = 4500
Width = 4740
End
Begin VB.Label l12
BackStyle = 0 'Transparent
Caption = "C2="
ForeColor = &H00FFFFFF&
Height = 315
Left = 225
TabIndex = 18
Top = 3375
Width = 390
End
Begin VB.Label l11
BackStyle = 0 'Transparent
Caption = "C1="
ForeColor = &H00FFFFFF&
Height = 315
Left = 225
TabIndex = 16
Top = 2850
Width = 390
End
Begin VB.Label lyog
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "2000"
ForeColor = &H00FFFFFF&
Height = 315
Left = 6750
TabIndex = 13
Top = 3525
Width = 1140
End
Begin VB.Label l9
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Yogunluk"
ForeColor = &H00FFFFFF&
Height = 240
Left = 6750
TabIndex = 12
Top = 3225
Width = 885
End
Begin VB.Label l8
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Y ilk"
ForeColor = &H00FFFFFF&
Height = 240
Left = 8550
TabIndex = 10
Top = 2700
Width = 405
End
Begin VB.Label l7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "X ilk"
ForeColor = &H00FFFFFF&
Height = 240
Left = 6975
TabIndex = 8
Top = 2625
Width = 420
End
Begin VB.Label l6
BackStyle = 0 'Transparent
Caption = "Ust sinir"
ForeColor = &H00FFFFFF&
Height = 315
Left = 8250
TabIndex = 6
Top = 2100
Width = 915
End
Begin VB.Label l5
BackStyle = 0 'Transparent
Caption = "Alt sinir"
ForeColor = &H00FFFFFF&
Height = 315
Left = 6750
TabIndex = 4
Top = 2100
Width = 915
End
Begin VB.Label lbuyut
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "2"
ForeColor = &H00FFFFFF&
Height = 315
Left = 6975
TabIndex = 2
Top = 1500
Width = 465
End
Begin VB.Label l4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Buyutme orani"
ForeColor = &H00FFFFFF&
Height = 240
Left = 6750
TabIndex = 1
Top = 1125
Width = 1395
End
Begin VB.Label l10
BackStyle = 0 'Transparent
BorderStyle = 1 'Fixed Single
Caption = "Julia fraktalleri"
ForeColor = &H00FFFFFF&
Height = 3690
Left = 150
TabIndex = 15
Top = 675
Width = 4140
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
BorderStyle = 1 'Fixed Single
Caption = "Diger fraktaller"
ForeColor = &H00FFFFFF&
Height = 3690
Left = 4425
TabIndex = 36
Top = 675
Width = 5340
End
Begin VB.Menu f
Caption = "&Fraktal"
Begin VB.Menu DK
Caption = "&Kaydet"
Shortcut = ^K
End
Begin VB.Menu fa0
Caption = "-"
End
Begin VB.Menu fa
Caption = "&Ayarlar"
Shortcut = ^A
End
Begin VB.Menu fa1
Caption = "-"
End
Begin VB.Menu mFBuyut
Caption = "&Julia buyut"
Enabled = 0 'False
Shortcut = ^J
End
Begin VB.Menu fa2
Caption = "-"
End
Begin VB.Menu FC
Caption = "&Ciz"
Shortcut = ^C
End
Begin VB.Menu FD
Caption = "&Dur"
Shortcut = ^D
End
Begin VB.Menu FT
Caption = "&Sil"
Shortcut = ^S
End
Begin VB.Menu FG
Caption = "&Goster"
Shortcut = ^G
End
Begin VB.Menu FK
Caption = "G&izle"
Shortcut = ^I
End
End
Begin VB.Menu y
Caption = "&Yardim"
Begin VB.Menu mYKul
Caption = "&Kullanim"
Shortcut = {F1}
End
Begin VB.Menu ay1
Caption = "-"
End
Begin VB.Menu YH
Caption = "&Hakkinda"
Shortcut = {F2}
End
Begin VB.Menu ya1
Caption = "-"
End
Begin VB.Menu YY
Caption = "&Yapimci"
Shortcut = {F3}
End
End
Begin VB.Menu DC
Caption = "Ci&kis"
End
End
Attribute VB_Name = "ana"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public a, nx1, ny1, c, a1, a2, mx, my, c1, c2, rpa, rpx, rpy, rpr, jy1, jx1, jz, jrenk, jite As Single
Dim yog As Double
Dim sil As Integer
Public dur As Boolean
Public kay As Boolean 'kay=true: ekr, kay=false: mega icin
Dim sure As Single
Dim gen, yuk As Single

Private Sub alt_Validate(Cancel As Boolean)
If Val(ust.Text) < Val(alt.Text) Then MsgBox ("Alt sinir ust sinirdan buyuk olamaz!"), vbExclamation, ("Fraktal"): alt.Text = ""
End Sub

Public Sub paradeger()
nx1 = Val(ilkx.Text)
ny1 = Val(ilky.Text)
c = h_buy.Value
a1 = Val(alt.Text)
a2 = Val(ust.Text)
yog = 1 / (h_yog.Value * h_yog.Max)
mx = ayar.lx
my = ayar.ly

jy1 = Val(y1_carpani.Text)
jx1 = Val(x1_ussu.Text)
jz = Val(z_buyuktur.Text)
jrenk = Val(renk_carpani.Text)
jite = Val(cmb_ite.Text)
End Sub

Private Sub cmb_fra_Click()
If Left(cmb_fra.Text, 1) = "J" Then
mFBuyut.Enabled = True
cmd_j_buyut.Enabled = True
cmd_j_on.Enabled = True
ekr.pBBuyut.Enabled = True
ld.Caption = "Fraktal " & cmb_fra.Text & " secildi. Julia bolumundeki parametreler gecerli."

cmd_p2oniz.Enabled = False
Else
mFBuyut.Enabled = False
cmd_j_buyut.Enabled = False
cmd_j_on.Enabled = False
ekr.pBBuyut.Enabled = False
ld.Caption = "Bu fraktalin ciziminde sag taraftaki parametreler gecerli."

cmd_p2oniz.Enabled = True
End If

If Left(cmb_fra.Text, 1) = "R" Then ld.Caption = "Bu fraktal icin bir parametre gecerli degil."
End Sub

Private Sub cmd_ayar_Click()
ayar.Show
End Sub

Public Sub cmd_ciz_Click()
On Error GoTo hata

Dim nx, ny As Single 'cizimin hizli olabilmesi icin x,y degerleri

sil = 0

If ayar.chk_ekr.Value = 1 Then ekr.WindowState = 1 Else ekr.WindowState = 0

ekr.BackColor = ayar.z.BackColor
ekr.ForeColor = ayar.f.BackColor

ekr.DrawWidth = 1

If ayar.chk_tem.Value = 1 Then ekr.Cls
If ayar.chk_izg.Value = 1 Then
For i = 0 To 1024 Step Val(ayar.tex_izgbir.Text)
ekr.Line (i, 0)-(i, 768), RGB(150, 150, 150)
Next
For j = 0 To 768 Step Val(ayar.tex_izgbir.Text)
ekr.Line (0, j)-(1024, j), RGB(150, 150, 150)
Next
End If

paradeger

If Len(tc1.Text) = 0 Then tc1.Text = "0"
If Len(tc2.Text) = 0 Then tc2.Text = "0"
c1 = Val(tc1.Text): c2 = Val(tc2.Text)

If Left(cmb_fra.Text, 1) <> "J" Then
lnsay.Caption = cmb_fra.Text & " islenen nokta sayisi= " & Trim(Str(Abs(a2 - a1) / yog))
Else
lnsay.Caption = cmb_fra.Text & " islenen nokta sayisi= 200000"
End If

ld.Caption = "Fraktal " & cmb_fra.Text & " cizimi isleniyor."

sure = Timer

If cmb_fra.Text = "Hopalong 1" Then
ekr.Caption = "Hopalong 1"

If ayar.chk_b.Value = 0 Then
For a = a1 To a2 Step yog
nx2 = ny1 - Sgn(nx1) * Sqr(Abs(Sin(a) * nx1 - Cos(a)))
ny2 = a - nx1

nx = mx + c * nx2
ny = my + c * ny2

If ayar.ro1.Value = True Then
ekr.PSet (nx, ny), nx2 * ny2 * 400000
Else
ekr.PSet (nx, ny), ekr.ForeColor
End If

nx1 = nx2
ny1 = ny2

DoEvents
If dur = True Then GoTo ok
Next
Else
For a = a1 To a2 Step yog
nx2 = ny1 - Sgn(nx1) * Sqr(Abs(Sin(a) * nx1 - Cos(a)))
ny2 = a - nx1

nx = mx + c * nx2
ny = my + c * ny2

If ayar.chk_bk.Value = 1 Then
If ayar.ro1.Value = True Then
ekr.Line (nx, ny)-(nx + h_buy.Value, ny + h_buy.Value), nx2 * ny2 * 400000, BF
Else
ekr.Line (nx, ny)-(nx + h_buy.Value, ny + h_buy.Value), ekr.ForeColor, BF
End If
Else
If ayar.ro1.Value = True Then
ekr.Line (nx, ny)-(nx + h_buy.Value, ny + h_buy.Value), nx2 * ny2 * 400000, B
Else
ekr.Line (nx, ny)-(nx + h_buy.Value, ny + h_buy.Value), ekr.ForeColor, B
End If
End If

nx1 = nx2
ny1 = ny2

DoEvents
If dur = True Then GoTo ok
Next
End If
End If


If cmb_fra.Text = "Hopalong 2" Then
ekr.Caption = "Hopalong 2"

If ayar.chk_b.Value = 0 Then
For a = a1 To a2 Step yog
nx2 = ny1 - Sqr(Abs(Sin(a) * nx1 - Cos(a)))
ny2 = a - nx1

nx = mx + c * nx2
ny = my + c * ny2

If ayar.ro1.Value = True Then
ekr.PSet (nx, ny), nx2 * ny2 * 400000
Else
ekr.PSet (nx, ny), ekr.ForeColor
End If

nx1 = nx2
ny1 = ny2

DoEvents
If dur = True Then GoTo ok
Next
Else
For a = a1 To a2 Step yog
nx2 = ny1 - Sqr(Abs(Sin(a) * nx1 - Cos(a)))
ny2 = a - nx1

nx = mx + c * nx2
ny = my + c * ny2

If ayar.chk_bk.Value = 1 Then
If ayar.ro1.Value = True Then
ekr.Line (nx, ny)-(nx + h_buy.Value, ny + h_buy.Value), nx2 * ny2 * 400000, BF
Else
ekr.Line (nx, ny)-(nx + h_buy.Value, ny + h_buy.Value), ekr.ForeColor, BF
End If
Else
If ayar.ro1.Value = True Then
ekr.Line (nx, ny)-(nx + h_buy.Value, ny + h_buy.Value), nx2 * ny2 * 400000, B
Else
ekr.Line (nx, ny)-(nx + h_buy.Value, ny + h_buy.Value), ekr.ForeColor, B
End If
End If

nx1 = nx2
ny1 = ny2

DoEvents
If dur = True Then GoTo ok
Next
End If
End If


If cmb_fra.Text = "Martin" Then
ekr.Caption = "Martin"

If ayar.chk_b.Value = 0 Then
For a = a1 To a2 Step yog
nx2 = ny1 - Sin(nx1)
ny2 = a - nx1

nx = mx + c * nx2
ny = my + c * ny2

If ayar.ro1.Value = True Then
ekr.PSet (nx, ny), nx2 * ny2 * 1000000
Else
ekr.PSet (nx, ny), ekr.ForeColor
End If

nx1 = nx2
ny1 = ny2

DoEvents
If dur = True Then GoTo ok
Next
Else
For a = a1 To a2 Step yog
nx2 = ny1 - Sin(nx1)
ny2 = a - nx1

nx = mx + c * nx2
ny = my + c * ny2

If ayar.chk_bk.Value = 1 Then
If ayar.ro1.Value = True Then ' a li es ki ci .c om

ekr.Line (nx, ny)-(nx + h_buy.Value, ny + h_buy.Value), nx2 * ny2 * 1000000, BF
Else
ekr.Line (nx, ny)-(nx + h_buy.Value, ny + h_buy.Value), ekr.ForeColor, BF
End If
Else
If ayar.ro1.Value = True Then
ekr.Line (nx, ny)-(nx + h_buy.Value, ny + h_buy.Value), nx2 * ny2 * 1000000, B
Else
ekr.Line (nx, ny)-(nx + h_buy.Value, ny + h_buy.Value), ekr.ForeColor, B
End If
End If

nx1 = nx2
ny1 = ny2

DoEvents
If dur = True Then GoTo ok
Next
End If
End If


If cmb_fra.Text = "Monster" Then
ekr.Caption = "Monster"

If ayar.chk_b.Value = 0 Then
For a = a1 To a2 Step yog

nx2 = a - ny1 + Abs(nx1)
ny2 = nx1
' al i es ki ci .c om

nx = mx + c * nx2
ny = my + c * ny2

If ayar.ro1.Value = True Then
ekr.PSet (nx, ny), nx2 * ny2 * 400000
Else
ekr.PSet (nx, ny), ekr.ForeColor
End If

nx1 = nx2
ny1 = ny2

DoEvents
If dur = True Then GoTo ok
Next
Else
For a = a1 To a2 Step yog

nx2 = a - ny1 + Abs(nx1)
ny2 = nx1

If ayar.chk_bk.Value = 1 Then
If ayar.ro1.Value = True Then
ekr.Line (nx, ny)-(nx + h_buy.Value, ny + h_buy.Value), nx2 * ny2 * 400000, BF
Else
ekr.Line (nx, ny)-(nx + h_buy.Value, ny + h_buy.Value), ekr.ForeColor, BF
End If
Else
If ayar.ro1.Value = True Then
ekr.Line (nx, ny)-(nx + h_buy.Value, ny + h_buy.Value), nx2 * ny2 * 400000, B
Else
ekr.Line (nx, ny)-(nx + h_buy.Value, ny + h_buy.Value), ekr.ForeColor, B
End If
End If

nx1 = nx2
ny1 = ny2

DoEvents
If dur = True Then GoTo ok
Next
End If
End If


If cmb_fra.Text = "Flower garden" Then
ekr.Caption = "Flower garden"

If ayar.chk_b.Value = 0 Then
For a = a1 To a2 Step yog
nx2 = a - ny1 + Sin(nx1) - Cos(a) ' a l i es ki ci .c om

ny2 = nx1

If ayar.ro1.Value = True Then
ekr.PSet (nx, ny), nx2 * ny2 * 1000000
Else
ekr.PSet (nx, ny), ekr.ForeColor
End If

nx1 = nx2
ny1 = ny2

DoEvents
If dur = True Then GoTo ok
Next
Else
For a = a1 To a2 Step yog
nx2 = a - ny1 + Sin(nx1) - Cos(a)
ny2 = nx1

If ayar.chk_bk.Value = 1 Then
If ayar.ro1.Value = True Then
ekr.Line (nx, ny)-(nx + h_buy.Value, ny + h_buy.Value), nx2 * ny2 * 1000000, BF
Else
ekr.Line (nx, ny)-(nx + h_buy.Value, ny + h_buy.Value), ekr.ForeColor, BF
End If
Else
If ayar.ro1.Value = True Then
ekr.Line (nx, ny)-(nx + h_buy.Value, ny + h_buy.Value), nx2 * ny2 * 1000000, B
Else
ekr.Line (nx, ny)-(nx + h_buy.Value, ny + h_buy.Value), ekr.ForeColor, B
End If
End If

nx1 = nx2
ny1 = ny2

DoEvents
If dur = True Then GoTo ok
Next
End If
End If


If cmb_fra.Text = "Gingerbrad Man" Then
' a l i e s ki ci .c o m
ekr.Caption = "Ginderbrad Man"

If ayar.chk_b.Value = 0 Then
For a = a1 To a2 Step yog
nx2 = 1 - ny1 + Abs(nx1)
ny2 = nx1

If ayar.ro1.Value = True Then
ekr.PSet (nx, ny), nx2 * ny2 * 400000
Else
ekr.PSet (nx, ny), ekr.ForeColor
End If

nx1 = nx2
ny1 = ny2

DoEvents
If dur = True Then GoTo ok
Next
Else
For a = a1 To a2 Step yog
nx2 = 1 - ny1 + Abs(nx1)
ny2 = nx1

If ayar.chk_bk.Value = 1 Then
If ayar.ro1.Value = True Then
ekr.Line (nx, ny)-(nx + h_buy.Value, ny + h_buy.Value), nx2 * ny2 * 400000, BF
Else
ekr.Line (nx, ny)-(nx + h_buy.Value, ny + h_buy.Value), ekr.ForeColor, BF
End If
Else
If ayar.ro1.Value = True Then' a l i es ki ci .c om
ekr.Line (nx, ny)-(nx + h_buy.Value, ny + h_buy.Value), nx2 * ny2 * 400000, B
Else
ekr.Line (nx, ny)-(nx + h_buy.Value, ny + h_buy.Value), ekr.ForeColor, B
End If
End If

nx1 = nx2
ny1 = ny2

DoEvents
If dur = True Then GoTo ok
Next
End If
End If


If cmb_fra.Text = "Julia 1" Then
ekr.Caption = "Julia 1"
For m = 0 To 200 Step 0.2
x0 = -2 + m / 50
For n = 0 To 100 Step 0.2
y0 = 2 - n / 50
x01 = x0
y01 = y0
For i = 1 To jite
X1 = x01 * x01 - y01 * y01 + c1
Y1 = 2 * x01 * y01 + c2
x01 = X1 ^ jx1
y01 = Y1
z = x01 * x01 + y01 * y01
If z > 4 + jz Then GoTo TL
Next i

If ayar.ro1.Value = True Or ayar.ro2.Value = True Then
ekr.PSet (m * 5, n * 5 - 160), z * 4000000 * jrenk
ekr.PSet (1000 - m * 5, 838 - n * 5), z * 4000000 * jrenk
Else
ekr.PSet (m * 5, n * 5 - 160), ekr.ForeColor
ekr.PSet (1000 - m * 5, 838 - n * 5), ekr.ForeColor
End If
TL:
Next n
If l = 0 Then l = 1
'a l i es ki ci .c om
DoEvents
If dur = True Then GoTo ok
Next m
End If


If cmb_fra.Text = "Julia 2" Then
ekr.Caption = "Julia 2"
For m = 0 To 200 Step 0.25
x0 = -2 + m / 50
For n = 0 To 100 Step 0.25
y0 = 2 - n / 50
x01 = x0
y01 = y0
For i = 1 To jite
X1 = x01 * x01 - y01 * y01 + c1
Y1 = jy1 * x01 * y01 - c2
x01 = X1 ^ jx1
y01 = Y1
z = x01 * x01 + y01 * y01
If z > 4 + jz Then GoTo TL2
' al i es ki ci .c om
Next i

If ayar.ro1.Value = True Or ayar.ro2.Value = True Then
ekr.PSet (m * 4, n * 4 - 100), z * 4000000 * jrenk
ekr.PSet (800 - m * 4, 700 - n * 4), z * 4000000 * jrenk
Else
ekr.PSet (m * 4, n * 4 - 100), ekr.ForeColor
ekr.PSet (800 - m * 4, 700 - n * 4), ekr.ForeColor
End If
TL2:
Next n
If l = 0 Then l = 1

DoEvents
If dur = True Then GoTo ok
Next m
End If


If cmb_fra.Text = "Julia 3" Then
ekr.Caption = "Julia 3"
For m = 0 To 200 Step 0.25
x0 = -2 + m / 50
For n = 0 To 100 Step 0.25
y0 = 2 - n / 50
x01 = x0
y01 = y0
For i = 1 To jite
X1 = x01 * x01 + y01 * y01 + c1
Y1 = jy1 * x01 + y01 * c2
' a l i es k i ci .c om
x01 = X1 ^ jx1
y01 = Y1
z = x01 * x01 - y01 * y01
If z > 10 + jz Then GoTo TL3
Next i

If ayar.ro1.Value = True Or ayar.ro2.Value = True Then
ekr.PSet (m * 3, n * 3), z * 20000000 * jrenk
ekr.PSet (600 - m * 3, 600 - n * 3), z * 20000000 * jrenk
Else
ekr.PSet (m * 3, n * 3), ekr.ForeColor
ekr.PSet (600 - m * 3, 600 - n * 3), ekr.ForeColor
End If
TL3:
Next n
If l = 0 Then l = 1

DoEvents
If dur = True Then GoTo ok
Next m
End If


If cmb_fra.Text = "Julia 4" Then
ekr.Caption = "Julia 4"
For m = 0 To 200 Step 0.25
x0 = -2 + m / 50
For n = 0 To 100 Step 0.25
y0 = 2 - n / 50
x01 = x0
y01 = y0
For i = 1 To jite
X1 = x01 * x01 + y01 * y01 + c1
Y1 = jy1 * x01 + y01 * c2
x01 = X1 ^ jx1
y01 = Y1
z = x01 * x01 - y01 * y01
' al i es ki ci .c om
If z > 10 + jz Then GoTo TL4
Next i

If ayar.ro1.Value = True Or ayar.ro2.Value = True Then
ekr.PSet (m * 3, n * 3), z * 20000000 * jrenk
ekr.PSet (600 - m * 3, 600 - n * 3), z * 20000000 * jrenk
Else
ekr.PSet (m * 3, n * 3), ekr.ForeColor
ekr.PSet (600 - m * 3, 600 - n * 3), ekr.ForeColor
End If
TL4:
Next n
If l = 0 Then l = 1

DoEvents
If dur = True Then GoTo ok
Next m
End If


If cmb_fra.Text = "Random pixelize" Then
ekr.Caption = "Random pixelize"

mx = ekr.ScaleWidth / 2
my = ekr.ScaleHeight / 2
rpx = 0: rpy = 0

Randomize Timer

a:
rpa = CInt(100 * Rnd)

If rpa < 25 Then rpx = rpx + 1: rpy = rpy + 1
If rpa >= 25 And rpa < 50 Then rpx = rpx - 1: rpy = rpy + 1
If rpa >= 50 And rpa < 75 Then rpx = rpx + 1: rpy = rpy - 1
If rpa >= 75 Then rpx = rpx - 1: rpy = rpy - 1

rpr = CInt(Rnd * 105) + 150

If ayar.ro3.Value = False Then
ekr.PSet (mx + rpx, my + rpy), RGB(rpr, rpr, rpr)
ekr.PSet (mx - rpx, my + rpy), RGB(rpr, rpr, rpr)
ekr.PSet (mx + rpx, my - rpy), RGB(rpr, rpr, rpr)
ekr.PSet (mx - rpx, my - rpy), RGB(rpr, rpr, rpr)
Else
ekr.PSet (mx + rpx, my + rpy), ekr.ForeColor
ekr.PSet (mx - rpx, my + rpy), ekr.ForeColor
ekr.PSet (mx + rpx, my - rpy), ekr.ForeColor
ekr.PSet (mx - rpx, my - rpy), ekr.ForeColor
End If

If dur = True Then GoTo ok
If rpx < -mx Or rpx > mx Or rpy < -my Or rpy > my Then GoTo ok ' a l ies ki ci .c om
DoEvents
GoTo a
End If


If cmb_fra.Text = "Kullanici tanimli" Then
MsgBox ("Farenizin sol tusu basili iken cizim ekrani uzerinde gezdiriniz. Cizim ekranindaki nokta buyuklugu ana penceredeki 'Buyukluk' parametresi ile ayarlanabilir. Bu deger 'Ciz' tusuna basildiginda gecerli olur."), vbInformation, ("Fraktal - Kullanici tanimli")
ekr.Show
ekr.Caption = "Kullanici tanimli"
ekr.DrawWidth = ana.h_buy.Value
ekr.WindowState = 0
ld.Caption = "Bu fraktal icin tum ayarlar icin gecersizdir."
Exit Sub
End If

ok:
lsure.Caption = "Islem suresi (sn): " & Format(Abs(Timer - sure), "###,###.#")
dur = False
ekr.Show
ekr.WindowState = 0

If Left(cmb_fra.Text, 1) = "J" Then ekr.pBBuyut.Enabled = True Else ekr.pBBuyut.Enabled = False

If ayar.chk_uya.Value = 1 Then Beep: MsgBox (ana.cmb_fra.Text & " fraktalinin cizimi bitmistir."), vbInformation, ("Fraktal")
If ayar.chk_sor.Value = 1 Then DK_Click

ld.Caption = "Fraktal cizimi tamamlandi."'al i es ki ci .c om
Exit Sub
hata:
MsgBox ("Beklenmeyen bir hata olustu. Degerleri degistirip yeniden deneyiniz."), vbCritical, ("Fraktal")
ld.Caption = "Islem tamamlanamadi."
End Sub

Private Sub cmd_dur_Click()
dur = True
ld.Caption = "Cizim durduruldu."
End Sub

Private Sub cmd_gos_Click()
ekr.WindowState = 0
ekr.Show
ld.Caption = "Cizim ekrani gosterildi."
End Sub

Private Sub cmd_j_buyut_Click()
mega.Show
End Sub

Private Sub cmd_j_on_Click()
Dim onsure As Single

If chk_jontem.Value = 1 Then p.Cls

ld.Caption = "Fraktal Julia 1,2,3,4 turleri icin on izleme."

paradeger

c1 = Val(tc1.Text)
c2 = Val(tc2.Text)

DoEvents

onsure = Timer

If cmb_fra.Text = "Julia 1" Then
For m = 0 To 200
x0 = -2 + m / 50
For n = 0 To 100
y0 = 2 - n / 50
x01 = x0
y01 = y0
For i = 1 To jite
X1 = x01 * x01 - y01 * y01 + c1
Y1 = 2 * x01 * y01 + c2
x01 = X1 ^ jx1
y01 = Y1
z = x01 * x01 + y01 * y01
' a l i es ki ci . co m
If z > 4 + jz Then GoTo onTL1
Next i

p.PSet (m, n - 50)
p.PSet (200 - m, 150 - n)
onTL1:
Next n
If l = 0 Then l = 1
Next m
End If


If cmb_fra.Text = "Julia 2" Then
For m = 0 To 200
x0 = -2 + m / 50
For n = 0 To 100
y0 = 2 - n / 50
x01 = x0
y01 = y0
For i = 1 To jite
X1 = x01 * x01 - y01 * y01 + c1
Y1 = jy1 * x01 * y01 - c2
x01 = X1 ^ jx1
y01 = Y1
z = x01 * x01 + y01 * y01
If z > 4 + jz Then GoTo onTL2
Next i
p.PSet (m, n - 50)
p.PSet (200 - m, 150 - n)
onTL2:
Next n
If l = 0 Then l = 1
Next m
End If


If cmb_fra.Text = "Julia 3" Then
For m = 0 To 200
x0 = -2 + m / 50
For n = 0 To 100
y0 = 2 - n / 50
x01 = x0
y01 = y0
For i = 1 To jite
X1 = x01 * x01 + y01 * y01 + c1
Y1 = jy1 * x01 + y01 * c2
x01 = X1 ^ jx1
y01 = Y1
z = x01 * x01 - y01 * y01
If z > 10 + jz Then GoTo onTL3
Next i

p.PSet (m, n - 50)
p.PSet (200 - m, 150 - n)
onTL3:
Next n
If l = 0 Then l = 1
Next m
End If


If cmb_fra.Text = "Julia 4" Then
For m = 0 To 200
x0 = -2 + m / 50
For n = 0 To 100
y0 = 2 - n / 50
x01 = x0
y01 = y0
For i = 1 To jite
X1 = x01 * x01 + y01 * y01 + c1
Y1 = jy1 * x01 + y01 * c2
' a l i es k i ci .c om
x01 = X1 ^ jx1
y01 = Y1
z = x01 * x01 - y01 * y01
If z > 10 + jz Then GoTo onTL4
Next i

p.PSet (m, n - 50)
p.PSet (200 - m, 150 - n)
onTL4:
Next n
If l = 0 Then l = 1
Next m
End If

onsure = Abs(Timer - onsure)
ld.Caption = "Fraktal " & cmb_fra.Text & " tahmini cizim suresi (sn): " & Trim(Str(CInt(25 * onsure)))
End Sub

Private Sub cmd_kap_Click()
ekr.Hide
ld.Caption = "Cizim ekrani gizlendi."
End Sub

Private Sub cmd_p2oniz_Click()
On Error GoTo p2onizhata

If chk_ontem.Value = 1 Then p2.Cls

If Left(cmb_fra.Text, 1) = "J" Then ld.Caption = "On izleme icin fraktalin turu Julia olmamali.": Beep: Exit Sub
If cmb_fra.Text = "Random pixelize" Then ld.Caption = "Bu fraktalin on izlemesi olmaz.": Beep: Exit Sub

ld.Caption = "Fraktal Julia 1,2,3,4 disindaki turler icin on izleme."

paradeger

Dim p2mx, p2my As Single

p2mx = p2.ScaleWidth / 2
p2my = p2.ScaleHeight / 2

DoEvents

If cmb_fra.Text = "Hopalong 1" Then
For a = a1 To a2 Step yog
nx2 = ny1 - Sgn(nx1) * Sqr(Abs(Sin(a) * nx1 - Cos(a)))
ny2 = a - nx1

p2.PSet (p2mx + nx2, p2my + ny2)

nx1 = nx2
ny1 = ny2
Next
End If


If cmb_fra.Text = "Hopalong 2" Then
For a = a1 To a2 Step yog
nx2 = ny1 - Sqr(Abs(Sin(a) * nx1 - Cos(a)))
ny2 = a - nx1

p2.PSet (p2mx + nx2, p2my + ny2)

nx1 = nx2
ny1 = ny2
Next
End If


If cmb_fra.Text = "Martin" Then
For a = a1 To a2 Step yog
nx2 = ny1 - Sin(nx1)
ny2 = a - nx1

p2.PSet (p2mx + nx2, p2my + ny2)

nx1 = nx2
ny1 = ny2
Next
End If


If cmb_fra.Text = "Monster" Then
For a = a1 To a2 Step yog

nx2 = a - ny1 + Abs(nx1)
ny2 = nx1

p2.PSet (p2mx + nx2, p2my + ny2)

nx1 = nx2
ny1 = ny2
Next
End If


If cmb_fra.Text = "Flower garden" Then
For a = a1 To a2 Step yog
nx2 = a - ny1 + Sin(nx1) - Cos(a)
ny2 = nx1

p2.PSet (p2mx + nx2, p2my + ny2)

nx1 = nx2
ny1 = ny2
Next
End If


If cmb_fra.Text = "Gingerbrad Man" Then
For a = a1 To a2 Step yog
nx2 = 1 - ny1 + Abs(nx1)
ny2 = nx1

p2.PSet (p2mx + nx2, p2my + ny2)

nx1 = nx2
ny1 = ny2
Next
End If

ld.Caption = "Fraktal " & cmb_fra.Text & " icin on izleme yapildi."

Exit Sub
p2onizhata:
ld.Caption = "On izleme isleminde hata olustu !"
End Sub

Private Sub cmd_sil_Click()
ekr.Cls
sil = 1
ld.Caption = "Cizim ekrani silindi."
End Sub

Private Sub cmd_var_Click()
h_buy.Value = 10: lbuyut.Caption = "10"
alt.Text = "-10": ust.Text = "10"
ilkx.Text = "0": ilky.Text = "0"
ayar.yo1.Value = True
h_yog.Min = 1
h_yog.Max = 100
h_yog.SmallChange = 1
h_yog.LargeChange = 10
h_yog.Value = 20: lyog.Caption = "2000"
tc1.Text = "-0.8": tc2.Text = "0"
cmb_ite.Text = "10"
y1_carpani.Text = "1": x1_ussu.Text = "1": z_buyuktur.Text = "0": renk_carpani.Text = "1"
ld.Caption = "Varsayilan parametreler yuklendi."
End Sub

Private Sub DC_Click()
End
End Sub

Public Sub DK_Click()
If sil = 1 Then MsgBox ("Cizilmis bir fraktal bulunamadi."), vbExclamation, ("Fraktal"): Exit Sub
kay = True
kayit.Show
End Sub

Private Sub fa_Click()
ayar.Show
End Sub

Private Sub FC_Click()
cmd_ciz_Click
End Sub

Public Sub FD_Click()
dur = True
ld.Caption = "Cizim durduruldu."
End Sub

Private Sub FG_Click()
ekr.Show
ekr.WindowState = 0
End Sub

Public Sub FK_Click()
ekr.Hide
End Sub

Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = 27 Then WindowState = 1
End Sub

Public Sub renkle()
Dim r As Single
Const cr = 3.14159 / 180

For i = 0 To ScaleWidth
r = 255 * i / ScaleWidth
Circle (ScaleHeight / 2, ScaleHeight), i, RGB(0, 0, r)
Next

For i = ScaleTop To ScaleHeight Step 10
Line (ScaleWidth - ScaleHeight + i, ScaleTop)-(ScaleWidth, i), RGB(r, 0, 0)
Next

For i = 1 To 400
PSet (ScaleWidth * Rnd, ScaleHeight * Rnd)
Next

For i = 1 To 100
r = 255 * i / 100
Circle (ScaleHeight / 2, ScaleHeight), i, RGB(255 - r, 255 - r, r)
Next

For i = 1 To 400 Step 4
For a = 0 To 80 Step 4
PSet (ScaleHeight / 2 + i * Cos((a - 90 + i / 4) * cr), ScaleHeight + i * Sin((a - 90 - i / 4) * cr)), RGB(255, 255, 0)
Next
Next

DrawWidth = 2
For i = 1 To 100
PSet (ScaleWidth * Rnd, ScaleHeight * Rnd / 2)
Next

cmd_ayar.BackColor = Point(cmd_ayar.Left - 1, cmd_ayar.Top + 1)
chk_jontem.BackColor = Point(chk_jontem.Left - 1, chk_jontem.Top + 1)
chk_ontem.BackColor = Point(chk_ontem.Left - 1, chk_ontem.Top + 1)
End Sub

Private Sub Form_Load()
renkle

With cmb_fra
.AddItem "Hopalong 1"
.AddItem "Hopalong 2"
.AddItem "Martin"
.AddItem "Monster"
.AddItem "Flower garden"
.AddItem "Gingerbrad Man"
.AddItem "Julia 1"
.AddItem "Julia 2"
.AddItem "Julia 3"
.AddItem "Julia 4"
.AddItem "Random pixelize"
.AddItem "Kullanici tanimli"
End With
cmb_fra.Text = "Hopalong 1"

With cmb_ite
.AddItem "2"
.AddItem "5"
.AddItem "10"
.AddItem "20"
.AddItem "40"
.AddItem "50"
.AddItem "100"
End With
cmb_ite.Text = "10"

yog = 2000
sil = 1
dur = False

gen = Width
yuk = Height

ayar.lx = 400: ayar.ly = 400
ayar.Hide

If Screen.Width < 1024 Then
MsgBox ("Fraktal cizimlerinin tam olarak goruntulenmesi icin ekran boyutlarinin en az 1024 * 768 olmasi gerekir." & Chr(13) & Chr(10) & "Ekraninizin alani daha dusuk oldugundan Fraktal programinin cizimlerini tam olarak goremeyebilir ve bazi araclarini saglikli sekilde kullanamayabilirsiniz. Ekran alaninizi arttirmaniz onerilir."), vbExclamation, ("Fraktal")
WindowState = 1
End If
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
End
End Sub

Private Sub Form_Resize()
If WindowState = 1 Then Exit Sub
If Width > gen Then Width = gen
If Height > yuk Then Height = yuk
End Sub

Public Sub FT_Click()
ekr.Cls
sil = 1
End Sub

Private Sub h_buy_Change()
lbuyut.Caption = h_buy.Value
'a l i es ki ci .c om
ld.Caption = "Fraktal (Julia 1,2,3,4 haric) buyutme orani " & Trim(Str(h_buy.Value))
End Sub

Private Sub h_yog_Change()
yog = h_yog.Value
yog = yog * 100
lyog.Caption = yog
ld.Caption = "Cizim yogunlugu cm2'ye en cok " & Trim(Str(yog)) & " nokta."
End Sub

Public Sub mFBuyut_Click()
mega.Show
End Sub

Private Sub mYKul_Click()
yar.Show
End Sub

Private Sub ust_Validate(Cancel As Boolean)
If Val(ust.Text) < Val(alt.Text) Then MsgBox ("Ust sinir alt sinirdan kucuk olamaz!"), vbExclamation, ("Fraktal"): ust.Text = ""
End Sub

Private Sub YH_Click()
hak.Show
End Sub

Private Sub YY_Click()
yap.Show
End Sub

Ali Eskici Web Sitesi 2008