QB64 Phoenix Edition
Rotating Circle - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3)
+---- Forum: Programs (https://qb64phoenix.com/forum/forumdisplay.php?fid=7)
+---- Thread: Rotating Circle (/showthread.php?tid=740)



Rotating Circle - CharlieJV - 08-06-2022

Nothing fancy, just a small bit of code I wanted to mindlessly play with.  In case you want to put your own "spin" on it ...

A GW-BASIC program I modified in BASIC Anywhere Machine (view source code, run the program) before bringing it over to QB64.  

Code: (Select All)
' Based on https://github.com/Zannick/qbasic-programs/blob/master/ROTATE.BAS by Benjamin Wolf (April 8, 2003)

SCREEN 12 : x = 0.5
DO
  CLS
  if x < 1 then
    CIRCLE (320, 240), 230, 11
    CIRCLE (320, 240), 75, 11
  else
    CIRCLE (320, 240), 230, 11, , , x
    CIRCLE (320, 240), 75, 11, , , x
  end if
  if int(x*250000) < 1000000 then
    FOR z = 1 TO 1000000 - int(x * 250000)
    NEXT z
  end if
  _delay 0.0125
  IF x = 75 THEN y = 2
  IF x < 1 THEN y = 1
  SELECT CASE y
    CASE 1
        x = x + 0.5
    CASE 2
        x = x - 0.5
  END SELECT
LOOP