
Here my code :
Code: Select all
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Written with Purebasic v.6.02 by threedslider 10/09/2023
;;
;; Updated for Purebasic v6.12 by threedslider 18/09/2024
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Test for chromosome :)
InitSprite()
InitKeyboard()
OpenWindow(1, 0,0,800/DesktopResolutionX(),600/DesktopResolutionY(),"Chromosome", #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(1),0,0,800,600,0,0,0)
SetFrameRate(30)
Repeat
ExamineKeyboard()
event = WindowEvent()
ClearScreen(RGB(0,0,0))
StartDrawing(ScreenOutput())
For x = 0 To 360
move.f + 1/10000
helix_x.f = 5 *Cos(move+x)
helix_y.f = 5 *(move-x)
Box( Exp(helix_x)+400, helix_y, 5, 5, RGB(255, 0, 0) )
Next
StopDrawing()
Delay(1) : FlipBuffers()
Until event = #PB_Event_CloseWindow Or KeyboardPushed(#PB_Key_Escape)
End
