Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,29 @@
|
|||
GraphicsWindow.Show()
|
||||
size = 500
|
||||
half = 250
|
||||
GraphicsWindow.Width = size * 1.5
|
||||
GraphicsWindow.Height = size
|
||||
GraphicsWindow.Title = "Mandelbrot"
|
||||
For px = 1 To size * 1.5
|
||||
x_0 = px/half - 2
|
||||
For py = 1 To size
|
||||
y_0 = py/half - 1
|
||||
x = x_0
|
||||
y = y_0
|
||||
i = 0
|
||||
While(c <= 2 AND i<100)
|
||||
x_1 = Math.Power(x, 2) - Math.Power(y, 2) + x_0
|
||||
y_1 = 2 * x * y + y_0
|
||||
c = Math.Power(Math.Power(x_1, 2) + Math.Power(y_1, 2), 0.5)
|
||||
x = x_1
|
||||
y = y_1
|
||||
i = i + 1
|
||||
EndWhile
|
||||
If i < 99 Then
|
||||
GraphicsWindow.SetPixel(px, py, GraphicsWindow.GetColorFromRGB((255/25)*i, (255/25)*i, (255/5)*i))
|
||||
Else
|
||||
GraphicsWindow.SetPixel(px, py, "black")
|
||||
EndIf
|
||||
c=0
|
||||
EndFor
|
||||
EndFor
|
||||
Loading…
Add table
Add a link
Reference in a new issue