(09-12-2024, 07:15 PM)bplus Wrote: excuses excuses I think you will be gaining an hour this fall.
@NakedApe this can be combined to one line:
Code: (Select All)If _KeyDown(27) Then System
Loop
System
Loop Until _keydown(27) ' don't need system when trying to beat Steve in less LOC
I can drop it down to 22 LOC, without much effort. How's this look for you:
Code: (Select All)
Screen _NewImage(600, 400, 32) '** ROTATING CIRCLE - ASYMETRICAL MOTION **
Dim As Integer b, c, count, sign ' Playing with Aspects
Dim col As _Unsigned Long, aspect As Single, steps As Single
count = 0: col = &HFFFF0000~&: sign = 1: aspect = 1: steps = .015
Do
For c = 1 To 9
For b = 1 To 10
Cls
aspect = aspect + (steps * sign)
If aspect <= 1 Then sign = 1: steps = .015
Circle (_Width / 2, _Height / 2), 100, &HFFFFFFFF~&, , , aspect
Paint (_Width / 2, _Height / 2), col, &HFFFFFFFF~&
_Limit 75
_Display
Next b
If aspect >= 70 Then sign = -1: Exit For ' Max aspect = ~77.5
If sign = 1 Then steps = steps * 2 Else steps = steps / 2
Next c
count = (count + 1) Mod 4
If count Mod 2 <> 0 Then If col = &HFFFF0000~& Then col = &HFF00FF00~& Else col = &HFFFF0000~&
If _KeyDown(27) Then System
Loop