Simple Pattern
Code: (Select All)
_Title "Simple Patterns" ' B+ 2020-08-12
' rework Simple Pattern from SmallBASIC
Screen _NewImage(1024, 700, 32)
_Delay .25
_ScreenMove _Middle
s = 145: cd = 2
While 1
flip = 1 - flip
If flip Then
For k = .005 To .995 Step .005
GoSub drawIt
Next
Else
For k = .995 To .005 Step -.005
GoSub drawIt
Next
End If
cd = cd * .987654321
Wend
drawIt:
Cls
For i = 0 To 1024
For j = 0 To 700
x = i * s / 600: y = j * s / 600
c = x * x + y * y
d = c / cd
d = d - Int(d)
If d < k Then PSet (i, j)
Next
Next
_Display
_Limit 20
Return
b = b + ...