07-11-2023, 05:39 AM
My DrawBalls were improved by OldMoses Sin even smallest!!!
Code: (Select All)
dh = _DesktopHeight * .85
Screen _NewImage(dh, dh, 32)
Do
drawBall Rnd * dh, Rnd * dh, 5, _RGB32(Rnd * 255, Rnd * 255, Rnd * 255)
_Limit 5
Loop
Sub drawBall (x, y, r, c As _Unsigned Long)
Dim rred As Long, grn As Long, blu As Long, rr, f
rred = _Red32(c): grn = _Green32(c): blu = _Blue32(c)
For rr = r To 0 Step -0.25 ' step -1 with Filled Circle
f = 1 - Sin(rr / r) ' thank OldMoses for Sin ;-))
Circle (x, y), rr, _RGB32(rred * f, grn * f, blu * f)
' better with Filled Circle
Next
End Sub
b = b + ...