|
Post by johnno56 on Apr 12, 2022 0:40:31 GMT -6
Here is an "Easy Spiral" graphics demo converted from Bplus's QB64 version.
Mmmm... Donuts...
J
xmax = 700 ymax = 700 title$ = "Easy Spiral b+ 2022-04-12" center_x = windowpos_centered center_y = windowpos_centered WindowOpen(1,title$,center_x,center_y,xmax,ymax,WindowMode(1,0,0,0,0),1) SetWindowAutoClose(1, 0) CanvasOpen(1,xmax,ymax,0,0,xmax,ymax,0) ClearCanvas
pi = 3.141592654 s = 7 tick = 1
Do ClearCanvas For c = 1 To 3000 '1320 h = c + tick x = Sin(6 * h / pi) + Sin(3 * h) h = c + tick * 2 y = Cos(6 * h / pi) + Cos(3 * h) setColor(rgb(0, 128, 255)) CircleFill(s * (20 * x + 50), s * (20 * y + 50), 2) Next if Not WindowExists(1) Or WindowEvent_Close(1) Then end end if update() tick = tick + 0.005 Loop Until Key(27) = 1
|
|
|
Post by aurel on Apr 12, 2022 2:45:12 GMT -6
yes ..this one work fine ..nice
|
|
|
Post by johnno56 on Apr 12, 2022 2:48:55 GMT -6
The QB64 version could set the frame rate... changing the "tick = tick + 0.005" to a smaller figure will increase the speed...
|
|
|
Post by aurel on Apr 12, 2022 5:14:14 GMT -6
smoothnes depend also about of number of elements it is not same if you update 1325, 3000 or 5000 dots,circles
|
|