09-12-2024, 07:50 PM
How about this version, if we're shooting for Lines of Code:
Code: (Select All)
Screen _NewImage(600, 400, 32) 'A Spinning Circle: bplus mod 2 of NakedApe, tweaked by Steve for LOC
Dim As Integer i, x, start, fini, stepper, top, col ' Playing with Aspects
Dim As _Unsigned Long col(-1 To 0): col(0) = &HFFFF0000~&: col(-1) = &HFF00FF00~&
Dim asp(1 To 90)
i = 1: asp(1) = 1: start = 1: fini = 90: stepper = 1 ' make an array of aspect values
For i = 2 To fini: asp(i) = 1 / Cos(_D2R(i)): Next
Do 'Note: asp(i) = Cos(_D2R(i)) will spin on the other axis
For i = start To fini Step stepper
Cls
Circle (_Width / 2, _Height / 2), 100, -1~&, , , asp(i)
Paint (_Width / 2, _Height / 2), col(col), -1~&
_Limit 60
_Display
Next
Swap start, fini: stepper = -stepper: If start = 90 Then col = Not col ' flip colors on odd cycles
Loop Until _KeyDown(27)