DEFINT A-Z SCREEN 12 RANDOMIZE TIMER xmax = 100 ymax = 100 TYPE coord x AS INTEGER y AS INTEGER z AS SINGLE END TYPE pi = 3.141597# speed = 10 num = 20 DIM points(1 TO num) AS coord FOR x = 1 TO num points(x).x = RND * xmax points(x).y = RND * ymax points(x).z = RND NEXT x DO FOR x = 1 TO num PSET (points(x).x, points(x).y), 0 points(x).x = points(x).x + (points(x).z * speed * xdist!) points(x).y = points(x).y + (points(x).z * speed * ydist!) IF points(x).x > xmax THEN points(x).x = points(x).x - xmax: points(x).y = RND * ymax IF points(x).x < 0 THEN points(x).x = xmax - points(x).x: points(x).y = RND * ymax IF points(x).y > ymax THEN points(x).y = points(x).y - ymax: points(x).x = RND * xmax IF points(x).y < 0 THEN points(x).y = ymax - points(x).y: points(x).x = RND * xmax PSET (points(x).x, points(x).y), INT(points(x).z * 16) '+ 16 NEXT x deg = (deg + 1) MOD 360 rad! = (deg * pi) / 180 xdist! = COS(rad!) ydist! = SIN(rad!) LOOP UNTIL INKEY$ = CHR$(27)