' This program exported from BASIC Anywhere Machine (Version [5.2.3].[2023.12.16.16.28]) on 2024.05.26 at 18:59 (Coordinated Universal Time)
' Program by Charlie Veniot
' Using DRAW statements for no-fuss-no-muss generation of two-colour "twisted squircles" (i.e. squares with rounded corners).
mid% = 1020
ma% = 200
l% = 400
ma% = l%/2
DIM c%(1 TO 2)
SCREEN _NEWIMAGE( mid% * 2 + 1, mid% * 2 + 1, 17 )
COLOR 0,63 : CLS
DO
i% = 0
GOSUB 🎨100_SetRandomColours
FOR a# = 0 TO 420 STEP 0.05
DRAW "B M " + (mid%-ma%) + "," + (mid%+ma%)
DRAW "B TA" + a# + "u" + 800
DRAW "TA0"
COLOR c%(1)
IF BETWEEN(a#,280,420) THEN DRAW "B U" + l% ELSE DRAW "U" + l%
COLOR c%(2)
DRAW "R" + l%
COLOR c%(1)
DRAW "D" + l%
COLOR c%(2)
IF BETWEEN(a#,360,420) THEN DRAW "B U" + l% ELSE DRAW "L" + l%
i% = i% + 1 : IF i% MOD 25 = 0 THEN SLEEP 0.001
NEXT a#
SLEEP 3
LOOP
🎨100_SetRandomColours:
c%(1) = INT( RND * 63 )
c%(2) = INT( RND * 63 )
WHILE c%(2) = c%(1): c%(2) = INT( RND * 63 ) : WEND
RETURN