DECLARE SUB tt (x1!, y1!, x2!, y2!, t!, g!, n!) CLEAR 2125000000# SCREEN 12 FOR i = 1 TO 15 PALETTE i, 65536 * (i * 4 + 3) + 256& * (i * 4 + 3) + (i * 4 + 3) NEXT CALL tt(220, 240, 420, 240, 1, 4, 1) CALL tt(420, 240, 220, 240, 1, 4, 1) SUB tt (x1, y1, x2, y2, t, g, n) l = SQR((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)) IF l > t THEN s = SIN(3.14 / g) / (2 * COS(3.14159 / g)) c = .5 CALL tt(x1, y1, x1 + c * (x2 - x1) - s * (y2 - y1), y1 + s * (x2 - x1) + c * (y2 - y1), t, g, n + 1) CALL tt(x1 + c * (x2 - x1) - s * (y2 - y1), y1 + s * (x2 - x1) + c * (y2 - y1), x2, y2, t, g, n + 1) ELSE 'LINE (x1, y1)-(x2, y2), n PSET (x1, y1), POINT(x1, y1) + 1 PSET (x2, y2), POINT(x2, y2) + 1 END IF END SUB