anchor.diff:                  disp(i,3) = -0.05 * x(i,3)
   
                 else if ( x(i,1) .ge. (dyn_org+1.025e-3) ) then ! middle head
  -                disp(i,1) = -0.05 * (x(i,1)-4.75e-3) + xtsl
  +                disp(i,1) = -0.05 * (x(i,1)-dyn_org-2.125e-3) + xtsl
   c     &                    + (x(i,1)-4.75e-3) * (cos(pi/rotf) - 1.0)
   c     &                    - (x(i,2)) *  sin(pi/rotf)
                   disp(i,2) = -0.05 * (x(i,2)) ! + 0.01
  
positive.code:      &         ((x(i,2)*x(i,2) + x(i,3)*x(i,3)) .lt. 2.89e-6) ) then
              if( x(i,2) .ge. 0.6e-3 ) then ! top
                if ( x(i,1) .le. (dyn_org-1.025e-3) ) then ! top tail
                  disp(i,1) = -0.05 * (x(i,1)-0.5e-3) + xtsl
       &                    + (x(i,1)-0.5e-3) * (cos(pi/rotf) - 1.0)
       &                    - (x(i,2)-1.125e-3) *  sin(pi/rotf)
                  disp(i,2) = -0.05 * (x(i,2)-1.125e-3) !+ 0.01
       &                    + (x(i,2)-1.125e-3) * (cos(pi/rotf) - 1.0)
       &                    + (x(i,1)-0.5e-3) *  sin(pi/rotf)
                  disp(i,3) = -0.05 * x(i,3)
  
                else if ( x(i,1) .ge. (dyn_org+1.025e-3) ) then ! top head
                  disp(i,1) = -0.05 * (x(i,1)-4.75e-3) + xtsl
       &                    + (x(i,1)-4.75e-3) * (cos(pi/rotf) - 1.0)
       &                    - (x(i,2)-1.125e-3) *  sin(pi/rotf)
                  disp(i,2) = -0.05 * (x(i,2)-1.125e-3) !+ 0.01
       &                    + (x(i,2)-1.125e-3) * (cos(pi/rotf) - 1.0)
       &                    + (x(i,1)-4.75e-3) *  sin(pi/rotf)
                  disp(i,3) = -0.05 * x(i,3)
  
                else ! top middle
                  disp(i,1) = -0.05 * (x(i,1)-2.625e-3) + xtsl
       &                    + (x(i,1)-2.625e-3) * (cos(pi/rotf) - 1.0)
       &                    - (x(i,2)-1.125e-3) *  sin(pi/rotf)
                  disp(i,2) = -0.05 * (x(i,2)-1.125e-3) !+ 0.01
       &                    + (x(i,2)-1.125e-3) * (cos(pi/rotf) - 1.0)
       &                    + (x(i,1)-2.625e-3) *  sin(pi/rotf)
                  disp(i,3) = -0.05 * x(i,3)
  
                endif ! end top--switch head middle tail
  
              else if( x(i,2) .le. -0.6e-3 ) then ! bottom
                if ( x(i,1) .le. (dyn_org-1.025e-3) ) then ! bottom tail
                  disp(i,1) = -0.05 * (x(i,1)-0.5e-3) + xtsl
       &                    - (x(i,1)-0.5e-3) * (cos(pi/rotf) - 1.0)
       &                    + (x(i,2)+1.125e-3) *  sin(pi/rotf)
                  disp(i,2) = -0.05 * (x(i,2)+1.125e-3) !- 0.01
       &                    - (x(i,2)+1.125e-3) * (cos(pi/rotf) - 1.0)
       &                    - (x(i,1)-0.5e-3) *  sin(pi/rotf)
                  disp(i,3) = -0.05 * x(i,3)
  
                else if ( x(i,1) .ge. (dyn_org+1.025e-3) ) then ! bottom head
                  disp(i,1) = -0.05 * (x(i,1)-4.75e-3) + xtsl
       &                    - (x(i,1)-4.75e-3) * (cos(pi/rotf) - 1.0)
       &                    + (x(i,2)+1.125e-3) *  sin(pi/rotf)
                  disp(i,2) = -0.05 * (x(i,2)+1.125e-3) !- 0.01
       &                    - (x(i,2)+1.125e-3) * (cos(pi/rotf) - 1.0)
       &                    - (x(i,1)-4.75e-3) *  sin(pi/rotf)
                  disp(i,3) = -0.05 * x(i,3)
  
                else ! bottom middle
                  disp(i,1) = -0.05 * (x(i,1)-2.625e-3) + xtsl
       &                    - (x(i,1)-2.625e-3) * (cos(pi/rotf) - 1.0)
       &                    + (x(i,2)+1.125e-3) *  sin(pi/rotf)
                  disp(i,2) = -0.05 * (x(i,2)+1.125e-3) !- 0.01
       &                    - (x(i,2)+1.125e-3) * (cos(pi/rotf) - 1.0)
       &                    - (x(i,1)-2.625e-3) *  sin(pi/rotf)
                  disp(i,3) = -0.05 * x(i,3)
  
                endif ! end bottom--switch head middle tail
  
              else ! middle
                if ( x(i,1) .le. (dyn_org-1.025e-3) ) then ! middle tail
                  disp(i,1) = -0.05 * (x(i,1)-0.5e-3) + xtsl
  c     &                    + (x(i,1)-0.5e-3) * (cos(pi/rotf) - 1.0)
  c     &                    - (x(i,2)) *  sin(pi/rotf)
                  disp(i,2) = -0.05 * (x(i,2)) ! + 0.01
  
negative.code:                 disp(i,3) = -0.05 * x(i,3)
  
                else ! middle middle
                  disp(i,1) = -0.05 * (x(i,1)-dyn_org) + xtsl
  c     &                    + (x(i,1)-2.625e-3) * (cos(pi/rotf) - 1.0)
  c     &                    - (x(i,2)) *  sin(pi/rotf)
                  disp(i,2) = -0.05 * (x(i,2)) ! + 0.01
  