

      double precision function fdisc(x,y,z)
      implicit none

      double precision x,y,z,r2, xp,yp,zp
      double precision x0,y0,r0, r
      common /cominit3/ x0, y0, r0


      call mapc2p(x,y,z,xp,yp,zp)

c     # circle of radius r0:
c     # This is not a mistake;  center of circle is
c     # (0,0,y0) (in 2d coordinates)
      r = sqrt(xp**2 + (yp - y0)**2 + zp**2)


      fdisc = r - r0

      end
