Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A Little Challenge: Spin the Circle
#12
And in case you're not looking for normalized, buttery-smooth spinning like the above by @bplus, here's a wobbly version that I boiled down from my original post. 

Code: (Select All)
Screen _NewImage(600, 400, 32) '
Dim As Integer b, c, count, sign '  Playing with Aspects
Dim As Single aspect, steps '      ** ROTATING CIRCLE - ASYMETRICAL MOTION **
Dim As _Unsigned Long col
$Color:32
count = 0: col = Red: 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, White, , , aspect
            Paint (_Width / 2, _Height / 2), col, White
            _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
    If count Mod 2 <> 0 Then If col = Red Then col = Green Else col = Red
    If count = 4 Then count = 0
    If _KeyDown(27) Then System
Loop
System
Reply


Messages In This Thread
A Little Challenge: Spin the Circle - by NakedApe - 09-10-2024, 10:15 PM
RE: A Little Challenge: Spin the Circle - by NakedApe - 09-12-2024, 06:54 PM
RE: A Little Challenge: Spin the Circle - by Dav - 09-12-2024, 11:44 PM



Users browsing this thread: 11 Guest(s)