主题:圣诞节到了,发个小程序,大家娱乐娱乐一下
RANDOMIZE TIMER
SCREEN 12
COLOR 3
pi = 3.1415926#
k = .55
DO
q = INT(3 + RND * 20)
CLS
FOR d = 12 TO 36
ys = d / 3
FOR c = 12 TO 36
LOCATE 30, 72: PRINT TIME$;
xs = c / 3
FOR i = 0 TO 300
temp = (xs + k * SIN(ys)) * COS(2 * pi / q) + ys * SIN(2 * pi / q)
ys = -(xs + k * SIN(ys)) * SIN(2 * pi / q) + ys * COS(2 * pi / q)
xs = temp
x = INT(xs * 8)
y = INT(ys * 8)
IF (i > 10) THEN PSET (x + 320, 240 - y), c / 3
NEXT
IF INKEY$ = CHR$(27) THEN END
NEXT
NEXT
LOOP WHILE INKEY$ <> CHR$(27) '按ESC退出程序
SCREEN 12
COLOR 3
pi = 3.1415926#
k = .55
DO
q = INT(3 + RND * 20)
CLS
FOR d = 12 TO 36
ys = d / 3
FOR c = 12 TO 36
LOCATE 30, 72: PRINT TIME$;
xs = c / 3
FOR i = 0 TO 300
temp = (xs + k * SIN(ys)) * COS(2 * pi / q) + ys * SIN(2 * pi / q)
ys = -(xs + k * SIN(ys)) * SIN(2 * pi / q) + ys * COS(2 * pi / q)
xs = temp
x = INT(xs * 8)
y = INT(ys * 8)
IF (i > 10) THEN PSET (x + 320, 240 - y), c / 3
NEXT
IF INKEY$ = CHR$(27) THEN END
NEXT
NEXT
LOOP WHILE INKEY$ <> CHR$(27) '按ESC退出程序