07-14-2022, 04:14 PM
Some more flakey designs ;-))
Code: (Select All)
_Title "draw flake test 2" ' B+ 2018-12-05 from JB 2016-11-07
' revist 2021-11-24 and demo better. ' revise again for 2022-07-14 post
Const XMAX = 400, YMAX = 400
Randomize Timer
Screen _NewImage(XMAX, YMAX, 32)
_ScreenMove 400, 150
Do
DV = 2.1 + .4 * Rnd 'global dictates density of flake
rr = 45 * Rnd + 3
For rAng = 0 To _Pi / 16 Step _Pi(1 / 120)
Cls
rFlake XMAX * .5, YMAX * .5, rr, DV, rAng
_Display
_Limit 6
Next
Loop Until _KeyDown(27)
Sub rFlake (x, y, r, DV, rAng)
'DV = flake density
Color _RGBA32(225, 225, 245, 100)
For a = 0 To 5
armX = x + r * Cos(a * _Pi(1 / 3) + rAng)
armY = y + r * Sin(a * _Pi(1 / 3) + rAng)
Line (x, y)-(armX, armY)
If r > 2.5 Then rFlake armX, armY, r / DV, DV, rAng
Next
End Sub
b = b + ...