Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
22
Task/Archimedean-spiral/PureBasic/archimedean-spiral.basic
Normal file
22
Task/Archimedean-spiral/PureBasic/archimedean-spiral.basic
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#MAXLOOP = 7*360
|
||||
#XCENTER = 640/2
|
||||
#YCENTER = 480/2
|
||||
#SCALAR = 200
|
||||
|
||||
If OpenWindow(0, 100, 200, 640, 480, "Archimedean spiral")
|
||||
If CreateImage(0, 640, 480,24,RGB(255,255,255))
|
||||
If StartDrawing(ImageOutput(0))
|
||||
i.f=0.0
|
||||
While i<=#MAXLOOP
|
||||
x.f=#XCENTER+Cos(Radian(i))*#SCALAR*i/#MAXLOOP
|
||||
y.f=#YCENTER+Sin(Radian(i))*#SCALAR*i/#MAXLOOP
|
||||
Plot(x,y,RGB(50,50,50))
|
||||
i+0.05
|
||||
Wend
|
||||
StopDrawing()
|
||||
EndIf
|
||||
EndIf
|
||||
ImageGadget(0, 0, 0, 0, 0, ImageID(0))
|
||||
Repeat : Event = WaitWindowEvent() : Until Event = #PB_Event_CloseWindow
|
||||
EndIf
|
||||
End
|
||||
Loading…
Add table
Add a link
Reference in a new issue