Snowflakes
#3
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 + ...
Reply


Messages In This Thread
Snowflakes - by SierraKen - 07-14-2022, 02:37 AM
RE: Snowflakes - by James D Jarvis - 07-14-2022, 01:47 PM
RE: Snowflakes - by bplus - 07-14-2022, 04:14 PM
RE: Snowflakes - by SierraKen - 07-14-2022, 05:38 PM
RE: Snowflakes - by SierraKen - 07-14-2022, 07:51 PM
RE: Snowflakes - by James D Jarvis - 07-15-2022, 11:54 AM
RE: Snowflakes - by SierraKen - 07-16-2022, 07:39 PM
RE: Snowflakes - by vinceg2022 - 07-19-2022, 06:14 AM
RE: Snowflakes - by James D Jarvis - 07-19-2022, 05:10 PM
RE: Snowflakes - by SierraKen - 07-19-2022, 11:34 PM



Users browsing this thread: 3 Guest(s)