Page 138

(seglli'

:1:

da pagina

/37 J

LET

s

(1)

=t

18113 LET

1180 If iy<>0 THEN GO l'O 1185 fOR i=l l'O 3 11'~0 LET i (i) =s (i): NEXT O 123iZJ 1195 fOR j=l l'O 2 12iZJ0 LET ,-(j) =iZJ 12iZJ5 fOR n=l l'O 3 121iZJ LET i (j) = i (.j) +s (n) *9 1215 NEXT n: NEXT j 122iZJ LET i(3)=i(2) 1225 LET i(2) =s(2) 123iZJ If iZ<>iZJ THEN GO l'O 1235 fOR i=l l'O 3 124iZJ LET s (i ) = i (i ): NEXT O 1275 1245 fOR j=l l'O 2 12513 LET S(j)=iZJ 1255 fOR n=l l'O 3 12613 LET s (j) =s (j) + ,"(n) *a 1265 NEXT n: NEXT j 1270 LET S(3)=i(3) 1275 J=;:ETURN 14.9 13 L ET (~1= f- ( (f- 'v' (n l ,l) ,2)

1195 i: GO T

1245 i: GIJ T

)/

(,o)

(n l

)

x2=b(K,3)

LET

y2=b(K,4.

)

1560 DEf fN x(y)=(y-yl) *(X2-xl)/ (y2-yl) +xl 1570 DEf fN Y (X) = (;"{ -x 1) * ('::.I2-y 1) 1 (x2-x l) +'::.11 1580 RETURN 1590 RESTORE 810: If ABS (y2-yl) >=ABS (x2-xl)/255 THEN GO l'O 163

o

161313LET yl1=y2-(y2-yl)/2 1610 If (X l <13 AND X2 >13) OR (x2 <0 AND xl>0) THEN LET x11=0: GO TO 181313 1620 LET Xl1=255: GO TO 1800 1630 If ABS (x2-xl) >=AB:3('::.I2-y1) /175 THEN GO TO 1660 1640 LET Xl1=x2-(x2-x1)/2 1650 If ('::.Il <0 AND y2 >iZJ)OR (y2 <0 AND yl>0) THEN LET yll=0: GO l'O 1800 1655 LET ~11=175: GO l'O 1800 1660 fOR 1=1 l'O 2 1670 READ '::.I 1680 LET Xl1=fN X(y) 1690 If xl1<0 OR xl1>255 THEN GO TO 1710 1700 If (x 1 c< 11 AND x 11 <x 2) OR ( x2<Xl1 AND xll<xl) THEN LET yll= '::.I: GO l'O 1790 1710 NEXT i 1720 fOR i=l TO 2 173iZJ READ x 1740 LET yll=fN y(X) 1750 If '::.111 <,< OR y 11 >175 THEN GO TO 1770 1760 If (yl<'::.Il1 ANO yl1<y2) OR ( y2<yl1 ANO yl1<yl) THEN LET xl1= X: 130 l'O 1790 1770 NEXT i 1775 LET b(K,3)=-1: RESTORE 6113: RETURN 17813 PR1NT "Ei iO l-e in in te ,"sezio ni l": STIJP 17913 RESTORE 810 1800 If tl=0 THEN LET b(K,3)=xll : LET b(K,4.)=yl1: GO TO 18213

138

LET

b(K,2)=

(2)

RETURN RESTORE 810: LET j=0 D1t1 ~<(2): OIt-ly (2) If ABS (y2-'::.Il) >=AB5 (x2-x 1) THEN GO TO 1900 LET Y(1)='::.I2-(Y2-Yl)/2: LET =y

(l)

18713 1F '::.I ( l) <13 OR '::.I (1) >175 THEN LET b(K,3)=-1: RETURN 18813 If 0<1<13 AND x2<iZJ) OR (xl>2 55 RNO X2>255) THEN LET b(K,3)=l: RETURN 189iZJLET x(l) =13: LET x(2)=255: 13 O TO 2130 1'~00 IF ABS (x2-Xl) >=ABS (y2-yl) 1175 THEN 130 l'O 1950 19113 LET x(1)=x2-(x2-Xl)/2: LET

x

(.j ,n)

15iZJ0 LET ss=(wl-p)*255/t 151iZJLET w2=(v(nl,3)-h)/(d+v(nl, 2) ) *0:1 +h 15213 LET tt=(W2+i)*175/hl 153iZJRETURN 154.13 LET xl=b(K,l) LET yl=b(K,2 LET

18213 1830 18413 18513 /255 18613 y

(j ,n )

+0:1) *d)

1550

b(K,l) =Xll:

~11

(K , l)

(2)

=x

(1)

19213 IF x(l) <13 OR X(l) >255 THEN 'LET b(K,3)=-1: RETURN 19313 IF ('::.11<13 ANO y2<iZJ) OR (':11>1 75 AND y2>175) THEN LET b(K,3)=1: RETURN . 1940 LET y(1)=0: LET y(2)=175: G O TO 213121 1950 FOR i=l TO 2 195121 REAO ~ 1970 LET xil=FN x(y) 1980 IF xll<12I OR xl1>255 THEN 130 TO 212120 1990 IF (xll>xl ANC' xll<x2) OR ( xl1>x2 ANO xl1<xl) THEN LET j=j+ l: LET x(j)=Xll: LET y(j)=y: GO TO 21211121 2121121121 LET b(K,3)=-1: RESTORE 810: RETURN 2010 IFJ=2 THEN GO TO 2120 21320 NEXT i 2030 FOR i=l l'O 2 21214121 REAO x 205121 LET yll=FN y(x) 21215121 IF yll<0 OR Yl1>175 THEN GO TO 21121121 212170 IF (Yll>yl ANO yl1<y2) OR ( yl1>'::.12 ANO yl1<yl) THEN LET j=j+ l: LET x(j)=x: LET y(j)=yll: GO TO 21219121 212180 LET b(K,3)=-1: RESTORE 810: RETURN 212190 IF j=2 THEN GO TO 2120 211210 NEXT i 211121 LET b(K,3)=-1: RESTORE 810: RETURN 2120 RESTORE 61121 2130 IF (X l >x2 ANO x (l) >x (2» OR (X l <x 2 ANO x (l) <x (2)) THEN GO T O 2160 2140 LET x3=x (1): LET x li) =x (2) : L ET

2150 LET 2160

~< (2)

=x 3

LET y3=y(1): LET y(2)=y3 LET b (K, 1) =x (1):

y(1)=y(2): LET

b

LET

LET

b(K,4)

n

,2)

='::.1 (l)

2170 =y

b(K,3)=X(2):

(2)

218121 RETURN 30121121 LET fl=iZJ 301215 fOR i=l TO 3 312110 IF C(ll,i)=l2 THEN GO l'O 30 6121 31320 NEXT i 312130 FOR j=l TO 3 312140 1F c(l2,j)=ll THEN GO TO 30 50 312150 NEXT J: GO TO 31218121 3050 BEEP 0.1,0: PRINT Ul;"li nnessione ".;ll;"-"; l2'''e' gia st ata ass€:gnata": PAUSE 80

,o

MCmicrocomputer

n. 38 - febbraio

1985

Profile for ADPware

038 MCmicrocomputer  

Febbraio 1985

038 MCmicrocomputer  

Febbraio 1985

Profile for adpware
Advertisement