продолжаем тему. Эффект найден в интернетах, не пинайте особо.
Код:
;https://observablehq.com/d/4166d1225b36a920 t.f=0 frequency.f=8 shift.f = 2 * #PI / 3 amplitude = 32/2 n=360 For i=0 To 2 CreateImage(i,640,480) Next i If InitSprite() And OpenWindow(0,0,0,640,480,"circlewave II",#PB_Window_SystemMenu) And OpenWindowedScreen(WindowID(0),0,0,640,480,0,0,0) Repeat If GetAsyncKeyState_(#VK_ESCAPE)&32768 Break EndIf For j=0 To 2 StartDrawing(ImageOutput(j)) DrawingMode(#PB_2DDrawing_Default) Box (0,0,640,480,0) For i=0 To 360 a.f = i * 2 * #PI / n; c.f = Cos(a * frequency - j * shift + t);j=number p.f = Pow((1 + Cos(a - t)) / 2, 3); r=128+amplitude*c*p Box(320+r*Cos(a),240+r*Sin(a),6,6,255<<(j*8)) Next i StopDrawing() Next j t=t+1/10 StartDrawing(ScreenOutput()) DrawingMode(#PB_2DDrawing_Default) Box (0,0,640,480,0) DrawingMode(#PB_2DDrawing_XOr) For i=0 To 2 DrawImage(ImageID(i),0,0) Next i StopDrawing() FlipBuffers() Until WindowEvent()=#PB_Event_CloseWindow EndIf