Added some color. The changing color adds another depth to the patterns.
- Dav
- Dav
Code: (Select All)
'DRAWSPIN.BAS - v2, added some color
'Spinning patterns using DRAW.
'Press ENTER to change pattern, ESC to quit.
'Coded by Dav, OCT/2023
SCREEN _NEWIMAGE(800, 600, 32)
seed = 123 + (RND * 123): px = 3 + RND * 3
DO
CLS
DO
p = p + px: ang = ang + seed
c$ = "C" + STR$(_RGB(seed MOD p / 2, p / 6, p MOD seed * 2))
DRAW "D" + STR$(p) + "TA" + STR$(ang + a) + c$
LOOP UNTIL POINT(0) < 0 AND POINT(1) < 0
p = 0: a = a + .01: IF ang >= (a * seed) THEN ang = 0
seed = seed + .03: IF seed > 245 THEN seed = 123
IF INKEY$ = CHR$(13) THEN seed = 123 + (RND * 123): px = 3 + RND * 3
_LIMIT 30
_DISPLAY
LOOP UNTIL INP(&H60) = 1