Example of Turtle Graphics

Spirals

You can change the parameter values appropriately.

Sub Spiral()

Dim length, angle, d
Dim c

    d = 0.005
    
    length = 1
    angle = 89

    InitializeGraphics
    
    SetViewPort 10, 10, 489, 489
    SetGraphicsWindow 0, 1.2, 1.2, 0
    c = QBColor(9)
    
    TGSetPoint 0.1, 0.1
    
    Do While length > d
        TGMoveL length, c
        TGTurn angle
        length = length - d
    Loop
    
End Sub

spiral

Download source program   tg-spiral.bas