anchor.diff:    implicit none
     integer ix
     real(kind=fPrec) tilt, xoff, yoff
  -  ape(7,ix)=tilt
  -  ape(8,ix)=xoff
  -  ape(9,ix)=yoff
  -  lapeofftlt(ix)=ape(7,ix).ne.zero.or.ape(8,ix).ne.zero.or.ape(9,ix).ne.zero
  +  ape( 9,ix)=tilt
  +  ape(10,ix)=xoff
  +  ape(11,ix)=yoff
  +  lapeofftlt(ix)=ape(9,ix).ne.zero.or.ape(10,ix).ne.zero.or.ape(11,ix).ne.zero
   end subroutine aperture_initroffpos
   
   
  
positive.code:      case(0) ! not an aperture marker
          write(iunit,1984) name, apeName(aptype), spos, ape(1), ape(2), ape(3), ape(4), ape(5), ape(6), ape(7), ape(8), ape(9), ape(10), ape(11)
       case(1) ! Circle
          write(iunit,1984) name, apeName(aptype), spos, ape(1),   zero,   zero,   zero,   zero,   zero, ape(7), ape(8), ape(9), zero, zero
       case(2) ! Rectangle
          write(iunit,1984) name, apeName(aptype), spos, ape(1), ape(2),   zero,   zero,   zero,   zero, ape(7), ape(8), ape(9), zero, zero
       case(3) ! Ellipse
          write(iunit,1984) name, apeName(aptype), spos, ape(3), ape(4),   zero,   zero,   zero,   zero, ape(7), ape(8), ape(9), zero, zero
       case(4) ! Rectellipse
          write(iunit,1984) name, apeName(aptype), spos, ape(1), ape(2), ape(3), ape(4),   zero,   zero, ape(7), ape(8), ape(9), zero, zero
       case(5) ! Octagon
          ! get angles from points passing through x1,y1 and x2,y2
          ! x1=ape(1)
  
negative.code:   return
  end subroutine intersectRT
  
  subroutine intersectTR( xRay, yRay, thetaRay, xRe, yRe, aa, bb, xOf, yOf, mOct, qOct, xChk, yChk, nChk )
    ! 0.0<=thetaRay<=2pi!!!!!
    implicit none
    ! interface variables
    real(kind=fPrec) xRay, yRay, thetaRay, xRe, yRe, aa, bb, xOf, yOf, mOct, qOct, xChk, yChk, nChk
    ! temp variables
    real(kind=fPrec) xTmp(2), yTmp(2), nTmp(2)
    call intersectRE( xRay, yRay, thetaRay, xRe, yRe, xTmp(1), yTmp(1), nTmp(1) )
  