      function dipole ( a, b, seed )

c*********************************************************************72

10    x = r11 ( seed )
      y = r11 ( seed )
      if ( 1.0 - x * x - y * y ) 10, 10, 20
20    dipole = ( y + b ) / ( x + a )

      return
      end
