Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rotating Circle
#1
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
Reply




Users browsing this thread: 2 Guest(s)