1: DECLARE SUB drawit () 2: DECLARE SUB plotit () 3: DECLARE FUNCTION MouseInit% () 4: COMMON SHARED nodes 5: COMMON SHARED nx, ny, num 6: DIM SHARED Mouse$ 7: nodes = 2000 8: DIM SHARED nx(1 TO nodes) 9: DIM SHARED ny(1 TO nodes) 10: DIM SHARED BSV$ 11: TYPE sammy 12: x AS INTEGER 13: y AS INTEGER 14: END TYPE 15: 10 CLS 16: SCREEN 12 17: LOCATE 1, 1: LINE INPUT "Metafilename-->"; file$ 18: LOCATE 2, 1: LINE INPUT "BSV File-->"; BSV$ 19: OPEN file$ FOR INPUT AS #1 LEN = nodes 20: plotit 21: drawit 22: 23: SUB drawit 24: DIM fs(1 TO nodes) 25: DIM f(1 TO nodes) 26: CLS 27: steps = 20 28: FOR gh% = 1 TO num 29: fs(gh%) = ny(gh%) / steps 30: NEXT gh% 31: FOR fi% = 1 TO steps * 2 32: FOR gh% = 1 TO num 33: f(gh%) = f(gh%) + fs(gh%) 34: NEXT gh% 35: FOR rt% = 1 TO num - 1 36: tx = nx(rt%): ty = (240 - ny(rt%)) + f(rt%) 37: tx2 = nx(rt% + 1): ty2 = (240 - ny(rt%)) + f(rt%) 38: IF (tx - tx2) + (ty - ty2) > -13 THEN clr% = 8 39: IF (tx - tx2) + (ty - ty2) > -6 THEN clr% = 7 40: IF (tx - tx2) + (ty - ty2) > 0 THEN clr% = 15 41: LINE (tx, ty)-(tx2, ty2), (tx + ty2) - (ty + tx2) 42: NEXT rt% 43: NEXT fi% 44: IF BSV$ = "" THEN ELSE BSAVE BSV$, 0, 65534 45: END SUB 46: 47: SUB plotit 48: CLS : SCREEN 12 49: LOCATE 1, 1: PRINT "Loading & Decoding..." 50: loops: 51: FOR yi = 1 TO 100 STEP .6: NEXT yi 52: DO 53: IF nd% = 1 THEN GOTO dones 54: GOTO pute 55: LOOP 56: pute: 57: yu% = yu% + 1 58: IF EOF(1) THEN nd% = 1 ELSE INPUT #1, x%, y% 59: nx(yu%) = x%: ny(yu%) = 480 - y% 60: CIRCLE (x%, y%), 1, 2 61: GOTO loops 62: dones: 63: num = yu% 64: CLOSE 1 65: LOCATE 1, 1: PRINT " " 66: END SUB 67: |