(09-11-2024, 01:18 PM)bplus Wrote: Ah fresh morning, fresh mind!
@NakedApe I hope you find this as good as I do! I mod my mod of your code:
Code: (Select All)Option _Explicit
_Title " A Spinning Circle: bplus mod 2 of NakedApe"
Screen _NewImage(600, 400, 32)
Dim As Integer i, x, start, fini, stepper, top ' Playing with Aspects
Dim As _Unsigned Long col
$Color:32
Dim asp(1 To 90)
i = 1: asp(1) = 1 ' make an array of aspect values Note: asp(i) = Cos(_D2R(i)) will spin on the other axis
While i < 90
i = i + 1: asp(i) = 1 / Cos(_D2R(i))
Wend
top = i: col = Red: start = 1: fini = top: stepper = 1
Do
For i = start To fini Step stepper
Cls
Circle (_Width / 2, _Height / 2), 100, White, , , asp(i)
Paint (_Width / 2, _Height / 2), col, White
_Limit 60
_Display
Next
If start = 1 Then
start = top: fini = 1: stepper = -1
If col = Red Then col = Green Else col = Red ' flip colors on odd cycles
Else
start = 1: fini = top: stepper = 1
End If
Loop Until _KeyDown(27)
All smoothed out nicely.
By George, @bplus, you've done it. Nice morning thinking! I got my version down to one loop, but without the smoothness of assigning aspect values! +1 EDIT: And since you're on a roll, how would you mod it to work horizontally? Aspect values from 0.000001 to 1? Thnx! EDIT2: Nevermind. I see you already added a note about that! You're way ahead of me.