Recursion: 4 ways to get it working
#8
(02-15-2023, 12:13 AM)TempodiBasic Wrote:
(02-14-2023, 11:54 PM)bplus Wrote: Fractals work great with recursion! I could do an art show!

Heart I hope you'll do as soon you can. It is very beautiful to see the facts over the teoretic moment.

Smile A quickie from Proggies:
Code: (Select All)
_Title "Flower Wheel" ' b+ 2022-04?
Screen 12
Do
    Cls
    o = o + _Pi / 180
    drawc _Width / 2, _Height / 2, _Width / 5, .25, 4, o
    _Display
    _Limit 30
Loop

Sub drawc (x, y, r, a, n, o)
    If n > 0 Then
        For t = 0 To _Pi(2) Step _Pi(1 / 3)
            xx = x + r * Cos(t + o)
            yy = y + r * Sin(t + o)
            Circle (xx, yy), r
            drawc xx, yy, a * r, a, n - 1, -o - n * _Pi / 180
        Next
    End If
End Sub
b = b + ...
Reply


Messages In This Thread
RE: Recursion: 4 ways to get it working - by bplus - 02-15-2023, 02:10 AM



Users browsing this thread: 8 Guest(s)