主题:繁花规..小时应该都玩过
DECLARE SUB FHG (x!, y!, r1!, r2!, col!)
SCREEN 12
x1 = 320
y1 = 240
RANDOMIZE TIMER
FOR i = 1 TO 15
r1 = 300 * RND
r2 = r1 * RND
col = 15 * RND
FHG x1, y1, r1, r2, col
NEXT
SUB FHG (x, y, r1, r2, col)
s = r2 * RND
FOR t = 1 TO 50000 * RND
a1 = t * 3.1415926# / 180
a2 = (r1 / r2) * a1
xb = (-(r1 - r2) * COS(a1) - s * COS(a2 - a1) + x)
yb = ((r1 - r2) * SIN(a1) - s * SIN(a2 - a1) + y)
PSET (xb, yb), col
NEXT
END SUB
SCREEN 12
x1 = 320
y1 = 240
RANDOMIZE TIMER
FOR i = 1 TO 15
r1 = 300 * RND
r2 = r1 * RND
col = 15 * RND
FHG x1, y1, r1, r2, col
NEXT
SUB FHG (x, y, r1, r2, col)
s = r2 * RND
FOR t = 1 TO 50000 * RND
a1 = t * 3.1415926# / 180
a2 = (r1 / r2) * a1
xb = (-(r1 - r2) * COS(a1) - s * COS(a2 - a1) + x)
yb = ((r1 - r2) * SIN(a1) - s * SIN(a2 - a1) + y)
PSET (xb, yb), col
NEXT
END SUB