InitSprite() : InitKeyboard()
OpenWindow(0, 0, 0, 400, 400, "--Fractal Test--", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
MessageRequester("Кнопги", "I - показать FPS, счётчик и формулу" + #CRLF$ + "F - перейти к отображению в полном экране (800x600)" + #CRLF$ + "W - перейти к отображению в окне" + #CRLF$ + "Esc - убить прожку")
Global Width = WindowWidth(0) - 1, Height = WindowHeight(0) - 1, X, Y, link.l = 10, full_screen.b = 0, xxx.l = 0, str.s = "", f.l = 0, t.l = GetTickCount_()
OpenWindowedScreen(WindowID(0), 0, 0, Width + 1, Height + 1, #False, 0, 0)
SetActiveWindow(0)
LoadFont(0, "Comic Sans MS", 10, #PB_Font_Bold)
LoadFont(1, "Tahoma", 7)
CreateImage(0,200,200)
CreateSprite(0, 400, 400)
Procedure d(d.l)
If IsScreenActive()
str = "fps: " + StrD(f / ((GetTickCount_() - t) / 1000), 1) + " * link = " + StrQ(link)
If GetTickCount_() - t = 10000
t = GetTickCount_()
f = 0
EndIf
ResizeImage(0, 200, 200)
StartDrawing(ImageOutput(0))
Box(0, 0, 200, 200)
GetCursorPos_(cmxy.POINT)
For X = 20 To 180
For Y = 20 To 180
;--Fractal[--;
;delta = Tan(x) * Tan(y) * ATan((x * y) * #PI)
one_of = Sin(Sqr( ((x + Log10(y / #PI / 100000000)) * link) + ((y + Log10(x / #PI / 100000000)) * (link / #PI)) )) * link
xxx = one_of * (ATan(link + (link / #PI)) + #PI)
Plot(x, y, xxx)
;--]Fractal--;
Next Y
Next X
StopDrawing()
FlipBuffers(2) : ClearScreen(Sqr(Sin(link / #PI) * #PI * Log(link / 360)))
ResizeImage(0, 400, 400)
If IsScreenActive()
StartDrawing(SpriteOutput(0))
DrawingMode(#PB_2DDrawing_Transparent)
DrawImage(ImageID(0), 0, 0)
If GetAsyncKeyState_(#VK_I)
DrawingFont(FontID(0))
DrawText(10, 10, str, #White)
DrawingFont(FontID(1))
DrawText(10, 365, "Sin(Sqr( ((x + Log10(y / #PI / 100000000)) * link) + ((y + Log10(x / #PI / 100000000))", #White)
DrawText(10, 375, " * (link / #PI)) )) + ((y + Log10(x / #PI / 100000000)) * (link / #PI)) )) * link", #White)
DrawText(10, 385, " * (ATan(link + (link / #PI)) + #PI) - формула, которая рисует всё это...", #White)
EndIf
DrawingMode(#PB_2DDrawing_Outlined)
Box(1, 1, SpriteWidth(0) - 1, SpriteHeight(0) - 1, RGB(30,10,5))
StopDrawing()
DisplaySprite(0, (Width / 2) -(SpriteWidth(0) / 2), (Height / 2) -(SpriteHeight(0) / 2))
EndIf
link + 1
ExamineKeyboard()
If KeyboardPushed(#PB_Key_F) And full_screen = 0
SetRefreshRate(75)
CloseScreen() : CloseWindow(0) : Delay(100) : OpenScreen(800, 600, 32, "--Fractal Test--") : Delay(100) : full_screen = 1 : Width = 800 : Height = 600
CreateSprite(0, 400, 400)
EndIf
If KeyboardPushed(#PB_Key_W) And full_screen = 1
CloseScreen()
OpenWindow(0, 0, 0, 400, 400, "--Fractal Test--", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
OpenWindowedScreen(WindowID(0), 0, 0, Width + 1, Height + 1, #False, 0, 0) : full_screen = 0 : Width = 400 : Height = 400
SetActiveWindow(0)
CreateSprite(0, 400, 400)
EndIf
If KeyboardPushed(#PB_Key_Escape)
If IsSprite(0) : FreeSprite(0) : EndIf
If IsImage(0) : FreeImage(0) : EndIf
End
EndIf
If link >= 1000000 : link = 10 : EndIf
f + 1
Delay(d)
EndIf
EndProcedure
While WindowEvent() <> #PB_Event_DataReceived : d(0) : Delay(1) : Wend
эээ... вод, написал вместе с "балдой" )