' Spiral ' made by Svjatoslav Agejenko ' in 2003.12 ' H-Page: svjatoslav.eu ' E-Mail: svjatoslavagejenko@gmail.com DECLARE SUB fill (x1, y1, x2, y2, xx1, yy1, xx2, yy2, hel) DIM SHARED torux(1 TO 10000) DIM SHARED toruy(1 TO 10000) DIM SHARED sin1(1 TO 10000) DIM SHARED cos1(1 TO 10000) DIM SHARED tor SCREEN 12 su = 200 tor = 0 FOR a = 1 TO 97 STEP .15 'CALCULATE POINTS tor = tor + 1 su = SIN(a / 31) * 100 x = SIN(a) * su * 3 + 320 y = COS(a) * su + 250 y = y - (COS(a / 31) * 200) sin1(tor) = a cos1(tor) = a / 31 torux(tor) = x toruy(tor) = y PSET (x, y), 15 NEXT a OPEN "texture1.dat" FOR INPUT AS #1 DIM SHARED text$(1 TO 1000) a = 0 1 LINE INPUT #1, a$ IF LEFT$(a$, 3) = "END" THEN GOTO 2 a = a + 1 text$(a) = a$ GOTO 1 2 CLOSE #1 CLS a = 1 FOR c = 1 TO 20 FOR b = 1 TO LEN(text$(c)) a$ = RIGHT$(LEFT$(text$(c), b), 1) a = a + 1 IF a > tor - 43 THEN GOTO 3 tee = SIN(sin1(a + 32)) tee = tee - COS(cos1(a)) IF tee <= 0 THEN LINE (torux(a), toruy(a))-(torux(a + 1), toruy(a + 1)), 15 LINE (torux(a), toruy(a))-(torux(a + 42), toruy(a + 42)), 15 hel = 10 hel1 = COS(cos1(a) - 1) + .5 hel2 = SIN(sin1(a) + 1) + 1 IF hel2 > 1 AND hel1 > 1 THEN hel3 = (hel2 - 1) * (hel1 - 1) * 8 hel = hel / (hel3 + 1) END IF IF a$ = "M" THEN hel = hel / 3 fill torux(a), toruy(a), torux(a + 1), toruy(a + 1), torux(a + 42), toruy(a + 42), torux(a + 43), toruy(a + 43), hel END IF NEXT b NEXT c 3 a$ = INPUT$(1) SYSTEM SUB fill (zx1, zy1, zx2, zy2, zxx1, zyy1, zxx2, zyy2, hel) ' x1,y1 ---------------- xx1,yy1 hel - brightness ' | | ' | | ' | | ' x2,y2 ---------------- xx2,yy2 ' x1 = zx1 y1 = zy1 x2 = zx2 y2 = zy2 xx1 = zxx1 yy1 = zyy1 xx2 = zxx2 yy2 = zyy2 j1 = x1 - x2 j2 = y1 - y2 j3 = SQR((j1 * j1) + (j2 * j2)) j4 = xx1 - xx2 j5 = yy1 - yy2 j6 = SQR((j4 * j4) + (j5 * j5)) j7 = (j3 + j6) / 2 j = j7 / hel x3 = (x2 - x1) / j y3 = (y2 - y1) / j xx3 = (xx2 - xx1) / j yy3 = (yy2 - yy1) / j FOR a = 1 TO j x1 = x1 + x3 y1 = y1 + y3 xx1 = xx1 + xx3 yy1 = yy1 + yy3 LINE (x1, y1)-(xx1, yy1), 15 NEXT a END SUB