553 

 551 



552 



K=K+1 



DIST(K)=SQRT<(XQNRTN(ir,JJ>-XD)*«2+(YCiRTN(II»JJ)-YD)»*2) 



CS=XOHRTN(II.JJ)-XD 



SN=YONRTN(II,JJ)-YD 

 IF(CS.6E.0,0.AND.SN.GE.0.0)R(K)=1.0 

 IF(CS.LT.0.0.AND.SN.6E.0.0)R(K)=2.0 

 IF(CS.LT.0.0.AND.SN.LT.0.0)R<K)=3.0 

 IF(CS.6E.0.0.AND.SN.LT.0.0)R(K)=4.0 

 IF(CS.EQ.O.O.AND.SN.EQ.O.O) GO TO 603 

 IVAL(K)=II 

 JVAL(K)=JJ 



IF(K.ST.l) GO TO 560 

 DMN=DIST(1) 

 I1=IVAL<1) 

 J1=JVAL(1) 

 Kl=l 

 560 IF(DIST(K).GE.DMIN) GO TO 553 

 DMIN=DIST(K) 

 K1=K 



CONTINUE 

 CONTINUE 

 I1=IVAL(K1) 

 J1=JVAUK1) 

 R1=R(K1) 

 CONTINUE 

 DO 700 111=1, K 

 R2=R(III) 



IFIR2.EQ.R1) GO TO 700 

 K2=III 

 I2=IVAL(III) 

 J2=JVAL(III) 

 DMIN2=DIST(III) 

 GO TO 701 



700 CONTINUE 

 IF(R2.EQ.R1) 60 TO 609 



701 CONTINUE 



DO 570 L=III,K 



IF(L.EQ.Kl) GO TO 570 



IF(R(L).EQ.R1) 60 TO 570 



IF(DIST(L).SE.DMN2) 60 TO 570 



DMN2=DIST(L) 



K2=L 



CONTINUE 



R2=R(K2) 



I2=IVAL(K2) 



J2=JVAL(K2) 



DO 703 JJJ=1,K 



R3=R(JJJ) 



IF(R3.EQ.R1.0R.R3.EQ.R2) 60 TO 703 



K3=JJJ 



I3=IVAL(JJJ) 



J3=JVAL(JJJ) 



DMN3=DIST(JJJ) 



GO TO 704 



570 



INTERPO 



114 



INTERPO 



115 



INTERPO 



116 



INTERPO 



117 



INTERPO 



118 



INTERPO 



119 



INTERPO 



120 



INTERPO 



121 



INTERPO 



122 



INTERPO 



123 



INTERPO 



124 



INTERPO 



125 



INTERPO 



126 



INTERPO 



127 



INTERPO 



128 



INTERPO 



129 



INTERPO 



130 



INTERPO 



131 



INTERPO 



132 



INTERPO 



133 



INTERPO 



134 



INTERPO 



135 



INTERPO 



136 



INTERPO 



137 



INTERPO 



138 



INTERPO 



139 



INTERPO 



140 



INTERPO 



141 



INTERPO 



142 



INTERPO 



143 



INTERPO 



144 



INTERPO 



145 



INTERPO 



146 



INTERPO 



147 



INTERPO 



148 



INTERPO 



149 



INTERPO 



150 



INTERPO 



151 



INTERPO 



152 



INTERPO 



153 



INTERPO 



154 



INTERPO 



155 



INTERPO 



156 



INTERPO 



157 



INTERPO 



158 



INTERPO 



159 



INTERPO 



160 



INTERPO 



161 



INTERPO 



162 



INTERPO 



163 



INTERPO 



164 



INTERPO 



165 



INTERPO 



166 



INTERPO 



167 



19 



