#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