anchor.diff:  
         Integer i, j
   
  -      if (label.EQ.1 .or. label.EQ.2 .or.
  -     & label.EQ.3) then
  -
  -      Coef(1, 1) = DATA(1)
  -      Coef(2, 2) = DATA(4)
  -      Coef(3, 3) = DATA(6)
  -
  -      Coef(1, 2) = DATA(2)
  -      Coef(2, 1) = DATA(2)
  -
  -      Coef(1, 3) = DATA(3)
  -      Coef(3, 1) = DATA(3)
  -
  -      Coef(3, 2) = DATA(5)
  -      Coef(2, 3) = DATA(5)
  +      if (label .EQ. 1 .or.
  +     &    label .EQ. 2 .or.
  +     &    label .EQ. 3) then
  +
  +        Coef(1, 1) = DATA(1)
  +        Coef(2, 2) = DATA(4)
  +        Coef(3, 3) = DATA(6)
  +
  +        Coef(1, 2) = DATA(2)
  +        Coef(2, 1) = DATA(2)
  +
  +        Coef(1, 3) = DATA(3)
  +        Coef(3, 1) = DATA(3)
  +
  +        Coef(3, 2) = DATA(5)
  +        Coef(2, 3) = DATA(5)
   
         Else
   
  -      Coef(1, 1) = DATA(label+7)
  -      Coef(2, 2) = DATA(label+7)
  -      Coef(3, 3) = DATA(label+7)
  -
  -      Coef(1, 2) = 0D0
  -      Coef(2, 1) = 0D0
  -
  -      Coef(1, 3) = 0D0
  -      Coef(3, 1) = 0D0
  -
  -      Coef(3, 2) = 0D0
  -      Coef(2, 3) = 0D0
  +        Coef(1, 1) = DATA(label + 7)
  +        Coef(2, 2) = DATA(label + 7)
  +        Coef(3, 3) = DATA(label + 7)
  +
  +        Coef(1, 2) = 0D0
  +        Coef(2, 1) = 0D0
  +
  +        Coef(1, 3) = 0D0
  +        Coef(3, 1) = 0D0
  +
  +        Coef(3, 2) = 0D0
  +        Coef(2, 3) = 0D0
   
         End if
   
  
positive.code: 
  C LOCAL VARIABLEs
  
        Integer  i,j,k,l
        Integer label
  
        Real*8 e1,e2,e3,ed ! e1
        Real*8 m1,m2,m3,md ! e2
        Real*8 n1,n2,n3,nd ! e3
        Real*8 f1,f2,f3,fd !
  
        Real*8 KB(3,3),T(3,3),KF(3,3)
  c====================================================
        ed=sqrt((XY2(1)-XY1(1))**2+(XY2(2)-XY1(2))**2+
       &  (XY2(3)-XY1(3))**2)
        e1=(XY2(1)-XY1(1))/ed
        e2=(XY2(2)-XY1(2))/ed
        e3=(XY2(3)-XY1(3))/ed
  
  
        fd=sqrt((XY3(1)-XY1(1))**2+(XY3(2)-XY1(2))**2+
       &  (XY3(3)-XY1(3))**2)
        f1=(XY3(1)-XY1(1))/fd
        f2=(XY3(2)-XY1(2))/fd
        f3=(XY3(3)-XY1(3))/fd
  
        md=sqrt((e2*f3-e3*f2)**2+(e3*f1-e1*f3)**2+
       &  (e1*f2-e2*f1)**2)
        m1=(e2*f3-e3*f2)/md
        m2=(e3*f1-e1*f3)/md
        m3=(e1*f2-e2*f1)/md
  
        nd=sqrt((e2*m3-m2*e3)**2+(e3*m1-e1*m3)**2+
       &  (e1*m2-e2*m1)**2)
        n1=(e2*m3-m2*e3)/nd
        n2=(e3*m1-e1*m3)/nd
        n3=(e1*m2-e2*m1)/nd
  
  c provodimost posle povorota k1
  c zapolnyeam matrix, posle povorota
  c matrix povorota T
        T(1,1)=e1
        T(2,1)=e2
        T(3,1)=e3
        T(1,2)=m1
        T(2,2)=m2
        T(3,2)=m3
        T(1,3)=n1
        T(2,3)=n2
        T(3,3)=n3
  
        Do i=1,3
        	Do j=1,3
          KF(i,j)=0D0
          End do
        End do
  
        if (label.EQ.1) then
        KB(1,1)=DATA(5)
        KB(2,1)=0D0 !DATA(2)
        KB(3,1)=0D0 !DATA(3)
        KB(1,2)=0D0 !DATA(2)
        KB(2,2)=DATA(6)!DATA(4)
        KB(3,2)=0D0 !DATA(5)
        KB(1,3)=0D0 !DATA(3)
        KB(2,3)=0D0 !DATA(5)
        KB(3,3)=DATA(6)
  
        Else if (label.EQ.2) then
        KB(1,1)=DATA(7)
        KB(2,1)=0D0
        KB(3,1)=0D0
        KB(1,2)=0D0
        KB(2,2)=DATA(8)
        KB(3,2)=0D0
        KB(1,3)=0D0
        KB(2,3)=0D0
        KB(3,3)=DATA(8)
  
        Else if (label.EQ.3) then
        KB(1,1)=DATA(9)
        KB(2,1)=0D0
        KB(3,1)=0D0
        KB(1,2)=0D0
        KB(2,2)=DATA(10)
        KB(3,2)=0D0
        KB(1,3)=0D0
        KB(2,3)=0D0
        KB(3,3)=DATA(10)
  
        End if
  
        Do i=1,3
        	Do j=1,3
  	 Do k=1,3
  	  Do l=1,3
  	   KF(i,j)=KF(i,j)+T(i,k)*T(j,l)*KB(k,l)
  	   End do
  	 End do
  	End do
        End do
  
          DATAR(1)=KF(1,1)
          DATAR(2)=KF(2,1)
          DATAR(3)=KF(3,1)
          DATAR(4)=KF(2,2)
  	  DATAR(5)=KF(3,2)
          DATAR(6)=KF(3,3)
  
        Return
        End
  
negative.code:       Subroutine ConsPlane(XY1,XY2,XY3,A,B,C,in)
        implicit none
  
        Real*8 XY1(*), XY2(*), XY3(*)
        Real*8 A, B, C
        Real*8 D, D1, D2, D3
        Real*8 t1, t2, t3
        Integer in
  
  
        External Det
  
        t1 = XY1(1) ** 2 + XY1(2) ** 2 + XY1(3) ** 2
        t2 = XY2(1) ** 2 + XY2(2) ** 2 + XY2(3) ** 2
        t1 = XY3(1) ** 2 + XY3(2) ** 2 + XY3(3) ** 2
  
        if (t1.NE.0 .and. t2.NE.0 .and. t3.NE.0) then
        Call Det(XY1(1),XY1(2),XY1(3),XY2(1),XY2(2),
  